mirror of
https://github.com/scummvm/dockerized-bb.git
synced 2026-05-21 05:40:49 +00:00
APPLE: Update osxcross and Xcode
This commit is contained in:
@@ -421,7 +421,7 @@ def macosx_arm64():
|
||||
# configure script doesn't compile discord check with proper flags
|
||||
platform.env["DISCORD_LIBS"] = "-framework AppKit"
|
||||
|
||||
platform.configureargs.append("--host=aarch64-apple-darwin22.2")
|
||||
platform.configureargs.append("--host=aarch64-apple-darwin22.4")
|
||||
platform.buildconfigureargs = {
|
||||
builds.ScummVMBuild: [ "--enable-static",
|
||||
"--with-staticlib-prefix=${DESTDIR}/${PREFIX}",
|
||||
@@ -462,7 +462,7 @@ def macosx_x86_64():
|
||||
# configure script doesn't compile discord check with proper flags
|
||||
platform.env["DISCORD_LIBS"] = "-framework AppKit"
|
||||
|
||||
platform.configureargs.append("--host=x86_64-apple-darwin22.2")
|
||||
platform.configureargs.append("--host=x86_64-apple-darwin22.4")
|
||||
platform.buildconfigureargs = {
|
||||
builds.ScummVMBuild: [ "--enable-static",
|
||||
"--with-staticlib-prefix=${DESTDIR}/${PREFIX}",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
|
||||
OSXCROSS_VERSION=564e2b9aa8e7a40da663d890c0e853a1259ff8b1
|
||||
OSXCROSS_VERSION=a78f48ae2ae5c1b2d968d386e59f691d7a331b11
|
||||
|
||||
PACKAGE_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
||||
HELPERS_DIR=$PACKAGE_DIR/../..
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
|
||||
OSXCROSS_VERSION=564e2b9aa8e7a40da663d890c0e853a1259ff8b1
|
||||
OSXCROSS_VERSION=a78f48ae2ae5c1b2d968d386e59f691d7a331b11
|
||||
export XAR_VERSION=fb897139262d7ac5c9e187a9f9c219255f465983
|
||||
|
||||
PACKAGE_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
||||
|
||||
@@ -1,31 +1,17 @@
|
||||
From 6dafbde38b64efde1d2556c346b3bd4571465032 Mon Sep 17 00:00:00 2001
|
||||
From 55d50422830c14fbcf1ee86da8ce510ce4499abe Mon Sep 17 00:00:00 2001
|
||||
From: Le Philousophe <lephilousophe@users.noreply.github.com>
|
||||
Date: Sun, 24 Jan 2021 19:15:52 +0100
|
||||
Subject: [PATCH 1/2] Set versions
|
||||
|
||||
---
|
||||
tools/gen_sdk_package_pbzx.sh | 2 +-
|
||||
tools/tools.sh | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
tools/tools.sh | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tools/gen_sdk_package_pbzx.sh b/tools/gen_sdk_package_pbzx.sh
|
||||
index 5ca46e4..7cda817 100755
|
||||
--- a/tools/gen_sdk_package_pbzx.sh
|
||||
+++ b/tools/gen_sdk_package_pbzx.sh
|
||||
@@ -22,7 +22,7 @@ pushd $BUILD_DIR &>/dev/null
|
||||
|
||||
build_xar
|
||||
|
||||
-get_sources https://github.com/tpoechtrager/pbzx.git master
|
||||
+get_sources https://github.com/tpoechtrager/pbzx.git $PBZX_VERSION
|
||||
|
||||
if [ $f_res -eq 1 ]; then
|
||||
pushd $CURRENT_BUILD_PROJECT_NAME &>/dev/null
|
||||
diff --git a/tools/tools.sh b/tools/tools.sh
|
||||
index a09ec64..cf0d370 100644
|
||||
index 1c6b499..a75b5e9 100644
|
||||
--- a/tools/tools.sh
|
||||
+++ b/tools/tools.sh
|
||||
@@ -481,7 +481,7 @@ function build_xar()
|
||||
@@ -512,7 +512,7 @@ function build_xar()
|
||||
{
|
||||
pushd $BUILD_DIR &>/dev/null
|
||||
|
||||
@@ -34,6 +20,15 @@ index a09ec64..cf0d370 100644
|
||||
|
||||
if [ $f_res -eq 1 ]; then
|
||||
pushd $CURRENT_BUILD_PROJECT_NAME/xar &>/dev/null
|
||||
@@ -552,7 +552,7 @@ function build_p7zip()
|
||||
|
||||
function build_pbxz()
|
||||
{
|
||||
- get_sources https://github.com/tpoechtrager/pbzx.git master
|
||||
+ get_sources https://github.com/tpoechtrager/pbzx.git $PBZX_VERSION
|
||||
|
||||
if [ $f_res -eq 1 ]; then
|
||||
pushd $CURRENT_BUILD_PROJECT_NAME &>/dev/null
|
||||
--
|
||||
2.34.1
|
||||
2.39.2
|
||||
|
||||
|
||||
+5
-5
@@ -1,4 +1,4 @@
|
||||
From 83056d61dc67f3679326d8bc0e9d4719dacb855f Mon Sep 17 00:00:00 2001
|
||||
From 8bc8d72d889e17ecaf50311a264e8a394c8f324b Mon Sep 17 00:00:00 2001
|
||||
From: Le Philousophe <lephilousophe@users.noreply.github.com>
|
||||
Date: Sat, 17 Sep 2022 11:36:50 +0200
|
||||
Subject: [PATCH 2/2] Handle MacPorts variants
|
||||
@@ -8,10 +8,10 @@ Subject: [PATCH 2/2] Handle MacPorts variants
|
||||
1 file changed, 10 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/tools/osxcross-macports b/tools/osxcross-macports
|
||||
index f008a8d..58310bd 100755
|
||||
index 3e87735..f388914 100755
|
||||
--- a/tools/osxcross-macports
|
||||
+++ b/tools/osxcross-macports
|
||||
@@ -274,13 +274,20 @@ verifyFileIntegrity()
|
||||
@@ -275,13 +275,20 @@ verifyFileIntegrity()
|
||||
|
||||
getPkgUrl()
|
||||
{
|
||||
@@ -33,7 +33,7 @@ index f008a8d..58310bd 100755
|
||||
local pkg_info_url="https://ports.macports.org"
|
||||
pkg_info_url+="/api/v1/ports/$pkgname/?format=json"
|
||||
pkgversion=$(getFileStdout "$pkg_info_url" | \
|
||||
@@ -307,11 +314,11 @@ getPkgUrl()
|
||||
@@ -308,11 +315,11 @@ getPkgUrl()
|
||||
done
|
||||
|
||||
local pkg=$(echo "$pkgs" | \
|
||||
@@ -48,5 +48,5 @@ index f008a8d..58310bd 100755
|
||||
fi
|
||||
if [ -z "$pkg" ]; then
|
||||
--
|
||||
2.34.1
|
||||
2.39.2
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ COPY Xcode_`'I386_XCODE_VERSION.xip* ${PACKAGES_LOCATION}
|
||||
local_package(xcode-extractor, , PACKAGE=Xcode_`'I386_XCODE_VERSION.xip SDK_PLATFORMS="MacOSX")
|
||||
|
||||
# Extract latest MacOS X, AppleTVOS and iPhoneOS SDK
|
||||
m4_define(`XCODE_VERSION', 14.2)
|
||||
m4_define(`XCODE_VERSION', 14.3.1)
|
||||
COPY Xcode_`'XCODE_VERSION.xip* ${PACKAGES_LOCATION}
|
||||
local_package(xcode-extractor, , PACKAGE=Xcode_`'XCODE_VERSION.xip SDK_PLATFORMS="MacOSX iPhoneOS AppleTVOS")
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
|
||||
OSXCROSS_VERSION=564e2b9aa8e7a40da663d890c0e853a1259ff8b1
|
||||
OSXCROSS_VERSION=a78f48ae2ae5c1b2d968d386e59f691d7a331b11
|
||||
export PBZX_VERSION=2a4d7c3300c826d918def713a24d25c237c8ed53
|
||||
export XAR_VERSION=fb897139262d7ac5c9e187a9f9c219255f465983
|
||||
|
||||
|
||||
@@ -1,31 +1,17 @@
|
||||
From 1917e734f190022f4d2a95df817cfadcc21ba201 Mon Sep 17 00:00:00 2001
|
||||
From e3326ddd44b7b6c984a379cccd92786a46c92245 Mon Sep 17 00:00:00 2001
|
||||
From: Le Philousophe <lephilousophe@users.noreply.github.com>
|
||||
Date: Sun, 24 Jan 2021 19:15:52 +0100
|
||||
Subject: [PATCH 1/3] Set versions
|
||||
|
||||
---
|
||||
tools/gen_sdk_package_pbzx.sh | 2 +-
|
||||
tools/tools.sh | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
tools/tools.sh | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tools/gen_sdk_package_pbzx.sh b/tools/gen_sdk_package_pbzx.sh
|
||||
index 5ca46e4..7cda817 100755
|
||||
--- a/tools/gen_sdk_package_pbzx.sh
|
||||
+++ b/tools/gen_sdk_package_pbzx.sh
|
||||
@@ -22,7 +22,7 @@ pushd $BUILD_DIR &>/dev/null
|
||||
|
||||
build_xar
|
||||
|
||||
-get_sources https://github.com/tpoechtrager/pbzx.git master
|
||||
+get_sources https://github.com/tpoechtrager/pbzx.git $PBZX_VERSION
|
||||
|
||||
if [ $f_res -eq 1 ]; then
|
||||
pushd $CURRENT_BUILD_PROJECT_NAME &>/dev/null
|
||||
diff --git a/tools/tools.sh b/tools/tools.sh
|
||||
index a09ec64..cf0d370 100644
|
||||
index 1c6b499..a75b5e9 100644
|
||||
--- a/tools/tools.sh
|
||||
+++ b/tools/tools.sh
|
||||
@@ -481,7 +481,7 @@ function build_xar()
|
||||
@@ -512,7 +512,7 @@ function build_xar()
|
||||
{
|
||||
pushd $BUILD_DIR &>/dev/null
|
||||
|
||||
@@ -34,6 +20,15 @@ index a09ec64..cf0d370 100644
|
||||
|
||||
if [ $f_res -eq 1 ]; then
|
||||
pushd $CURRENT_BUILD_PROJECT_NAME/xar &>/dev/null
|
||||
@@ -552,7 +552,7 @@ function build_p7zip()
|
||||
|
||||
function build_pbxz()
|
||||
{
|
||||
- get_sources https://github.com/tpoechtrager/pbzx.git master
|
||||
+ get_sources https://github.com/tpoechtrager/pbzx.git $PBZX_VERSION
|
||||
|
||||
if [ $f_res -eq 1 ]; then
|
||||
pushd $CURRENT_BUILD_PROJECT_NAME &>/dev/null
|
||||
--
|
||||
2.34.1
|
||||
2.39.2
|
||||
|
||||
|
||||
+142
-142
@@ -1,22 +1,154 @@
|
||||
From f1e52d8e52d90a2545caaf51067197bbd2f0a2fb Mon Sep 17 00:00:00 2001
|
||||
From 4902378892b2e0039d9e06a3c9e485fc2c26c7ca Mon Sep 17 00:00:00 2001
|
||||
From: Le Philousophe <lephilousophe@users.noreply.github.com>
|
||||
Date: Sun, 24 Jan 2021 19:18:24 +0100
|
||||
Subject: [PATCH 2/3] Accept piped data and avoid intermediate files
|
||||
|
||||
---
|
||||
tools/gen_sdk_package_pbzx.sh | 193 +++++++++++++++++++++++++++++++++-
|
||||
tools/tools.sh | 105 ++++++++++++++++++
|
||||
tools/gen_sdk_package_pbzx.sh | 7 +-
|
||||
tools/tools.sh | 291 ++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 295 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/tools/gen_sdk_package_pbzx.sh b/tools/gen_sdk_package_pbzx.sh
|
||||
index 7cda817..c4e88d5 100755
|
||||
index cc6a742..e2bb3e3 100755
|
||||
--- a/tools/gen_sdk_package_pbzx.sh
|
||||
+++ b/tools/gen_sdk_package_pbzx.sh
|
||||
@@ -23,6 +23,192 @@ pushd $BUILD_DIR &>/dev/null
|
||||
build_xar
|
||||
@@ -29,11 +29,12 @@ pushd $TMP_DIR &>/dev/null
|
||||
|
||||
get_sources https://github.com/tpoechtrager/pbzx.git $PBZX_VERSION
|
||||
+patch -d "$CURRENT_BUILD_PROJECT_NAME" -p1 <<-'EOF'
|
||||
echo "Extracting $XCODE (this may take several minutes) ..."
|
||||
|
||||
-LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$TARGET_DIR/lib \
|
||||
- verbose_cmd "$TARGET_DIR/bin/xar -xf $XCODE -C $TMP_DIR"
|
||||
+set -o pipefail
|
||||
|
||||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$TARGET_DIR/lib \
|
||||
- verbose_cmd "$TARGET_DIR/SDK/tools/bin/pbzx -n Content | cpio -i"
|
||||
+ verbose_cmd "$TARGET_DIR/SDK/tools/bin/pbzx -i $XCODE | cpio -i"
|
||||
+
|
||||
+set +o pipefail
|
||||
|
||||
popd &>/dev/null # TMP_DIR
|
||||
popd &>/dev/null # BUILD_DIR
|
||||
diff --git a/tools/tools.sh b/tools/tools.sh
|
||||
index a75b5e9..3235381 100644
|
||||
--- a/tools/tools.sh
|
||||
+++ b/tools/tools.sh
|
||||
@@ -513,6 +513,111 @@ function build_xar()
|
||||
pushd $BUILD_DIR &>/dev/null
|
||||
|
||||
get_sources https://github.com/tpoechtrager/xar.git $XAR_VERSION
|
||||
+ patch -d "$CURRENT_BUILD_PROJECT_NAME" -p1 <<-'EOF'
|
||||
+commit 9047e5820c2a65829100f183dae342700d5cf604
|
||||
+Author: Le Philousophe <lephilousophe@users.noreply.github.com>
|
||||
+Date: Sun Jan 24 17:22:23 2021 +0100
|
||||
+
|
||||
+ Allow stdin to be used
|
||||
+
|
||||
+diff --git a/xar/lib/archive.c b/xar/lib/archive.c
|
||||
+index adbe79b..b274965 100644
|
||||
+--- a/xar/lib/archive.c
|
||||
++++ b/xar/lib/archive.c
|
||||
+@@ -39,6 +39,7 @@
|
||||
+ #define _FILE_OFFSET_BITS 64
|
||||
+
|
||||
+ #include "config.h"
|
||||
++#include <assert.h>
|
||||
+ #include <stdlib.h>
|
||||
+ #include <stdio.h>
|
||||
+ #include <string.h>
|
||||
+@@ -193,11 +194,22 @@ static int32_t xar_parse_header(xar_t x) {
|
||||
+ }
|
||||
+
|
||||
+ off = XAR(x)->header.size - sz2read;
|
||||
+- if( off > 0 )
|
||||
++ if( off > 0 ) {
|
||||
+ r = (int)lseek(XAR(x)->fd, (off_t)off, SEEK_CUR);
|
||||
+
|
||||
+- if ( (r == -1) && (errno != ESPIPE) ) {
|
||||
+- /* Some fatal error here perhaps? */
|
||||
++ if (r == -1) {
|
||||
++ if ( errno == ESPIPE ) {
|
||||
++ void *buf = malloc(off);
|
||||
++ assert(buf);
|
||||
++ r = xar_read_fd(XAR(x)->fd, buf, off);
|
||||
++ free(buf);
|
||||
++ if( r < (ssize_t)off ) {
|
||||
++ return -1;
|
||||
++ }
|
||||
++ } else {
|
||||
++ return -1; /* Failed to seek */
|
||||
++ }
|
||||
++ }
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+@@ -405,8 +417,32 @@ xar_t xar_open(const char *file, int32_t flags) {
|
||||
+
|
||||
+ XAR(ret)->heap_offset = (off_t)(xar_get_heap_offset(ret) + offset);
|
||||
+ if( lseek(XAR(ret)->fd, XAR(ret)->heap_offset, SEEK_SET) == -1 ) {
|
||||
+- xar_close(ret);
|
||||
+- return NULL;
|
||||
++ if ( errno == ESPIPE ) {
|
||||
++ /* Calculate where we are */
|
||||
++ size_t current = XAR(ret)->header.size + XAR(ret)->toc_count;
|
||||
++ size_t toread = XAR(ret)->heap_offset - current;
|
||||
++ void *buf;
|
||||
++ ssize_t r;
|
||||
++ if ( XAR(ret)->heap_offset < current) {
|
||||
++ /* Can't seek backwards */
|
||||
++ fprintf(stderr, "Trying to seek backward\n");
|
||||
++ xar_close(ret);
|
||||
++ return NULL;
|
||||
++ }
|
||||
++ if (toread) {
|
||||
++ buf = malloc(toread);
|
||||
++ assert(buf);
|
||||
++ r = xar_read_fd(XAR(ret)->fd, buf, toread);
|
||||
++ free(buf);
|
||||
++ if( r < (ssize_t)toread ) {
|
||||
++ xar_close(ret);
|
||||
++ return NULL;
|
||||
++ }
|
||||
++ }
|
||||
++ } else {
|
||||
++ xar_close(ret);
|
||||
++ return NULL;
|
||||
++ }
|
||||
+ }
|
||||
+ if( xar_prop_get( XAR_FILE(ret) , "checksum/size", &value) == 0 ) {
|
||||
+ errno = 0;
|
||||
+diff --git a/xar/lib/io.c b/xar/lib/io.c
|
||||
+index c1115f3..768f0fb 100644
|
||||
+--- a/xar/lib/io.c
|
||||
++++ b/xar/lib/io.c
|
||||
+@@ -191,16 +191,16 @@ static void xar_io_seek(xar_t x, xar_file_t f, off_t seekoff) {
|
||||
+ if( errno == ESPIPE ) {
|
||||
+ ssize_t rr;
|
||||
+ char *buf;
|
||||
+- unsigned int len;
|
||||
++ size_t len;
|
||||
+
|
||||
+- len = (unsigned)(seekoff - (off_t)xar_get_heap_offset(x));
|
||||
++ len = (size_t)seekoff;
|
||||
+ if( XAR(x)->heap_offset > len ) {
|
||||
+ xar_err_new(x);
|
||||
+ xar_err_set_file(x, f);
|
||||
+ xar_err_set_string(x, "Unable to seek");
|
||||
+ xar_err_callback(x, XAR_SEVERITY_NONFATAL, XAR_ERR_ARCHIVE_EXTRACTION);
|
||||
+ } else {
|
||||
+- len -= (unsigned)XAR(x)->heap_offset;
|
||||
++ len -= (size_t)XAR(x)->heap_offset;
|
||||
+ buf = malloc(len);
|
||||
+ assert(buf);
|
||||
+ rr = xar_read_fd(XAR(x)->fd, buf, len);
|
||||
+EOF
|
||||
|
||||
if [ $f_res -eq 1 ]; then
|
||||
pushd $CURRENT_BUILD_PROJECT_NAME/xar &>/dev/null
|
||||
@@ -553,6 +658,192 @@ function build_p7zip()
|
||||
function build_pbxz()
|
||||
{
|
||||
get_sources https://github.com/tpoechtrager/pbzx.git $PBZX_VERSION
|
||||
+ patch -d "$CURRENT_BUILD_PROJECT_NAME" -p1 <<-'EOF'
|
||||
+commit 3fc6a63b1489c18150cd171f8901d15269a79ea2
|
||||
+Author: Le Philousophe <lephilousophe@users.noreply.github.com>
|
||||
+Date: Sun Jan 24 19:06:57 2021 +0100
|
||||
@@ -201,142 +333,10 @@ index 7cda817..c4e88d5 100755
|
||||
+ if (!success) {
|
||||
+ fprintf(stderr, "failed to open: %s\n", filename);
|
||||
+ return 1;
|
||||
+EOF
|
||||
|
||||
if [ $f_res -eq 1 ]; then
|
||||
pushd $CURRENT_BUILD_PROJECT_NAME &>/dev/null
|
||||
@@ -41,11 +227,12 @@ pushd $TMP_DIR &>/dev/null
|
||||
|
||||
echo "Extracting $XCODE (this may take several minutes) ..."
|
||||
|
||||
-LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$TARGET_DIR/lib \
|
||||
- verbose_cmd "$TARGET_DIR/bin/xar -xf $XCODE -C $TMP_DIR"
|
||||
+set -o pipefail
|
||||
|
||||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$TARGET_DIR/lib \
|
||||
- verbose_cmd "$TARGET_DIR/SDK/tools/bin/pbzx -n Content | cpio -i"
|
||||
+ verbose_cmd "$TARGET_DIR/SDK/tools/bin/pbzx -i $XCODE | cpio -i"
|
||||
+
|
||||
+set +o pipefail
|
||||
|
||||
popd &>/dev/null # TMP_DIR
|
||||
popd &>/dev/null # BUILD_DIR
|
||||
diff --git a/tools/tools.sh b/tools/tools.sh
|
||||
index cf0d370..9d61a6a 100644
|
||||
--- a/tools/tools.sh
|
||||
+++ b/tools/tools.sh
|
||||
@@ -482,6 +482,111 @@ function build_xar()
|
||||
pushd $BUILD_DIR &>/dev/null
|
||||
|
||||
get_sources https://github.com/tpoechtrager/xar.git $XAR_VERSION
|
||||
+ patch -d "$CURRENT_BUILD_PROJECT_NAME" -p1 <<-'EOF'
|
||||
+commit 9047e5820c2a65829100f183dae342700d5cf604
|
||||
+Author: Le Philousophe <lephilousophe@users.noreply.github.com>
|
||||
+Date: Sun Jan 24 17:22:23 2021 +0100
|
||||
+
|
||||
+ Allow stdin to be used
|
||||
+
|
||||
+diff --git a/xar/lib/archive.c b/xar/lib/archive.c
|
||||
+index adbe79b..b274965 100644
|
||||
+--- a/xar/lib/archive.c
|
||||
++++ b/xar/lib/archive.c
|
||||
+@@ -39,6 +39,7 @@
|
||||
+ #define _FILE_OFFSET_BITS 64
|
||||
+
|
||||
+ #include "config.h"
|
||||
++#include <assert.h>
|
||||
+ #include <stdlib.h>
|
||||
+ #include <stdio.h>
|
||||
+ #include <string.h>
|
||||
+@@ -193,11 +194,22 @@ static int32_t xar_parse_header(xar_t x) {
|
||||
+ }
|
||||
+
|
||||
+ off = XAR(x)->header.size - sz2read;
|
||||
+- if( off > 0 )
|
||||
++ if( off > 0 ) {
|
||||
+ r = (int)lseek(XAR(x)->fd, (off_t)off, SEEK_CUR);
|
||||
+
|
||||
+- if ( (r == -1) && (errno != ESPIPE) ) {
|
||||
+- /* Some fatal error here perhaps? */
|
||||
++ if (r == -1) {
|
||||
++ if ( errno == ESPIPE ) {
|
||||
++ void *buf = malloc(off);
|
||||
++ assert(buf);
|
||||
++ r = xar_read_fd(XAR(x)->fd, buf, off);
|
||||
++ free(buf);
|
||||
++ if( r < (ssize_t)off ) {
|
||||
++ return -1;
|
||||
++ }
|
||||
++ } else {
|
||||
++ return -1; /* Failed to seek */
|
||||
++ }
|
||||
++ }
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+@@ -405,8 +417,32 @@ xar_t xar_open(const char *file, int32_t flags) {
|
||||
+
|
||||
+ XAR(ret)->heap_offset = (off_t)(xar_get_heap_offset(ret) + offset);
|
||||
+ if( lseek(XAR(ret)->fd, XAR(ret)->heap_offset, SEEK_SET) == -1 ) {
|
||||
+- xar_close(ret);
|
||||
+- return NULL;
|
||||
++ if ( errno == ESPIPE ) {
|
||||
++ /* Calculate where we are */
|
||||
++ size_t current = XAR(ret)->header.size + XAR(ret)->toc_count;
|
||||
++ size_t toread = XAR(ret)->heap_offset - current;
|
||||
++ void *buf;
|
||||
++ ssize_t r;
|
||||
++ if ( XAR(ret)->heap_offset < current) {
|
||||
++ /* Can't seek backwards */
|
||||
++ fprintf(stderr, "Trying to seek backward\n");
|
||||
++ xar_close(ret);
|
||||
++ return NULL;
|
||||
++ }
|
||||
++ if (toread) {
|
||||
++ buf = malloc(toread);
|
||||
++ assert(buf);
|
||||
++ r = xar_read_fd(XAR(ret)->fd, buf, toread);
|
||||
++ free(buf);
|
||||
++ if( r < (ssize_t)toread ) {
|
||||
++ xar_close(ret);
|
||||
++ return NULL;
|
||||
++ }
|
||||
++ }
|
||||
++ } else {
|
||||
++ xar_close(ret);
|
||||
++ return NULL;
|
||||
++ }
|
||||
+ }
|
||||
+ if( xar_prop_get( XAR_FILE(ret) , "checksum/size", &value) == 0 ) {
|
||||
+ errno = 0;
|
||||
+diff --git a/xar/lib/io.c b/xar/lib/io.c
|
||||
+index c1115f3..768f0fb 100644
|
||||
+--- a/xar/lib/io.c
|
||||
++++ b/xar/lib/io.c
|
||||
+@@ -191,16 +191,16 @@ static void xar_io_seek(xar_t x, xar_file_t f, off_t seekoff) {
|
||||
+ if( errno == ESPIPE ) {
|
||||
+ ssize_t rr;
|
||||
+ char *buf;
|
||||
+- unsigned int len;
|
||||
++ size_t len;
|
||||
+
|
||||
+- len = (unsigned)(seekoff - (off_t)xar_get_heap_offset(x));
|
||||
++ len = (size_t)seekoff;
|
||||
+ if( XAR(x)->heap_offset > len ) {
|
||||
+ xar_err_new(x);
|
||||
+ xar_err_set_file(x, f);
|
||||
+ xar_err_set_string(x, "Unable to seek");
|
||||
+ xar_err_callback(x, XAR_SEVERITY_NONFATAL, XAR_ERR_ARCHIVE_EXTRACTION);
|
||||
+ } else {
|
||||
+- len -= (unsigned)XAR(x)->heap_offset;
|
||||
++ len -= (size_t)XAR(x)->heap_offset;
|
||||
+ buf = malloc(len);
|
||||
+ assert(buf);
|
||||
+ rr = xar_read_fd(XAR(x)->fd, buf, len);
|
||||
+EOF
|
||||
|
||||
if [ $f_res -eq 1 ]; then
|
||||
pushd $CURRENT_BUILD_PROJECT_NAME/xar &>/dev/null
|
||||
pushd $CURRENT_BUILD_PROJECT_NAME &>/dev/null
|
||||
--
|
||||
2.34.1
|
||||
2.39.2
|
||||
|
||||
|
||||
+19
-19
@@ -1,4 +1,4 @@
|
||||
From 4cfc77163a7e330e95b793004e51c14890f8daf7 Mon Sep 17 00:00:00 2001
|
||||
From 8ed1c630ea783dc99be83eb0e7edc4d1cb45688d Mon Sep 17 00:00:00 2001
|
||||
From: Le Philousophe <lephilousophe@users.noreply.github.com>
|
||||
Date: Sun, 24 Jan 2021 19:19:14 +0100
|
||||
Subject: [PATCH 3/3] Generate all SDKs and not only MacOSX
|
||||
@@ -8,30 +8,30 @@ Subject: [PATCH 3/3] Generate all SDKs and not only MacOSX
|
||||
1 file changed, 7 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/tools/gen_sdk_package.sh b/tools/gen_sdk_package.sh
|
||||
index b41d08c..a5ed371 100755
|
||||
index f29faec..d554c9d 100755
|
||||
--- a/tools/gen_sdk_package.sh
|
||||
+++ b/tools/gen_sdk_package.sh
|
||||
@@ -124,8 +124,8 @@ set -e
|
||||
@@ -127,8 +127,8 @@ if [ -z "$XCODE_TOOLS" ]; then
|
||||
|
||||
pushd "$XCODEDIR" &>/dev/null
|
||||
pushd "$XCODEDIR" &>/dev/null
|
||||
|
||||
- if [ -d "Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs" ]; then
|
||||
- pushd "Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs" &>/dev/null
|
||||
+ if [ -d "Contents/Developer/Platforms" ]; then
|
||||
+ pushd "Contents/Developer/Platforms" &>/dev/null
|
||||
else
|
||||
if [ -d "../Packages" ]; then
|
||||
pushd "../Packages" &>/dev/null
|
||||
@@ -191,7 +191,7 @@ else
|
||||
|
||||
-if [ -d "Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs" ]; then
|
||||
- pushd "Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs" &>/dev/null
|
||||
+if [ -d "Contents/Developer/Platforms" ]; then
|
||||
+ pushd "Contents/Developer/Platforms" &>/dev/null
|
||||
else
|
||||
if [ -d "../Packages" ]; then
|
||||
pushd "../Packages" &>/dev/null
|
||||
@@ -148,7 +148,7 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
-SDKS=$(ls | grep -E "^MacOSX13.*|^MacOSX12.*|^MacOSX11.*|^MacOSX10.*" | grep -v "Patch")
|
||||
-SDKS=$(ls | grep -E "^MacOSX14.*|^MacOSX13.*|^MacOSX12.*|^MacOSX11.*|^MacOSX10.*" | grep -v "Patch")
|
||||
+SDKS=$(for platform in $SDK_PLATFORMS; do ls -1d ${platform}.platform/Developer/SDKs/*.*.sdk | grep -v 'Patch'; done)
|
||||
|
||||
if [ -z "$SDKS" ]; then
|
||||
echo "No SDK found" 1>&2
|
||||
@@ -164,7 +164,8 @@ LIBCXXDIR2="Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c
|
||||
echo "No SDK found" 1>&2
|
||||
@@ -210,7 +210,8 @@ LIBCXXDIR3="usr/include/c++/v1"
|
||||
# Manual directory
|
||||
MANDIR="Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man"
|
||||
|
||||
@@ -41,7 +41,7 @@ index b41d08c..a5ed371 100755
|
||||
echo -n "packaging $(echo "$SDK" | sed -E "s/(.sdk|.pkg)//g") SDK "
|
||||
echo "(this may take several minutes) ..."
|
||||
|
||||
@@ -174,7 +175,7 @@ for SDK in $SDKS; do
|
||||
@@ -220,7 +221,7 @@ for SDK in $SDKS; do
|
||||
fi
|
||||
|
||||
TMP=$(mktemp -d /tmp/XXXXXXXXXXX)
|
||||
@@ -50,12 +50,12 @@ index b41d08c..a5ed371 100755
|
||||
|
||||
pushd "$XCODEDIR" &>/dev/null
|
||||
|
||||
@@ -205,4 +206,4 @@ popd &>/dev/null
|
||||
@@ -255,4 +256,4 @@ popd &>/dev/null
|
||||
popd &>/dev/null
|
||||
|
||||
echo ""
|
||||
-ls -lh | grep MacOSX
|
||||
+ls -lh *.*.sdk.*
|
||||
--
|
||||
2.34.1
|
||||
2.39.2
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
m4_dnl These settings must be kept in sync between toolchain and worker
|
||||
m4_define(`DEBIAN_CLANG',-14)m4_dnl
|
||||
m4_define(`XOS_SDK_VERSION',16.1)m4_dnl
|
||||
m4_define(`XOS_SDK_VERSION',16.4)m4_dnl
|
||||
m4_define(`XOS_DEPLOYMENT_TARGET',9.0)m4_dnl
|
||||
|
||||
m4_define(`XOS_SDK_BASE',AppleTVOS)m4_dnl
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
m4_dnl These settings must be kept in sync between toolchain and worker
|
||||
m4_define(`DEBIAN_CLANG',-14)m4_dnl
|
||||
m4_define(`XOS_SDK_VERSION',16.2)m4_dnl
|
||||
m4_define(`XOS_SDK_VERSION',16.4)m4_dnl
|
||||
m4_define(`XOS_DEPLOYMENT_TARGET',7.0)m4_dnl
|
||||
|
||||
m4_define(`XOS_SDK_BASE',iPhoneOS)m4_dnl
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
m4_dnl These settings must be kept in sync between toolchain and worker
|
||||
m4_define(`DEBIAN_CLANG',-14)m4_dnl
|
||||
m4_define(`MACOSX_SDK_VERSION',13.1)m4_dnl
|
||||
m4_define(`MACOSX_SDK_VERSION',13.3)m4_dnl
|
||||
m4_define(`MACOSX_TARGET_ARCH',aarch64)m4_dnl
|
||||
m4_define(`MACOSX_TARGET_VERSION',22.2)m4_dnl
|
||||
m4_define(`MACOSX_TARGET_VERSION',22.4)m4_dnl
|
||||
m4_define(`MACOSX_DEPLOYMENT_TARGET',10.16)m4_dnl
|
||||
m4_define(`MACOSX_ARCHITECTURES',`arm64')m4_dnl
|
||||
m4_define(`MACOSX_PORTS_ARCH_ARG',`--arm64')m4_dnl
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
m4_dnl These settings must be kept in sync between toolchain and worker
|
||||
m4_define(`DEBIAN_CLANG',-14)m4_dnl
|
||||
m4_define(`MACOSX_SDK_VERSION',13.1)m4_dnl
|
||||
m4_define(`MACOSX_SDK_VERSION',13.3)m4_dnl
|
||||
m4_define(`MACOSX_TARGET_ARCH',x86_64)m4_dnl
|
||||
m4_define(`MACOSX_TARGET_VERSION',22.2)m4_dnl
|
||||
m4_define(`MACOSX_TARGET_VERSION',22.4)m4_dnl
|
||||
m4_define(`MACOSX_DEPLOYMENT_TARGET',10.9)m4_dnl
|
||||
m4_define(`MACOSX_ARCHITECTURES',`x86_64')m4_dnl
|
||||
m4_define(`MACOSX_PORTS_ARCH_ARG',`')m4_dnl
|
||||
|
||||
@@ -2,7 +2,7 @@ FROM toolchains/appletv AS toolchain
|
||||
|
||||
m4_dnl These settings must be kept in sync between toolchain and worker
|
||||
m4_define(`DEBIAN_CLANG',-14)m4_dnl
|
||||
m4_define(`XOS_SDK_VERSION',16.1)m4_dnl
|
||||
m4_define(`XOS_SDK_VERSION',16.4)m4_dnl
|
||||
m4_define(`XOS_DEPLOYMENT_TARGET',9.0)m4_dnl
|
||||
|
||||
m4_define(`XOS_SDK_BASE',AppleTVOS)m4_dnl
|
||||
|
||||
@@ -2,7 +2,7 @@ FROM toolchains/iphone AS toolchain
|
||||
|
||||
m4_dnl These settings must be kept in sync between toolchain and worker
|
||||
m4_define(`DEBIAN_CLANG',-14)m4_dnl
|
||||
m4_define(`XOS_SDK_VERSION',16.2)m4_dnl
|
||||
m4_define(`XOS_SDK_VERSION',16.4)m4_dnl
|
||||
m4_define(`XOS_DEPLOYMENT_TARGET',7.0)m4_dnl
|
||||
|
||||
m4_define(`XOS_SDK_BASE',iPhoneOS)m4_dnl
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
m4_define(`TOOLCHAIN',macosx-arm64)m4_dnl
|
||||
m4_dnl These settings must be kept in sync between toolchain and worker
|
||||
m4_define(`DEBIAN_CLANG',-14)m4_dnl
|
||||
m4_define(`MACOSX_SDK_VERSION',13.1)m4_dnl
|
||||
m4_define(`MACOSX_SDK_VERSION',13.3)m4_dnl
|
||||
m4_define(`MACOSX_TARGET_ARCH',aarch64)m4_dnl
|
||||
m4_define(`MACOSX_TARGET_VERSION',22.2)m4_dnl
|
||||
m4_define(`MACOSX_TARGET_VERSION',22.4)m4_dnl
|
||||
m4_define(`MACOSX_DEPLOYMENT_TARGET',10.16)m4_dnl
|
||||
m4_define(`MACOSX_ARCHITECTURES',`arm64')m4_dnl
|
||||
m4_define(`MACOSX_PORTS_ARCH_ARG',`--arm64')m4_dnl
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
m4_define(`TOOLCHAIN',macosx-x86_64)m4_dnl
|
||||
m4_dnl These settings must be kept in sync between toolchain and worker
|
||||
m4_define(`DEBIAN_CLANG',-14)m4_dnl
|
||||
m4_define(`MACOSX_SDK_VERSION',13.1)m4_dnl
|
||||
m4_define(`MACOSX_SDK_VERSION',13.3)m4_dnl
|
||||
m4_define(`MACOSX_TARGET_ARCH',x86_64)m4_dnl
|
||||
m4_define(`MACOSX_TARGET_VERSION',22.2)m4_dnl
|
||||
m4_define(`MACOSX_TARGET_VERSION',22.4)m4_dnl
|
||||
m4_define(`MACOSX_DEPLOYMENT_TARGET',10.9)m4_dnl
|
||||
m4_define(`MACOSX_ARCHITECTURES',`x86_64')m4_dnl
|
||||
m4_define(`MACOSX_PORTS_ARCH_ARG',`')m4_dnl
|
||||
|
||||
Reference in New Issue
Block a user