Skip to content

Commit

Permalink
Merge pull request etotheipi#184 from droark/dev
Browse files Browse the repository at this point in the history
More OS X build fixes
  • Loading branch information
goatpig authored Mar 8, 2017
2 parents 149b9b2 + 4214f50 commit ad2259a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
10 changes: 5 additions & 5 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Makefile for BitcoinArmory bitcoin wallet

SUBDIRS = cppForSwig
PREFIX = /usr

EXTRA_DIST = *.py *.md LICENSE LICENSE-ATI LICENSE-MIT \
nginx_example.conf imgList.xml autogen.sh \
Expand Down Expand Up @@ -34,21 +34,21 @@ uninstall-old:
rm -f $(DESTDIR)$(PREFIX)/bin/ArmoryDB

install-exec-hook: uninstall-old
mkdir $(DESTDIR)$(PREXIX)/lib/armory
cp *.py *.so README.md $(DESTDIR)$(PREXIX)/lib/armory
mkdir -p $(DESTDIR)$(PREFIX)/lib/armory/ui
mkdir -p $(DESTDIR)$(PREFIX)/lib/armory/armoryengine
mkdir -p $(DESTDIR)$(PREFIX)/bin
mkdir -p $(DESTDIR)$(PREFIX)/share/applications
cp *.py *.so README.md $(DESTDIR)$(PREFIX)/lib/armory
cp -r ui/* $(DESTDIR)$(PREFIX)/lib/armory/ui
cp -r armoryengine/* $(DESTDIR)$(PREFIX)/lib/armory/armoryengine
sed "s: /usr: $(PREFIX):g" < dpkgfiles/armory > $(DESTDIR)$(PREFIX)/bin/armory
chmod +x $(DESTDIR)$(PREFIX)/bin/armory
mkdir -p $(DESTDIR)$(PREFIX)/share/applications
sed "s:python /usr:python $(PREFIX):g" < dpkgfiles/armory.desktop > $(DESTDIR)$(PREFIX)/share/applications/armory.desktop
sed "s:python /usr:python $(PREFIX):g" < dpkgfiles/armoryoffline.desktop > $(DESTDIR)$(PREFIX)/share/applications/armoryoffline.desktop
sed "s:python /usr:python $(PREFIX):g" < dpkgfiles/armorytestnet.desktop > $(DESTDIR)$(PREFIX)/share/applications/armorytestnet.desktop

uninstall-hook: uninstall-old
rm -rf $(DESTDIR)$(PREXIX)/lib/armory
rm -rf $(DESTDIR)$(PREFIX)/lib/armory
rm -rf $(DESTDIR)$(PREFIX)/bin/armory
rm -f $(DESTDIR)$(PREFIX)/share/applications/armory.*

Expand Down
3 changes: 2 additions & 1 deletion cppForSwig/cryptopp/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ if IS_X86

if CRYPTOPP_HAVE_GCC
if BUILD_DARWIN
AM_CXXFLAGS += -arch x86_64
AM_CXXFLAGS += -arch x86_64 -std=c++11 -stdlib=libc++
AM_LDFLAGS += -lc++
else
AM_CXXFLAGS += -march=native
endif
Expand Down
21 changes: 13 additions & 8 deletions osxbuild/build-app.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,20 @@
UNPACKDIR = path.join(WORKDIR, 'unpackandbuild')
INSTALLDIR = path.join(WORKDIR, 'install')
PYPREFIX = path.join(APPDIR, 'Contents/Frameworks/Python.framework/Versions/%s' % pyMajorVer)
PYSITEPKGS = path.join(PYPREFIX, 'lib/python%s/site-packages' % pyMajorVer)
PYLIBPREFIX = path.join(PYPREFIX, 'lib')
PYINCPREFIX = path.join(PYPREFIX, 'include/python%s' % pyMajorVer)
PYSITEPKGS = path.join(PYLIBPREFIX, 'python%s/site-packages' % pyMajorVer)
MAKEFLAGS = '-j4'
CONFIGFLAGS = ''

# Autotools needs some TLC to make Python happy.
CONFIGFLAGS = 'LIBS=\"-L%s\" PYTHON_LDFLAGS=\"-L%s\" PYTHON_CPPFLAGS=\"-I%s\" PYTHON_EXTRA_LIBS=\"-u _PyMac_Error %s/Python\"' % (PYLIBPREFIX, PYLIBPREFIX, PYINCPREFIX, PYPREFIX)

QTBUILTFLAG = path.join(UNPACKDIR, 'qt/qt_install_success.txt')

pypathData = 'PYTHON_INCLUDE=%s/include/python%s/' % (PYPREFIX, pyMajorVer)
pypathData += '\nPYTHON_LIB=%s/lib/python%s/config/libpython%s.a' % (PYPREFIX, pyMajorVer, pyMajorVer)
pypathData += '\nPYTHON_LIB_DIR=%s/lib/python%s/config/' % (PYPREFIX, pyMajorVer)
pypathData = 'PYTHON_INCLUDE=%s' % PYINCPREFIX
pypathData += '\nPYTHON_LDFLAGS=%s' % PYLIBPREFIX
pypathData += '\nPYTHON_LIB=%s/python%s/config/libpython%s.a' % (PYLIBPREFIX, pyMajorVer, pyMajorVer)
pypathData += '\nPYTHON_LIB_DIR=%s/python%s/config/' % (PYLIBPREFIX, pyMajorVer)
pypathData += '\nPYVER=python%s' % pyMajorVer

# If no arguments specified, then do the minimal amount of work necessary
Expand Down Expand Up @@ -418,7 +423,7 @@ def make_empty_app():

########################################################
def compile_python():
logprint('Installing python.')
logprint('Installing python')
bldPath = unpack(tarfilesToDL['Python'])

# ./configure - Force Python to link against a brew-ed version of OpenSSL
Expand Down Expand Up @@ -456,7 +461,7 @@ def compile_python():

########################################################
def compile_pip():
logprint('Installing pip and setuptools.')
logprint('Installing pip and setuptools')
pipexe = path.join(PYPREFIX, 'bin/pip')
if path.exists(pipexe):
logprint('Pip already installed')
Expand Down Expand Up @@ -681,7 +686,7 @@ def compile_armory():
execAndWait('./autogen.sh', cwd='..')
execAndWait('./configure %s' % CONFIGFLAGS, cwd='..')
execAndWait('make all %s' % MAKEFLAGS, cwd='..')
execAndWait('make DESTDIR="%s" install' % pydir, cwd='..')
execAndWait('make DESTDIR="%s" install %s' % (pydir, MAKEFLAGS), cwd='..')
copyfile('Armory-script.sh', armoryAppScript)
copyfile('armoryd-script.sh', armorydAppScript)
execAndWait('chmod +x "%s"' % armoryAppScript)
Expand Down

0 comments on commit ad2259a

Please sign in to comment.