diff --git a/README.md b/README.md index 2ae1afb8cc..dd6630a7c1 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ match the project's coding conventions (see `doc/coding.txt`) or are controversial. The `master` branch is regularly built and tested, but is not guaranteed to be -completely stable. [Tags](https://github.com/bitcoin/bitcoin/tags) are created +completely stable. [Tags](https://github.com/darkcoinproject/darkcoin/tags) are created regularly to indicate new official, stable release versions of DarkCoin. Testing diff --git a/bitcoin-qt.pro b/bitcoin-qt.pro index 48e7bb8a7b..909760ed88 100644 --- a/bitcoin-qt.pro +++ b/bitcoin-qt.pro @@ -339,11 +339,16 @@ FORMS += src/qt/forms/qrcodedialog.ui } contains(BITCOIN_QT_TEST, 1) { +SOURCES -= src/qt/bitcoin.cpp SOURCES += src/qt/test/test_main.cpp \ - src/qt/test/uritests.cpp -HEADERS += src/qt/test/uritests.h + src/qt/test/uritests.cpp \ + src/qt/qrcodedialog.cpp +HEADERS += src/qt/test/uritests.h \ + src/qt/qrcodedialog.h DEPENDPATH += src/qt/test QT += testlib +DEFINES += USE_QRCODE +LIBS += -lqrencode TARGET = darkcoin-qt_test DEFINES += BITCOIN_QT_TEST macx: CONFIG -= app_bundle @@ -391,7 +396,7 @@ isEmpty(BOOST_THREAD_LIB_SUFFIX) { } isEmpty(BDB_LIB_PATH) { - macx:BDB_LIB_PATH = /opt/local/lib/db48 + macx:BDB_LIB_PATH = /usr/local/opt/berkeley-db4/lib } isEmpty(BDB_LIB_SUFFIX) { @@ -399,15 +404,23 @@ isEmpty(BDB_LIB_SUFFIX) { } isEmpty(BDB_INCLUDE_PATH) { - macx:BDB_INCLUDE_PATH = /opt/local/include/db48 + macx:BDB_INCLUDE_PATH = /usr/local/opt/berkeley-db4/include } isEmpty(BOOST_LIB_PATH) { - macx:BOOST_LIB_PATH = /opt/local/lib + macx:BOOST_LIB_PATH = /usr/local/opt/boost/lib } isEmpty(BOOST_INCLUDE_PATH) { - macx:BOOST_INCLUDE_PATH = /opt/local/include + macx:BOOST_INCLUDE_PATH = /usr/local/opt/boost/include +} + +isEmpty(OPENSSL_LIB_PATH) { + macx:OPENSSL_LIB_PATH = /usr/local/opt/openssl/lib +} + +isEmpty(OPENSSL_INCLUDE_PATH) { + macx:OPENSSL_INCLUDE_PATH = /usr/local/opt/openssl/include } win32:DEFINES += WIN32 diff --git a/contrib/homebrew/makefile.osx.mavericks.patch b/contrib/homebrew/makefile.osx.mavericks.patch new file mode 100644 index 0000000000..00b5e12242 --- /dev/null +++ b/contrib/homebrew/makefile.osx.mavericks.patch @@ -0,0 +1,67 @@ +diff --git a/src/makefile.osx b/src/makefile.osx +index 038135c..796e59a 100644 +--- a/src/makefile.osx ++++ b/src/makefile.osx +@@ -7,17 +7,22 @@ + # Originally by Laszlo Hanyecz (solar@heliacal.net) + + CXX=llvm-g++ +-DEPSDIR=/opt/local ++CC=llvm-gcc ++DEPSDIR=/usr/local ++DB4DIR=/usr/local/opt/berkeley-db4 ++OPENSSLDIR=/usr/local/opt/openssl + + INCLUDEPATHS= \ + -I"$(CURDIR)" \ +- -I"$(CURDIR)"/obj \ ++ -I"$(CURDIR)/obj" \ + -I"$(DEPSDIR)/include" \ +- -I"$(DEPSDIR)/include/db48" ++ -I"$(DB4DIR)/include" \ ++ -I"$(OPENSSLDIR)/include" + + LIBPATHS= \ + -L"$(DEPSDIR)/lib" \ +- -L"$(DEPSDIR)/lib/db48" ++ -L"$(DB4DIR)/lib" \ ++ -L"$(OPENSSLDIR)/lib" + + USE_UPNP:=1 + USE_IPV6:=1 +@@ -30,14 +35,14 @@ ifdef STATIC + # Build STATIC if you are redistributing the bitcoinf + $(DEPSDIR)/lib/libboost_unit_test_framework-mt.a + LIBS += \ +- $(DEPSDIR)/lib/db48/libdb_cxx-4.8.a \ ++ $(DB4DIR)/lib/libdb_cxx-4.8.a \ + $(DEPSDIR)/lib/libboost_system-mt.a \ + $(DEPSDIR)/lib/libboost_filesystem-mt.a \ + $(DEPSDIR)/lib/libboost_program_options-mt.a \ + $(DEPSDIR)/lib/libboost_thread-mt.a \ + $(DEPSDIR)/lib/libboost_chrono-mt.a \ +- $(DEPSDIR)/lib/libssl.a \ +- $(DEPSDIR)/lib/libcrypto.a \ ++ $(OPENSSLDIR)/lib/libssl.a \ ++ $(OPENSSLDIR)/lib/libcrypto.a \ + -lz + else + TESTLIBS += \ +@@ -67,7 +72,7 @@ DEBUGFLAGS = -g + endif + + # osx 10.9 has changed the stdlib default to libc++. To prevent some link error, you may need to use libstdc++ +-CFLAGS += -stdlib=libstdc++ ++# CFLAGS += -stdlib=libstdc++ + + # ppc doesn't work because we don't support big-endian + CFLAGS += -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter \ +@@ -167,7 +172,7 @@ obj/%.o: %.cpp + rm -f $(@:%.o=%.d) + + obj/%.o: %.c +- $(CXX) -c $(CFLAGS) -fpermissive -MMD -MF $(@:%.o=%.d) -o $@ $< ++ $(CC) -c $(CFLAGS) -fpermissive -MMD -MF $(@:%.o=%.d) -o $@ $< + @cp $(@:%.o=%.d) $(@:%.o=%.P); \ + sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ + -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ diff --git a/doc/build-osx.md b/doc/build-osx.md index a2fa59c933..d079a8b39a 100644 --- a/doc/build-osx.md +++ b/doc/build-osx.md @@ -122,6 +122,11 @@ Rerunning "openssl version" should now return the correct version. patch -p1 < contrib/homebrew/makefile.osx.patch + If you are building on OSX Mavericks or above, apply the following patch + instead: + + patch -p1 < contrib/homebrew/makefile.osx.mavericks.patch + 3. Build darkcoind: cd src diff --git a/doc/readme-qt.rst b/doc/readme-qt.rst index a3883d9648..ef832d2154 100644 --- a/doc/readme-qt.rst +++ b/doc/readme-qt.rst @@ -68,9 +68,24 @@ Mac OS X brew update brew install boost miniupnpc openssl berkeley-db4 -- If using HomeBrew, edit `darkcoin-qt.pro` to account for library location differences. There's a diff in `contrib/homebrew/bitcoin-qt-pro.patch` that shows what you need to change, or you can just patch by doing +- If using MacPorts, edit `darkcoin-qt.pro` to account for library location differences. - patch -p1 < contrib/homebrew/bitcoin.qt.pro.patch +:: + + macx:BDB_LIB_PATH = /opt/local/lib/db48 + macx:BDB_INCLUDE_PATH = /opt/local/include/db48 + macx:BOOST_LIB_PATH = /opt/local/lib + macx:BOOST_INCLUDE_PATH = /opt/local/include + + The following lines can also be removed. + + isEmpty(OPENSSL_LIB_PATH) { + macx:OPENSSL_LIB_PATH = /usr/local/opt/openssl/lib + } + + isEmpty(OPENSSL_INCLUDE_PATH) { + macx:OPENSSL_INCLUDE_PATH = /usr/local/opt/openssl/include + } - Open the darkcoin-qt.pro file in Qt Creator and build as normal (cmd-B) diff --git a/src/init.cpp b/src/init.cpp index 3c4db3713e..e9735a63fb 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -309,7 +309,8 @@ std::string HelpMessage() " -datadir=