Skip to content
Merged
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
16 changes: 11 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ jobs:
matrix:
arch: [x86, x64]

defaults:
run:
shell: cmd

steps:
- uses: actions/checkout@v3

Expand All @@ -30,10 +34,13 @@ jobs:
# install MSYS packages
install: make autoconf automake libtool pkg-config

- name: Delete MinGW gmake
# delete /c/Strawberry/c/bin/gmake built for MinGW that is found on runners, because we must use make built for MSYS
run: if GMAKE_PATH=`which gmake`; then rm -f "$GMAKE_PATH"; fi
shell: msys2 {0}
- name: Remove Perl Strawberry installation
# C:\Strawberry contains various MinGW libraries and binaries like pkg-config
# that can get picked up by configure/CMake and don't necessarily behave
# correctly when not using a MinGW environment, and more specifically we cannot
# use MinGW gmake but must use MSYS make for correctly handling of Windows paths,
# so we delete everything that could mess up our builds
run: rmdir /S /Q C:\Strawberry

- name: Install Windows packages
run: choco install ninja
Expand All @@ -49,7 +56,6 @@ jobs:
:: use msys2.cmd from setup-msys2 as Bash shell, as it doesn't have msys2_shell.cmd used normally by build.bat
set "BASH=msys2 -c"
build.bat
shell: cmd

- name: Package release
run: |
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This project comprises a collection of scripts to build a modern GNUstep toolcha

## Libraries

The toolchain currently consists of the following libraries:
The toolchain consists of the following libraries:

- [GNUstep Base Library](https://github.com/gnustep/libs-base) (Foundation)
- [GNUstep CoreBase Library](https://github.com/gnustep/libs-corebase) (CoreFoundation)
Expand All @@ -18,6 +18,7 @@ The toolchain currently consists of the following libraries:
- [libiconv](https://github.com/kiyolee/libiconv-win-build)
- [libxml2](https://github.com/GNOME/libxml2)
- [libxslt](https://github.com/GNOME/libxslt)
- [libcurl](https://github.com/curl/curl)
- [ICU](https://docs.microsoft.com/en-us/windows/win32/intl/international-components-for-unicode--icu-) (using system-provided DLL on Windows 10 version 1903 or later)


Expand Down
19 changes: 19 additions & 0 deletions patches/libdispatch-fix-socket-closed.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
https://github.com/apple/swift-corelibs-libdispatch/pull/772
---
diff --git a/src/event/event_windows.c b/src/event/event_windows.c
index 94674a3..148c9de 100644
--- a/src/event/event_windows.c
+++ b/src/event/event_windows.c
@@ -219,7 +219,11 @@ _dispatch_muxnote_disarm_events(dispatch_muxnote_t dmn,
iResult = WSAEventSelect((SOCKET)dmn->dmn_ident, NULL, 0);
}
if (iResult != 0) {
- DISPATCH_INTERNAL_CRASH(WSAGetLastError(), "WSAEventSelect");
+ // ignore error if socket was already closed
+ int err = WSAGetLastError();
+ if (err != WSAENOTSOCK) {
+ DISPATCH_INTERNAL_CRASH(err, "WSAEventSelect");
+ }
}
dmn->dmn_network_events = lNetworkEvents;
if (!lNetworkEvents && dmn->dmn_threadpool_wait) {
46 changes: 46 additions & 0 deletions phases/19-libcurl.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
@echo off
setlocal

set PROJECT=libcurl
set GITHUB_REPO=curl/curl

:: get the latest release tag from GitHub
cd %~dp0
for /f "usebackq delims=" %%i in (`call %BASH% '../scripts/get-latest-github-release-tag.sh %GITHUB_REPO% curl-'`) do (
set TAG=%%i
)

:: load environment and prepare project
call "%~dp0\..\scripts\common.bat" prepare_project || exit /b 1

cd "%SRCROOT%\%PROJECT%" || exit \b 1

:: generate build config
call "buildconf.bat" || exit \b 1

set BUILD_DIR="%SRCROOT%\%PROJECT%\build-%ARCH%-%BUILD_TYPE%"
if exist "%BUILD_DIR%" (rmdir /S /Q "%BUILD_DIR%" || exit /b 1)
mkdir "%BUILD_DIR%" || exit /b 1
cd "%BUILD_DIR%" || exit /b 1

echo.
echo ### Running cmake
cmake .. %CMAKE_OPTIONS% ^
-D BUILD_SHARED_LIBS=YES ^
-D CURL_USE_SCHANNEL=YES ^
-D BUILD_CURL_EXE=NO ^
|| exit /b 1

echo.
echo ### Building
ninja || exit /b 1

echo.
echo ### Installing
ninja install || exit /b 1

:: install PDB file
xcopy /Y /F lib\libcurl*.pdb "%INSTALL_PREFIX%\bin\" || exit /b 1

:: rename libcurl-d_imp.lib to curl.lib to allow linking using -lcurl
move /y "%INSTALL_PREFIX%\lib\libcurl*.lib" "%INSTALL_PREFIX%\lib\curl.lib" || exit /b 1
2 changes: 1 addition & 1 deletion scripts/common.bat
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ exit /b %errorlevel%
echo.
:: check out tag/branch if any
if not "%TAG%" == "" (
echo ### Checking out %TAG%
echo ### Checking out "%TAG%"
git fetch --tags || exit /b 1
git checkout -q %TAG% || exit /b 1
)
Expand Down