diff --git a/2GiveCoin.pro b/2GiveCoin.pro index 3838e61..5b7df0b 100644 --- a/2GiveCoin.pro +++ b/2GiveCoin.pro @@ -20,6 +20,8 @@ BDB_INCLUDE_PATH=/usr/local/opt/berkeley-db4/include BDB_LIB_PATH=/usr/local/opt/berkeley-db4/lib OPENSSL_INCLUDE_PATH=/usr/local/opt/openssl/include OPENSSL_LIB_PATH=/usr/local/opt/openssl/lib +QRENCODE_INCLUDE_PATH=/usr/local/opt/qrencode/include +QRENCODE_LIB_PATH=/usr/local/opt/qrencode/lib CONFIG += static @@ -40,6 +42,8 @@ UI_DIR = build # use: qmake "RELEASE=1" contains(RELEASE, 1) { # Mac: compile for maximum compatibility (10.5, 32-bit) + # This may be broken for Qt5. 10.7 is the last version with CI. For 10.6, "support is limited." + # See http://doc.qt.io/qt-5/osx.html macx:QMAKE_CXXFLAGS += -mmacosx-version-min=10.5 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk !windows:!macx { @@ -97,6 +101,7 @@ contains(USE_DBUS, 1) { } QT += network +# QT += xml # use: qmake "USE_IPV6=1" ( enabled by default; default) # or: qmake "USE_IPV6=0" (disabled by default) @@ -129,6 +134,8 @@ contains(BITCOIN_NEED_QT_PLUGINS, 1) { QMAKE_CXXFLAGS += -msse2 QMAKE_CFLAGS += -msse2 QMAKE_CXXFLAGS_WARN_ON = -fdiagnostics-show-option -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -Wstack-protector +# This may be necessary for other platforms besides the Mac: +macx:QMAKE_CXXFLAGS_WARN_ON += -Wno-reserved-user-defined-literal # Input DEPENDPATH += src src/json src/qt @@ -396,9 +403,30 @@ macx:DEFINES += MAC_OSX MSG_NOSIGNAL=0 macx:ICON = src/qt/res/icons/givecoin.icns macx:TARGET = "2GiveCoin-Qt" macx:QMAKE_CFLAGS_THREAD += -pthread + macx:QMAKE_LFLAGS_THREAD += -pthread macx:QMAKE_CXXFLAGS_THREAD += -pthread +# Since Mavericks, -stdlib=libc++ is the default, and bottled homebrew +# libraries will expect it. I am not clear what effect this will have +# on actual deployment. + +# The easiest way of solving this: +# +#QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9 + +# This works all the way back to 10.7. Shouldn't work on 10.6. +QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7 +macx:QMAKE_LFLAGS += -stdlib=libc++ +macx:QMAKE_CXXFLAGS += -stdlib=libc++ + +# There's this error thrown on OS X 10.11: +# +# src/serialize.h:827:10: error: class member cannot be redeclared +# +# I'm not sure what to conditionalize this on, so it gets its own macro. +macx:QMAKE_CXXFLAGS += -DSERIALIZE_H_HAS_DUPLICATE_DECLARATION + # Set libraries and includes at end, to use platform-defined defaults if not overridden INCLUDEPATH += $$BOOST_INCLUDE_PATH $$BDB_INCLUDE_PATH $$OPENSSL_INCLUDE_PATH $$QRENCODE_INCLUDE_PATH LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) $$join(OPENSSL_LIB_PATH,,-L,) $$join(QRENCODE_LIB_PATH,,-L,) diff --git a/src/qt/notificator.cpp b/src/qt/notificator.cpp index 8028190..2329c0b 100644 --- a/src/qt/notificator.cpp +++ b/src/qt/notificator.cpp @@ -16,7 +16,7 @@ #include #endif -#ifdef Q_OS_MAC +#if QT_VERSION < 0x050000 && defined(Q_OS_MAC) #include extern bool qt_mac_execute_apple_script(const QString &script, AEDesc *ret); #endif @@ -46,7 +46,7 @@ Notificator::Notificator(const QString &programName, QSystemTrayIcon *trayicon, mode = Freedesktop; } #endif -#ifdef Q_OS_MAC +#if QT_VERSION < 0x050000 && defined(Q_OS_MAC) // Check if Growl is installed (based on Qt's tray icon implementation) CFURLRef cfurl; OSStatus status = LSGetApplicationForInfo(kLSUnknownType, kLSUnknownCreator, CFSTR("growlTicket"), kLSRolesAll, 0, &cfurl); @@ -225,7 +225,7 @@ void Notificator::notifySystray(Class cls, const QString &title, const QString & } // Based on Qt's tray icon implementation -#ifdef Q_OS_MAC +#if QT_VERSION < 0x050000 && defined(Q_OS_MAC) void Notificator::notifyGrowl(Class cls, const QString &title, const QString &text, const QIcon &icon) { const QString script( @@ -285,7 +285,7 @@ void Notificator::notify(Class cls, const QString &title, const QString &text, c case QSystemTray: notifySystray(cls, title, text, icon, millisTimeout); break; -#ifdef Q_OS_MAC +#if 0 && defined(Q_OS_MAC) case Growl12: case Growl13: notifyGrowl(cls, title, text, icon); diff --git a/src/scrypt-x86_64.S b/src/scrypt-x86_64.S index f0a3fdd..dcc8f85 100644 --- a/src/scrypt-x86_64.S +++ b/src/scrypt-x86_64.S @@ -175,7 +175,7 @@ .text - .align 32 + .align 16 gen_salsa8_core: # 0: %rdx, %rdi, %rcx, %rsi movq 8(%rsp), %rdi @@ -274,7 +274,7 @@ gen_salsa8_core: .text - .align 32 + .align 16 .globl scrypt_core .globl _scrypt_core scrypt_core: @@ -525,7 +525,7 @@ gen_scrypt_core_loop2: xmm_salsa8_core_doubleround(); \ - .align 32 + .align 16 xmm_scrypt_core: # shuffle 1st block into %xmm8-%xmm11 movl 60(%rdi), %edx @@ -837,7 +837,7 @@ xmm_scrypt_core_loop2: .text - .align 32 + .align 16 .globl scrypt_best_throughput .globl _scrypt_best_throughput scrypt_best_throughput: @@ -999,7 +999,7 @@ scrypt_best_throughput_exit: .text - .align 32 + .align 16 .globl scrypt_core_2way .globl _scrypt_core_2way scrypt_core_2way: @@ -1461,7 +1461,7 @@ scrypt_core_2way_loop2: .text - .align 32 + .align 16 .globl scrypt_core_3way .globl _scrypt_core_3way scrypt_core_3way: @@ -1828,4 +1828,4 @@ scrypt_core_3way_loop2: popq %rbx ret -#endif \ No newline at end of file +#endif diff --git a/src/serialize.h b/src/serialize.h index 3b3dcd4..de167be 100644 --- a/src/serialize.h +++ b/src/serialize.h @@ -824,6 +824,7 @@ class CDataStream vch.insert(it, first, last); } +#ifndef SERIALIZE_H_HAS_DUPLICATE_DECLARATION void insert(iterator it, std::vector::const_iterator first, std::vector::const_iterator last) { assert(last - first >= 0); @@ -836,7 +837,8 @@ class CDataStream else vch.insert(it, first, last); } - +#endif + #if !defined(_MSC_VER) || _MSC_VER >= 1300 void insert(iterator it, const char* first, const char* last) {