diff --git a/build.sh b/build.sh index 657a0e6430..693d5a536b 100755 --- a/build.sh +++ b/build.sh @@ -45,7 +45,7 @@ package_macos() { dylibbundler -cd -of -b -x dist/xemu.app/Contents/MacOS/xemu \ -d ${lib_path}/ \ -p "@executable_path/${lib_rpath}/" \ - -s ${PWD}/macos-libs/${target_arch}/opt/local/lib/openssl-1.0/ \ + -s ${PWD}/macos-libs/${target_arch}/opt/local/libexec/openssl11/lib/ \ -s ${PWD}/macos-libs/${target_arch}/opt/local/lib/ # Fixup some paths dylibbundler missed @@ -228,7 +228,7 @@ case "$platform" in # Adjust compilation options based on platform fi sys_ldflags='-headerpad_max_install_names' export PKG_CONFIG_PATH="${lib_prefix}/lib/pkgconfig" - export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:${lib_prefix}/lib/openssl-1.0/pkgconfig/" + export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:${lib_prefix}/libexec/openssl11/lib/pkgconfig" opts="$opts --disable-cocoa --cross-prefix=" postbuild='package_macos' ;; diff --git a/scripts/download-macos-libs.py b/scripts/download-macos-libs.py index 8ede2402f7..13e9aa70f6 100755 --- a/scripts/download-macos-libs.py +++ b/scripts/download-macos-libs.py @@ -13,6 +13,10 @@ import subprocess # MIRROR = 'http://packages.macports.org/macports/packages' MIRROR = 'http://nue.de.packages.macports.org/macports/packages' +# FIXME: Inline macports key +# FIXME: Move packages to archive directory to track used vs unused +# FIXME: Support multiple mirrors + class LibInstaller: DARWIN_TARGET_X64="darwin_17" # macOS 10.13 DARWIN_TARGET_ARM64="darwin_20" # macOS 11.x @@ -85,7 +89,7 @@ class LibInstaller: shell=True, check=True) def is_pkg_skipped(self, pkg_name): - return pkg_name.startswith('python') + return any(pkg_name.startswith(n) for n in ('python', 'ncurses')) def install_pkg(self, pkg_name): if self.is_pkg_installed(pkg_name): @@ -135,7 +139,10 @@ class LibInstaller: lines = f.readlines() for i, l in enumerate(lines): if l.strip().startswith('prefix'): - lines[i] = f'prefix={self._extract_path}/opt/local\n' + new_prefix = f'prefix={self._extract_path}/opt/local\n' + if pkg_name.startswith('openssl'): # FIXME + new_prefix = f'prefix={self._extract_path}/opt/local/libexec/openssl11\n' + lines[i] = new_prefix break with open(extracted_path, 'w') as f: f.write(''.join(lines)) @@ -171,7 +178,7 @@ def main(): 'libsamplerate', 'libpixman', 'libepoxy', - 'openssl10', + 'openssl11', 'libpcap']) if __name__ == '__main__':