fix zlib and bzip2

This commit is contained in:
Danny McClanahan
2022-04-28 00:42:33 -04:00
parent da423cdbac
commit 0af9331015
2 changed files with 22 additions and 12 deletions

View File

@@ -101,16 +101,19 @@ def patch(self):
**kwargs)
def install(self, spec, prefix):
if self.spec.satisfies('%emscripten'):
make = emmake
def do_make(*args):
if self.spec.satisfies('%emscripten'):
emmake(*args)
else:
make(*args)
# Build the dynamic library first
if '+shared' in spec:
make('-f', 'Makefile-libbz2_so')
do_make('-f', 'Makefile-libbz2_so')
# Build the static library and everything else
make()
make('install', 'PREFIX={0}'.format(prefix))
do_make()
do_make('install', 'PREFIX={0}'.format(prefix))
if self.spec.satisfies('%emscripten'):
install('bzip2.wasm',

View File

@@ -75,16 +75,23 @@ def install(self, spec, prefix):
nmake('-f' 'win32\\Makefile.msc')
self.win_install()
else:
if self.spec.satisfies('%emscripten'):
configure = emconfigure
make = emmake
def do_configure(*args):
if self.spec.satisfies('%emscripten'):
emconfigure(*args)
else:
configure(*args)
def do_make(*args):
if self.spec.satisfies('%emscripten'):
emmake(*args)
else:
make(*args)
config_args = []
if '~shared' in spec:
config_args.append('--static')
configure('--prefix={0}'.format(prefix), *config_args)
do_configure('--prefix={0}'.format(prefix), *config_args)
make()
do_make()
if self.run_tests:
make('check')
make('install')
do_make('check')
do_make('install')