Adding patch

This commit is contained in:
Daniel Ziltener 2020-09-27 15:42:24 +02:00
parent 16b0117603
commit 90fa480cdc
3 changed files with 28 additions and 2 deletions

View File

@ -24,7 +24,8 @@ jobs:
Remove-Item -Force chicken.tar
mv chicken-* chickenbuild
- run: C:\tools\msys64\usr\bin\env MSYSTEM=MINGW64 /bin/bash -l -c 'pacman -S --needed --noconfirm pactoys'
- run: C:\tools\msys64\usr\bin\env MSYSTEM=MINGW64 /bin/bash -l -c 'pacboy -Sy --needed --noconfirm binutils:x make:x gcc:x gettext:x readline:x'
- run: C:\tools\msys64\usr\bin\env MSYSTEM=MINGW64 /bin/bash -l -c 'pacboy -Sy --needed --noconfirm binutils:x make:x gcc:x gettext:x readline:x patch:x'
- run: C:\tools\msys64\usr\bin\env MSYSTEM=MINGW64 /bin/bash -l -c 'patch -p1 chicken.h /c/Users/circleci/project/chicken_h_explicit_char.patch'
- run: C:\tools\msys64\usr\bin\env MSYSTEM=MINGW64 /bin/bash -l -c "export CFLAGS='-O2 -Wno-unused-variable -Wno-unused-but-set-variable'; mingw32-make PLATFORM=mingw-msys ARCH=x86-64 PREFIX=C:/tools/chicken -C /c/Users/circleci/project/chickenbuild"
- run: .\build.ps1
- run: choco apikey --key $Env:CHOCO_API_KEY --source https://push.chocolatey.org

View File

@ -0,0 +1,25 @@
diff -urN chicken-5.2.0.orig/chicken.h chicken-5.2.0/chicken.h
--- chicken-5.2.0.orig/chicken.h 2020-02-29 14:41:06.000000000 +0100
+++ chicken-5.2.0/chicken.h 2020-09-27 14:33:57.683954279 +0200
@@ -1483,17 +1483,17 @@
#ifdef C_BIG_ENDIAN
# ifdef C_SIXTY_FOUR
# define C_lihdr(x, y, z) ((C_LAMBDA_INFO_TYPE >> 56) & 0xff), \
- 0, 0, 0, 0, (x), (y), (z)
+ 0, 0, 0, 0, (x), (y), ((C_char)(z))
# else
# define C_lihdr(x, y, z) ((C_LAMBDA_INFO_TYPE >> 24) & 0xff), \
- (x), (y), (z)
+ (x), (y), ((C_char)(z))
# endif
#else
# ifdef C_SIXTY_FOUR
-# define C_lihdr(x, y, z) (z), (y), (x), 0, 0, 0, 0, \
+# define C_lihdr(x, y, z) ((C_char)(z)), (y), (x), 0, 0, 0, 0, \
((C_LAMBDA_INFO_TYPE >> 56) & 0xff)
# else
-# define C_lihdr(x, y, z) (z), (y), (x), \
+# define C_lihdr(x, y, z) ((C_char)(z)), (y), (x), \
((C_LAMBDA_INFO_TYPE >> 24) & 0xff)
# endif
#endif

View File

@ -1,5 +1,5 @@
C:\tools\msys64\usr\bin\env MSYSTEM=MINGW64 /bin/bash -l -c 'pacman -S --needed --noconfirm pactoys'
C:\tools\msys64\usr\bin\env MSYSTEM=MINGW64 /bin/bash -l -c 'pacboy -Sy --needed --noconfirm binutils:x make:x gcc:x gettext:x readline:x'
C:\tools\msys64\usr\bin\env MSYSTEM=MINGW64 /bin/bash -l -c 'pacboy -Sy --needed --noconfirm binutils:x make:x gcc:x gettext:x readline:x patch:x'
New-Item $(Get-ToolsLocation) -ItemType Directory
Move-Item $env:chocolateyPackageFolder\tools $(Get-ToolsLocation)\chicken -Force
Install-ChocolateyEnvironmentVariable -VariableName "CHICKEN_PREFIX" -VariableValue "$(Get-ToolsLocation)\chicken" -VariableType Machine