Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

download-macos-libs.py: Update openssl, use tar, update Darwin target #1841

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,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/libexec/openssl11/lib/ \
-s ${PWD}/macos-libs/${target_arch}/opt/local/libexec/openssl3/lib/ \
-s ${PWD}/macos-libs/${target_arch}/opt/local/lib/

# Fixup some paths dylibbundler missed
Expand Down Expand Up @@ -227,7 +227,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}/libexec/openssl11/lib/pkgconfig"
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:${lib_prefix}/libexec/openssl3/lib/pkgconfig"
opts="$opts --disable-cocoa --cross-prefix="
postbuild='package_macos'
;;
Expand Down
8 changes: 4 additions & 4 deletions scripts/download-macos-libs.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# FIXME: Support multiple mirrors

class LibInstaller:
DARWIN_TARGET_X64="darwin_17" # macOS 10.13
DARWIN_TARGET_X64="darwin_21" # macOS 12.x
DARWIN_TARGET_ARM64="darwin_21" # macOS 12.x

def __init__(self, arch):
Expand Down Expand Up @@ -135,7 +135,7 @@ def install_pkg(self, pkg_name):
assert extracted_path.startswith(self._extract_path), f'tarball has a global file: {fname}'

print(f' [*] Extracting to {self._extract_path}')
tb.extractall(self._extract_path, numeric_owner=True)
subprocess.check_call(["tar", "--numeric-owner", "-C", self._extract_path, "-xf", dst_pkg_filename])

for fpath in tb.getnames():
# FIXME: Symlinks
Expand All @@ -148,7 +148,7 @@ def install_pkg(self, pkg_name):
if l.strip().startswith('prefix'):
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'
new_prefix = f'prefix={self._extract_path}/opt/local/libexec/openssl3\n'
lines[i] = new_prefix
break
with open(extracted_path, 'w') as f:
Expand Down Expand Up @@ -185,7 +185,7 @@ def main():
'libsamplerate',
'libpixman',
'libepoxy',
'openssl11',
'openssl3',
'libpcap',
'libslirp'])

Expand Down
Loading