# This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # thorcoin # thorcoin/files # thorcoin/files/pkg-message.in # thorcoin/files/patch-src-main_cpp # thorcoin/files/patch-thorcoin-qt_pro # thorcoin/files/patch-src-makefile_bsd # thorcoin/files/thorcoin.in # thorcoin/files/thorcoin.conf.sample # thorcoin/files/patch-src-scrypt--jane-scrypt--jane_c # thorcoin/Makefile # thorcoin/distinfo # thorcoin/pkg-descr # thorcoin/pkg-plist # echo c - thorcoin mkdir -p thorcoin > /dev/null 2>&1 echo c - thorcoin/files mkdir -p thorcoin/files > /dev/null 2>&1 echo x - thorcoin/files/pkg-message.in sed 's/^X//' >thorcoin/files/pkg-message.in << '755075ef3e03e914ea22b5bfc6b4d795' X******************************************************************* XTo configure the Thorcoin server please edit: X%%PREFIX%%/etc/%%PORTNAME%%.conf X XYou must at least set a "rpcpassword" in the configuration file above. X XTo run the %%PORTNAME%%d server at startup, add the following Xsettings to your /etc/rc.conf X X%%PORTNAME%%_enable="YES" X X******************************************************************* 755075ef3e03e914ea22b5bfc6b4d795 echo x - thorcoin/files/patch-src-main_cpp sed 's/^X//' >thorcoin/files/patch-src-main_cpp << '45879784eb68872136d0398c14ece40c' X--- src/main.cpp.orig 2014-03-03 15:04:19.000000000 -0500 X+++ src/main.cpp 2014-03-03 15:04:29.000000000 -0500 X@@ -954,8 +954,8 @@ X X int static generateMTRandom(unsigned int s, int range) X { X- random::mt19937 gen(s); X- random::uniform_int_distribution<> dist(1, range); X+ boost::random::mt19937 gen(s); X+ boost::random::uniform_int_distribution<> dist(1, range); X return dist(gen); X } X 45879784eb68872136d0398c14ece40c echo x - thorcoin/files/patch-thorcoin-qt_pro sed 's/^X//' >thorcoin/files/patch-thorcoin-qt_pro << '6e780dfe6fe4fc78c755a94e639a6286' X--- thorcoin-qt.pro.orig 2014-03-03 15:05:52.000000000 -0500 X+++ thorcoin-qt.pro 2014-03-03 15:06:05.000000000 -0500 X@@ -374,7 +374,7 @@ X LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX X # -lgdi32 has to happen after -lcrypto (see #681) X windows:LIBS += -lws2_32 -lshlwapi -lmswsock -lole32 -loleaut32 -luuid -lgdi32 X-LIBS += -lboost_system$$BOOST_LIB_SUFFIX -lboost_filesystem$$BOOST_LIB_SUFFIX -lboost_program_options$$BOOST_LIB_SUFFIX -lboost_thread$$BOOST_THREAD_LIB_SUFFIX X+LIBS += -lboost_system$$BOOST_LIB_SUFFIX -lboost_filesystem$$BOOST_LIB_SUFFIX -lboost_program_options$$BOOST_LIB_SUFFIX -lboost_thread$$BOOST_THREAD_LIB_SUFFIX -lboost_chrono$$BOOST_THREAD_LIB_SUFFIX X windows:LIBS += -lboost_chrono$$BOOST_LIB_SUFFIX X X contains(RELEASE, 1) { 6e780dfe6fe4fc78c755a94e639a6286 echo x - thorcoin/files/patch-src-makefile_bsd sed 's/^X//' >thorcoin/files/patch-src-makefile_bsd << '98523e4e02f5e51fd4e2d666fea8fe1f' X--- src/makefile.bsd.orig 2014-02-21 05:34:34.000000000 -0500 X+++ src/makefile.bsd 2014-02-24 15:43:40.000000000 -0500 X@@ -9,6 +9,11 @@ X X DEFS=-DBOOST_SPIRIT_THREADSAFE X X+BOOST_INCLUDE_PATH=/usr/local/include X+BDB_INCLUDE_PATH=/usr/local/include/db48 X+BOOST_LIB_PATH=/usr/local/lib X+BDB_LIB_PATH=/usr/local/lib/db48 X+ X DEFS += $(addprefix -I,$(CURDIR) $(CURDIR)/obj $(BOOST_INCLUDE_PATH) $(BDB_INCLUDE_PATH) $(OPENSSL_INCLUDE_PATH)) X LIBS = $(addprefix -L,$(BOOST_LIB_PATH) $(BDB_LIB_PATH) $(OPENSSL_LIB_PATH)) X X@@ -32,6 +37,7 @@ X -l boost_filesystem$(BOOST_LIB_SUFFIX) \ X -l boost_program_options$(BOOST_LIB_SUFFIX) \ X -l boost_thread$(BOOST_LIB_SUFFIX) \ X+ -l boost_chrono$(BOOST_LIB_SUFFIX) \ X -l db_cxx$(BDB_LIB_SUFFIX) \ X -l ssl \ X -l crypto \ X@@ -52,7 +58,6 @@ X LIBS+= \ X -Wl,-B$(LMODE2) \ X -l z \ X- -l dl \ X -l pthread X X X@@ -94,9 +99,16 @@ X X # CXXFLAGS can be specified on the make command line, so we use xCXXFLAGS that only X # adds some defaults in front. Unfortunately, CXXFLAGS=... $(CXXFLAGS) does not work. X-xCXXFLAGS=-O0 -msse2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter \ X+xCXXFLAGS=-O2 -msse2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter \ X+ $(DEBUGFLAGS) $(DEFS) $(HARDENING) $(CXXFLAGS) X+ X+# scrypt-jane specific parameters X+DEFS+=-DSCRYPT_KECCAK512 -DSCRYPT_CHACHA -DSCRYPT_CHOOSE_COMPILETIME X+ X+xCXXFLAGS_SCRYPT_JANE=-O3 -msse2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter \ X $(DEBUGFLAGS) $(DEFS) $(HARDENING) $(CXXFLAGS) X X+ X # LDFLAGS can be specified on the make command line, so we use xLDFLAGS that only X # adds some defaults in front. Unfortunately, LDFLAGS=... $(LDFLAGS) does not work. X xLDFLAGS=$(LDHARDENING) $(LDFLAGS) X@@ -133,7 +145,8 @@ X obj/pbkdf2.o \ X obj/scrypt_mine.o \ X obj/scrypt-x86.o \ X- obj/scrypt-x86_64.o X+ obj/scrypt-x86_64.o \ X+ obj/scrypt-jane.o X X X all: Thorcoind X@@ -156,6 +169,9 @@ X obj/scrypt-x86_64.o: scrypt-x86_64.S X $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $< X X+obj/scrypt-jane.o: scrypt-jane/scrypt-jane.c X+ gcc -c $(xCXXFLAGS_SCRYPT_JANE) -MMD -o $@ $< X+ X obj/%.o: %.cpp X $(CXX) -c $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $< X @cp $(@:%.o=%.d) $(@:%.o=%.P); \ 98523e4e02f5e51fd4e2d666fea8fe1f echo x - thorcoin/files/thorcoin.in sed 's/^X//' >thorcoin/files/thorcoin.in << 'd06e68fa8bc79a0c064864bf43af11f4' X#!/bin/sh X# X# $FreeBSD: $ X# X X# PROVIDE: %%PORTNAME%% X# REQUIRE: LOGIN X# KEYWORD: shutdown X X# X# Add the following lines to /etc/rc.conf.local or /etc/rc.conf X# to enable this service: X# X# %%PORTNAME%%_enable (bool): Set to NO by default. X# Set it to YES to enable %%PORTNAME%%. X# %%PORTNAME%%_config (path): Set to %%PREFIX%%/etc/%%PORTNAME%%.conf X# by default. X# %%PORTNAME%%_user: The user account %%PORTNAME%% daemon runs as X# It uses 'root' user by default. X# %%PORTNAME%%_group: The group account %%PORTNAME%% daemon runs as X# It uses 'wheel' group by default. X# %%PORTNAME%%_datadir (str): Default to "/var/db/%%PORTNAME%%" X# Base data directory. X X. /etc/rc.subr X Xname=%%PORTNAME%% Xrcvar=%%PORTNAME%%_enable X X: ${%%PORTNAME%%_enable:=NO} X: ${%%PORTNAME%%_config=%%PREFIX%%/etc/%%PORTNAME%%.conf} X: ${%%PORTNAME%%_datadir=/var/db/%%PORTNAME%%} X: ${%%PORTNAME%%_user="root"} X: ${%%PORTNAME%%_group="wheel"} X Xrequired_files=${%%PORTNAME%%_config} Xcommand=%%PREFIX%%/bin/%%PORTNAME%%d X%%PORTNAME%%_chdir=${%%PORTNAME%%_datadir} Xpidfile="${%%PORTNAME%%_datadir}/%%PORTNAME%%d.pid" Xstop_cmd=%%PORTNAME%%_stop Xcommand_args="-conf=${%%PORTNAME%%_config} -datadir=${%%PORTNAME%%_datadir} -noupnp -daemon -pid=${pidfile}" Xstart_precmd="${name}_prestart" X X%%PORTNAME%%_create_datadir() X{ X echo "Creating data directory" X eval mkdir -p ${%%PORTNAME%%_datadir} X [ $? -eq 0 ] && chown -R ${%%PORTNAME%%_user}:${%%PORTNAME%%_group} ${%%PORTNAME%%_datadir} X #ln -s ${%%PORTNAME%%_datadir} /.%%PORTNAME%% X} X X%%PORTNAME%%_prestart() X{ X if [ ! -d "${%%PORTNAME%%_datadir}/." ]; then X %%PORTNAME%%_create_datadir || return 1 X fi X} X X%%PORTNAME%%_requirepidfile() X{ X if [ ! "0`check_pidfile ${pidfile} ${command}`" -gt 1 ]; then X echo "${name} not running? (check $pidfile)." X exit 1 X fi X} X X%%PORTNAME%%_stop() X{ X %%PORTNAME%%_requirepidfile X X echo "Stopping ${name}." X eval ${command} -conf=${%%PORTNAME%%_config} -datadir=${%%PORTNAME%%_datadir} stop X wait_for_pids ${rc_pid} X} X Xload_rc_config $name Xrun_rc_command "$1" d06e68fa8bc79a0c064864bf43af11f4 echo x - thorcoin/files/thorcoin.conf.sample sed 's/^X//' >thorcoin/files/thorcoin.conf.sample << '893636cb57f579ad0faee73b10075062' Xrpcuser=myname X#rpcpassword=YOU MUST SET A PASSWORD Xmaxconnection=20 Xrpcallowip=127.0.0.1 Xrpcport=29551 Xport=29550 Xserver=1 Xdaemon=1 Xlisten=1 Xgen=0 Xlogtimestamps=1 Xaddnode=63.247.147.163:29550 Xaddnode=162.250.125.26 Xaddnode=1.122.196.119 893636cb57f579ad0faee73b10075062 echo x - thorcoin/files/patch-src-scrypt--jane-scrypt--jane_c sed 's/^X//' >thorcoin/files/patch-src-scrypt--jane-scrypt--jane_c << '33751883f3f2873c09632ebc5659489c' X--- src/scrypt-jane/scrypt-jane.c.orig 2014-02-28 00:28:07.000000000 -0500 X+++ src/scrypt-jane/scrypt-jane.c 2014-03-03 15:23:55.000000000 -0500 X@@ -27,7 +27,7 @@ X #define scrypt_maxp 25 /* (1 << 25) = ~33 million */ X X #include X-#include X+#include X X static void X scrypt_fatal_error_default(const char *msg) { 33751883f3f2873c09632ebc5659489c echo x - thorcoin/Makefile sed 's/^X//' >thorcoin/Makefile << '2ed5ecaa384fe9dcb2535a52517b38e7' X# Created by: Daniel Morante X# $FreeBSD$ X XPORTNAME= thorcoin XPORTVERSION= 0.7.2.0 XCATEGORIES= net-p2p finance XMASTER_SITES= GH X XMAINTAINER= daniel@morante.net XCOMMENT= Peer-to-Peer crypto currency using scrypt as a proof-of-work algorithm X XLICENSE= MIT X XLIB_DEPENDS= libboost_date_time.so:${PORTSDIR}/devel/boost-libs \ X execinfo:${PORTSDIR}/devel/libexecinfo X XOPTIONS_DEFINE= X11 UPNP QRCODES XOPTIONS_DEFAULT= X11 QRCODES XUPNP_DESC= Build with UPNP support XQRCODES_DESC= Build with QR code display X XUSE_GITHUB= yes XGH_ACCOUNT= ${PORTNAME} XGH_PROJECT= Thorcoin XGH_COMMIT= f9fd7e5 XGH_TAGNAME= f9fd7e5 X XUSES= gmake XUSE_OPENSSL= yes XUSE_BDB= yes XWANT_BDB_VER= 48 X XCXXFLAGS+= -I${LOCALBASE}/include -I${BDB_INCLUDE_DIR} XCXXFLAGS+= -L${LOCALBASE}/lib -L${BDB_LIB_DIR} XCXXFLAGS+= -Wno-invalid-offsetof X X.include X X.if ${PORT_OPTIONS:MX11} XPLIST_SUB+= X11="" X.else XSUB_LIST+= PORTNAME=${PORTNAME} XUSE_RC_SUBR= ${PORTNAME} XSUB_FILES= pkg-message XPLIST_SUB+= X11="@comment " X.endif X X.if ${PORT_OPTIONS:MX11} XUSE_QT4= corelib gui qmake_build linguist uic moc rcc XBINARY= ${PORTNAME}-qt XPLIST_SUB+= HEADLESS="@comment " X.else XBINARY= ${PORTNAME}d XMAKE_ARGS+= -C ${WRKSRC}/src XPLIST_SUB+= HEADLESS="" X.endif X X.if ${PORT_OPTIONS:MQRCODES} XLIB_DEPENDS+= libqrencode.so:${PORTSDIR}/graphics/libqrencode XQMAKE_USE_QRCODE=1 X.else XQMAKE_USE_QRCODE=0 X.endif X XPLIST_SUB+= EXECUTABLE="bin/${BINARY}" \ X PORTNAME=${PORTNAME} X X.if ${PORT_OPTIONS:MUPNP} XLIB_DEPENDS+= libminiupnpc.so:${PORTSDIR}/net/miniupnpc XQMAKE_USE_UPNP= 1 X.else XQMAKE_USE_UPNP= - X.endif X X.include X Xpost-patch: X @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/src/makefile.bsd X.if !${PORT_OPTIONS:MX11} X @cd ${WRKSRC}/src && ${CP} -p makefile.bsd Makefile X @${REINPLACE_CMD} \ X -e 's|^USE_UPNP.*$$|USE_UPNP=${QMAKE_USE_UPNP}|' \ X -e 's|-l pthread|${PTHREAD_LIBS}|g' \ X -e 's:-l dl::' \ X ${WRKSRC}/src/Makefile X.endif X Xdo-configure: X.if ${PORT_OPTIONS:MX11} X cd ${WRKSRC} && ${SETENV} ${QMAKE_ENV} \ X ${QMAKE} ${QMAKE_ARGS} USE_UPNP=${QMAKE_USE_UPNP} USE_QRCODE=${QMAKE_USE_QRCODE} \ X QMAKE_LRELEASE=lrelease-qt4 PREFIX=${PREFIX} INCLUDEPATH=${BDB_INCLUDE_DIR} \ X QMAKE_LIBDIR+=${BDB_LIB_DIR} ${PORTNAME}-qt.pro X.endif X Xdo-install: X.if ${PORT_OPTIONS:MX11} X ${INSTALL_PROGRAM} -s ${WRKSRC}/${GH_PROJECT}d-qt ${STAGEDIR}${PREFIX}/bin/${BINARY} X ${REINPLACE_CMD} -e 's,=/usr,=${PREFIX},' \ X -e 's,bitcoin,${PORTNAME},g' \ X -e 's,Bitcoin,${GH_PROJECT},g' \ X -e 's,128,,g' ${WRKSRC}/contrib/debian/bitcoin-qt.desktop X ${INSTALL} ${WRKSRC}/contrib/debian/bitcoin-qt.desktop ${STAGEDIR}${PREFIX}/share/applications/${PORTNAME}-qt.desktop X ${INSTALL} ${WRKSRC}/src/qt/res/icons/bitcoin.png ${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}.png X X.else X ${INSTALL_PROGRAM} -s ${WRKSRC}/src/${GH_PROJECT}d ${STAGEDIR}${PREFIX}/bin/${BINARY} X ${INSTALL} ${FILESDIR}/${PORTNAME}.conf.sample ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.sample X @if [ ! -f ${PREFIX}/etc/${PORTNAME}.conf ]; then \ X ${CP} -p ${FILESDIR}/${PORTNAME}.conf.sample ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf; \ X fi X.endif X X.include 2ed5ecaa384fe9dcb2535a52517b38e7 echo x - thorcoin/distinfo sed 's/^X//' >thorcoin/distinfo << 'eb195828576b84616f38511f1b401bdb' XSHA256 (thorcoin-0.7.2.0.tar.gz) = a0cf25b0d3d8d7f2fb4761187fea333ba53825b2c93ab7de315d170da2195e4f XSIZE (thorcoin-0.7.2.0.tar.gz) = 3575319 eb195828576b84616f38511f1b401bdb echo x - thorcoin/pkg-descr sed 's/^X//' >thorcoin/pkg-descr << '57217476b95d06e2f4059ebb3b8fbedb' XThorcoin is a free open source peer-to-peer electronic cash system that Xis completely decentralized, without the need for a central server or Xtrusted parties. Users hold the crypto keys to their own money and Xtransact directly with each other, with the help of a P2P network to Xcheck for double-spending. X XWWW: https://github.com/thorcoin/Thorcoin 57217476b95d06e2f4059ebb3b8fbedb echo x - thorcoin/pkg-plist sed 's/^X//' >thorcoin/pkg-plist << 'eaaf4583764292a7b86696b711417ad1' X%%EXECUTABLE%% X%%X11%%share/applications/%%PORTNAME%%-qt.desktop X%%X11%%share/pixmaps/%%PORTNAME%%.png X%%HEADLESS%%@unexec if cmp -s %D/etc/%%PORTNAME%%.conf.sample %D/etc/%%PORTNAME%%.conf; then rm -f %D/etc/%%PORTNAME%%.conf; fi X%%HEADLESS%%etc/%%PORTNAME%%.conf.sample X%%HEADLESS%%@exec if [ ! -f %D/etc/%%PORTNAME%%.conf ] ; then cp -p %D/%F %B/%%PORTNAME%%.conf; fi eaaf4583764292a7b86696b711417ad1 exit