diff options
author | Steve Wills <swills@FreeBSD.org> | 2014-02-12 18:44:49 +0000 |
---|---|---|
committer | Steve Wills <swills@FreeBSD.org> | 2014-02-12 18:44:49 +0000 |
commit | eb2820b2fde080bca7d0aac679bb6e3d6f0f090a (patch) | |
tree | fdb753d5da209cf74a7e9c1ec7b9103df7837b0d /net-p2p/namecoin | |
parent | 0022fc1a1974e3a8d427059cd3d3696097358307 (diff) | |
download | ports-eb2820b2fde080bca7d0aac679bb6e3d6f0f090a.tar.gz ports-eb2820b2fde080bca7d0aac679bb6e3d6f0f090a.zip |
Notes
Diffstat (limited to 'net-p2p/namecoin')
-rw-r--r-- | net-p2p/namecoin/Makefile | 98 | ||||
-rw-r--r-- | net-p2p/namecoin/distinfo | 2 | ||||
-rw-r--r-- | net-p2p/namecoin/files/makefile.unix | 76 | ||||
-rw-r--r-- | net-p2p/namecoin/files/patch-src__main.h | 10 | ||||
-rw-r--r-- | net-p2p/namecoin/files/patch-src__net.cpp | 25 | ||||
-rw-r--r-- | net-p2p/namecoin/files/patch-src__qt__configurenamedialog.h | 12 | ||||
-rw-r--r-- | net-p2p/namecoin/files/patch-src__qt__managenamespage.h | 12 | ||||
-rw-r--r-- | net-p2p/namecoin/files/patch-src__serialize.h | 21 | ||||
-rw-r--r-- | net-p2p/namecoin/pkg-descr | 15 |
9 files changed, 271 insertions, 0 deletions
diff --git a/net-p2p/namecoin/Makefile b/net-p2p/namecoin/Makefile new file mode 100644 index 000000000000..d990ce8f20cf --- /dev/null +++ b/net-p2p/namecoin/Makefile @@ -0,0 +1,98 @@ +# Created by: Chad J. Milios <milios@ccsys.com> +# $FreeBSD$ + +PORTNAME= namecoin +PORTVERSION= Q.3.72 +CATEGORIES= net-p2p dns +MASTER_SITES= GH + +MAINTAINER= milios@ccsys.com +COMMENT= Decentralized, open DNS system and general purpose key/value store + +LIB_DEPENDS= libboost_date_time.so:${PORTSDIR}/devel/boost-libs + +OPTIONS_DEFINE= X11 UPNP QRCODES DBUS +OPTIONS_DEFAULT= X11 QRCODES + +UPNP_DESC= Build with UPNP support +QRCODES_DESC= Build with QR code display + +USE_GITHUB= yes +GH_ACCOUNT= namecoinq +GH_PROJECT= namecoinq +GH_COMMIT= cdf052b +GH_TAGNAME= v${PORTVERSION} + +USES= gmake compiler:c++11-lib +USE_OPENSSL= yes +USE_BDB= yes +WANT_BDB_VER= 48 + +CXXFLAGS+= -I${LOCALBASE}/include -I${BDB_INCLUDE_DIR} +CXXFLAGS+= -L${LOCALBASE}/lib -L${BDB_LIB_DIR} +CXXFLAGS+= -DCRYPTOPP_DISABLE_ASM + +.include <bsd.port.options.mk> + +.if ${PORT_OPTIONS:MX11} +USE_QT4= corelib network gui qmake_build linguist_build uic_build moc_build rcc_build + +BINARY= namecoin-qt +LIB_DEPENDS+= libprotobuf.so:${PORTSDIR}/devel/protobuf +.else +BINARY= namecoind +MAKE_ARGS+= -C ${WRKSRC}/src +USE_GNOME= glib20 +.endif + +.if ${PORT_OPTIONS:MQRCODES} +LIB_DEPENDS+= libqrencode.so:${PORTSDIR}/graphics/libqrencode +QMAKE_USE_QRCODE=1 +.else +QMAKE_USE_QRCODE=0 +.endif + +.if ${PORT_OPTIONS:MDBUS} +USE_QT4+= dbus +QMAKE_USE_DBUS= 1 +.else +QMAKE_USE_DBUS= 0 +.endif + +PLIST_FILES+= bin/${BINARY} + +.if ${PORT_OPTIONS:MUPNP} +LIB_DEPENDS+= libminiupnpc.so:${PORTSDIR}/net/miniupnpc +QMAKE_USE_UPNP= 1 +.else +QMAKE_USE_UPNP= - +.endif + +.include <bsd.port.pre.mk> + +post-patch: +.if !${PORT_OPTIONS:MX11} + @cd ${WRKSRC}/src && ${CP} ${FILESDIR}/makefile.unix Makefile + @${REINPLACE_CMD} \ + -e 's|^USE_UPNP.*$$|USE_UPNP=${QMAKE_USE_UPNP}|' \ + -e 's|-l pthread|${PTHREAD_LIBS}|g' \ + ${WRKSRC}/src/Makefile +.endif + +do-configure: +.if ${PORT_OPTIONS:MX11} + cd ${WRKSRC} && ${SETENV} ${QMAKE_ENV} \ + ${QMAKE} ${QMAKE_ARGS} USE_UPNP=${QMAKE_USE_UPNP} USE_QRCODE=${QMAKE_USE_QRCODE} \ + QMAKE_LRELEASE=${LRELEASE} INCLUDEPATH+=${BDB_INCLUDE_DIR} \ + QMAKE_LIBDIR+=${BDB_LIB_DIR} ${BINARY}.pro +.endif + +do-install: + @${MKDIR} ${STAGEDIR}${PREFIX}/bin +.if ${PORT_OPTIONS:MX11} + ${INSTALL_PROGRAM} ${WRKSRC}/${BINARY} ${STAGEDIR}${PREFIX}/bin/ +.else + ${INSTALL_PROGRAM} ${WRKSRC}/src/${BINARY} ${STAGEDIR}${PREFIX}/bin/ +.endif + +.include <bsd.port.post.mk> diff --git a/net-p2p/namecoin/distinfo b/net-p2p/namecoin/distinfo new file mode 100644 index 000000000000..1b3ea336c2e0 --- /dev/null +++ b/net-p2p/namecoin/distinfo @@ -0,0 +1,2 @@ +SHA256 (namecoin-Q.3.72.tar.gz) = 426b6c10b999ed11f436b2d8a56715a4355d30af41e13a1fd6e6ee5dd8348775 +SIZE (namecoin-Q.3.72.tar.gz) = 1453900 diff --git a/net-p2p/namecoin/files/makefile.unix b/net-p2p/namecoin/files/makefile.unix new file mode 100644 index 000000000000..fcd9f2fd6a83 --- /dev/null +++ b/net-p2p/namecoin/files/makefile.unix @@ -0,0 +1,76 @@ +CXX?=g++ +DEFS=-DNOPCH -DFOURWAYSSE2 -DUSE_SSL + +LIBS= \ + -Wl,-Bstatic \ + -l boost_system \ + -l boost_filesystem \ + -l boost_program_options \ + -l boost_thread \ + -l boost_chrono \ + -l db_cxx \ + -l ssl \ + -l crypto + +USE_UPNP:=0 +ifneq (${USE_UPNP}, -) + LIBS += -l miniupnpc + DEFS += -DUSE_UPNP=$(USE_UPNP) +endif + +LIBS+= \ + -Wl,-Bdynamic \ + -l gthread-2.0 \ + -l z \ + -l pthread + +CXXFLAGS+=-O2 -Wno-invalid-offsetof -Wformat $(DEFS) +HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \ + script.h allocators.h db.h walletdb.h crypter.h net.h irc.h keystore.h main.h \ + wallet.h bitcoinrpc.h uibase.h ui.h noui.h init.h auxpow.h + +BASE_OBJS= \ + obj/auxpow.o \ + obj/util.o \ + obj/key.o \ + obj/script.o \ + obj/db.o \ + obj/walletdb.o \ + obj/crypter.o \ + obj/net.o \ + obj/irc.o \ + obj/keystore.o \ + obj/main.o \ + obj/wallet.o \ + obj/bitcoinrpc.o \ + obj/init.o \ + cryptopp/obj/sha.o \ + cryptopp/obj/cpu.o + +OBJS = \ + $(BASE_OBJS) \ + obj/hook.o + +all: namecoind + +cryptopp/obj/%.o: cryptopp/%.cpp + $(CXX) -c $(CXXFLAGS) -O3 -o $@ $< + +obj/nogui/%.o: %.cpp $(HEADERS) + $(CXX) -c $(CXXFLAGS) -o $@ $< + +obj/test/%.o: test/%.cpp $(HEADERS) + $(CXX) -c $(CFLAGS) -o $@ $< + +obj/nogui/namecoin.o: namecoin.h + +namecoind: $(BASE_OBJS:obj/%=obj/nogui/%) obj/nogui/namecoin.o + $(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS) + +clean: + -rm -f namecoin namecoind + -rm -f obj/*.o + -rm -f obj/nogui/*.o + -rm -f obj/test/*.o + -rm -f cryptopp/obj/*.o + -rm -f headers.h.gch diff --git a/net-p2p/namecoin/files/patch-src__main.h b/net-p2p/namecoin/files/patch-src__main.h new file mode 100644 index 000000000000..4fb54e4fcd1a --- /dev/null +++ b/net-p2p/namecoin/files/patch-src__main.h @@ -0,0 +1,10 @@ +--- ./src/main.h.orig 2013-10-29 13:38:10.000000000 +0000 ++++ ./src/main.h 2014-01-18 23:12:20.871138275 +0000 +@@ -16,7 +16,6 @@ + #ifdef __WXMSW__ + #include <io.h> /* for _commit */ + #elif !defined(MAC_OSX) +-#include <sys/prctl.h> + #endif + + class CBlock; diff --git a/net-p2p/namecoin/files/patch-src__net.cpp b/net-p2p/namecoin/files/patch-src__net.cpp new file mode 100644 index 000000000000..992948cf9d63 --- /dev/null +++ b/net-p2p/namecoin/files/patch-src__net.cpp @@ -0,0 +1,25 @@ +--- ./src/net.cpp.orig 2013-10-29 13:38:10.000000000 +0000 ++++ ./src/net.cpp 2014-01-18 23:12:20.911138205 +0000 +@@ -51,7 +51,7 @@ + CAddress addrLocalHost("0.0.0.0", 0, false, nLocalServices); + CNode* pnodeLocalHost = NULL; + uint64 nLocalHostNonce = 0; +-array<int, 10> vnThreadsRunning; ++boost::array<int, 10> vnThreadsRunning; + SOCKET hListenSocket = INVALID_SOCKET; + + vector<CNode*> vNodes; +@@ -1094,13 +1094,8 @@ + char intClient[16]; + char intPort[6]; + +-#if !defined(__WXMSW__) && !defined(MAC_OSX) +- r = UPNP_AddPortMapping(urls.controlURL, data.first.servicetype, +- port, port, lanaddr, 0, "TCP", 0); +-#else + r = UPNP_AddPortMapping(urls.controlURL, data.first.servicetype, + port, port, lanaddr, 0, "TCP", 0, "0"); +-#endif + if(r!=UPNPCOMMAND_SUCCESS) + printf("AddPortMapping(%s, %s, %s) failed with code %d (%s)\n", + port, port, lanaddr, r, strupnperror(r)); diff --git a/net-p2p/namecoin/files/patch-src__qt__configurenamedialog.h b/net-p2p/namecoin/files/patch-src__qt__configurenamedialog.h new file mode 100644 index 000000000000..104460b7b841 --- /dev/null +++ b/net-p2p/namecoin/files/patch-src__qt__configurenamedialog.h @@ -0,0 +1,12 @@ +--- ./src/qt/configurenamedialog.h.orig 2013-10-29 13:38:10.000000000 +0000 ++++ ./src/qt/configurenamedialog.h 2014-01-18 23:12:20.925138619 +0000 +@@ -1,6 +1,9 @@ + #ifndef CONFIGURENAMEDIALOG_H + #define CONFIGURENAMEDIALOG_H + ++#include <sys/socket.h> ++#include <netinet/in.h> ++ + #include <QDialog> + + namespace Ui { diff --git a/net-p2p/namecoin/files/patch-src__qt__managenamespage.h b/net-p2p/namecoin/files/patch-src__qt__managenamespage.h new file mode 100644 index 000000000000..6651dcbbf137 --- /dev/null +++ b/net-p2p/namecoin/files/patch-src__qt__managenamespage.h @@ -0,0 +1,12 @@ +--- ./src/qt/managenamespage.h.orig 2013-10-29 13:38:10.000000000 +0000 ++++ ./src/qt/managenamespage.h 2014-01-18 23:12:20.965138391 +0000 +@@ -1,6 +1,9 @@ + #ifndef MANAGENAMESPAGE_H + #define MANAGENAMESPAGE_H + ++#include <sys/socket.h> ++#include <netinet/in.h> ++ + #include <QDialog> + #include <QSortFilterProxyModel> + diff --git a/net-p2p/namecoin/files/patch-src__serialize.h b/net-p2p/namecoin/files/patch-src__serialize.h new file mode 100644 index 000000000000..30eb12fa5131 --- /dev/null +++ b/net-p2p/namecoin/files/patch-src__serialize.h @@ -0,0 +1,21 @@ +--- src/serialize.h.orig 2014-01-19 03:49:23.000000000 +0000 ++++ src/serialize.h 2014-01-19 03:52:10.000000000 +0000 +@@ -858,18 +858,6 @@ + iterator insert(iterator it, const char& x=char()) { return vch.insert(it, x); } + void insert(iterator it, size_type n, const char& x) { vch.insert(it, n, x); } + +- void insert(iterator it, const_iterator first, const_iterator last) +- { +- if (it == vch.begin() + nReadPos && last - first <= nReadPos) +- { +- // special case for inserting at the front when there's room +- nReadPos -= (last - first); +- memcpy(&vch[nReadPos], &first[0], last - first); +- } +- else +- vch.insert(it, first, last); +- } +- + void insert(iterator it, std::vector<char>::const_iterator first, std::vector<char>::const_iterator last) + { + if (it == vch.begin() + nReadPos && last - first <= nReadPos) diff --git a/net-p2p/namecoin/pkg-descr b/net-p2p/namecoin/pkg-descr new file mode 100644 index 000000000000..6ca3713c3518 --- /dev/null +++ b/net-p2p/namecoin/pkg-descr @@ -0,0 +1,15 @@ +Namecoin is an open source decentralized key/value registration and transfer +system based on Bitcoin technology (a decentralized cryptocurrency). + +It allows you to: + + * Securely register and transfer arbitrary names (keys), no possible + censorship! + * Attach values (data) to the names (currently up to 520 bytes, will be + extended) + * Trade and transact namecoins, the digital currency NMC + +To register a name, you must own some namecoins (NMC, the internal +cryptocurrency used by the software). + +WWW: http://namecoin.info/ |