Skip to content

Commit d29abe0

Browse files
committed
Apply the patch instead of using a forked vcpkg repo
1 parent 92bb395 commit d29abe0

File tree

3 files changed

+42
-26
lines changed

3 files changed

+42
-26
lines changed

pkg/mac/build-static-library.sh

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,21 @@ else
3434
exit 1
3535
fi
3636

37-
# Use a forked version of vcpkg to support building libcurl with IPv6 disabled
38-
rm -rf vcpkg
39-
git clone https://github.com/BewareMyPower/vcpkg.git -b curl-8.4.0-osx-patch
40-
git apply vcpkg-osx-json.diff
37+
# Apply the patch to support building libcurl with IPv6 disabled
38+
COMMIT_ID=$(grep "builtin-baseline" vcpkg.json | sed 's/"//g' | sed 's/,//' | awk '{print $2}')
39+
cd vcpkg
40+
git reset --hard $COMMIT_ID
41+
git apply ../pkg/mac/vcpkg-curl-patch.diff
42+
git add ports/curl
43+
git commit -m "Disable IPv6 for macOS in curl"
44+
./bootstrap-vcpkg.sh
45+
./vcpkg x-add-version --all
46+
git add versions/
47+
git commit -m "Update version"
48+
COMMIT_ID=$(git log --pretty=oneline | head -n 1 | awk '{print $1}')
49+
cd ..
50+
sed -i.bak "s/.*builtin-baseline.*/ \"builtin-baseline\": \"$COMMIT_ID\",/" vcpkg.json
51+
sed -i.bak "s/\"version>=\": \"8\.4\.0\"/\"version>=\": \"8.4.0#1\"/" vcpkg.json
4152

4253
INSTALL_DIR=$PWD/pkg/mac/.install
4354
set -x

pkg/mac/vcpkg-curl-patch.diff

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake
2+
index bdc544e9e..340d93865 100644
3+
--- a/ports/curl/portfile.cmake
4+
+++ b/ports/curl/portfile.cmake
5+
@@ -64,6 +64,10 @@ if(VCPKG_TARGET_IS_WINDOWS)
6+
list(APPEND OPTIONS -DENABLE_UNICODE=ON)
7+
endif()
8+
9+
+if(VCPKG_TARGET_IS_OSX)
10+
+ list(APPEND OPTIONS -DENABLE_IPV6=OFF)
11+
+endif()
12+
+
13+
vcpkg_cmake_configure(
14+
SOURCE_PATH "${SOURCE_PATH}"
15+
OPTIONS
16+
diff --git a/ports/curl/vcpkg.json b/ports/curl/vcpkg.json
17+
index e028d3897..a63858e34 100644
18+
--- a/ports/curl/vcpkg.json
19+
+++ b/ports/curl/vcpkg.json
20+
@@ -1,6 +1,7 @@
21+
{
22+
"name": "curl",
23+
"version": "8.4.0",
24+
+ "port-version": 1,
25+
"description": "A library for transferring data with URLs",
26+
"homepage": "https://curl.se/",
27+
"license": "curl AND ISC AND BSD-3-Clause",

vcpkg-osx-json.diff

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)