Skip to content

Commit 32c06e4

Browse files
committed
Patch snappy build for effected lines
1 parent 112abad commit 32c06e4

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

compile.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1548,6 +1548,9 @@ rm -f ./aclocal.m4 >> "$DIR/install.log" 2>&1
15481548
rm -rf ./autom4te.cache/ >> "$DIR/install.log" 2>&1
15491549
rm -f ./configure >> "$DIR/install.log" 2>&1
15501550

1551+
# Patch files for snappy, the effected lines causing the build to fail.
1552+
patch "$BUILD_DIR/php/ext/snappy/config.m4" "$DIR/patches/config.m4.patch" >> "$DIR/install.log" 2>&1
1553+
15511554
./buildconf --force >> "$DIR/install.log" 2>&1
15521555

15531556
#hack for curl with pkg-config (ext/curl doesn't give --static to pkg-config on static builds)

patches/config.m4.patch

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
--- config.m4.pre 2025-08-20 14:18:06.006163171 +0800
2+
+++ config.m4.new 2025-08-20 14:18:51.560920972 +0800
3+
@@ -54,16 +54,7 @@
4+
-L$LIBSNAPPY_LIBDIR
5+
])
6+
7+
- AC_LANG_PUSH([C++])
8+
- AC_RUN_IFELSE([
9+
- AC_LANG_PROGRAM(
10+
- [#include <stdio.h>
11+
- #include <snappy-stubs-public.h>],
12+
- [printf("%d.%d.%d\n", SNAPPY_MAJOR, SNAPPY_MINOR, SNAPPY_PATCHLEVEL)])],
13+
- [cw_cv_system_version=$(./conftest$EXEEXT)],
14+
- [AC_MSG_ERROR(Failed to compile a version program!?)])
15+
- AC_LANG_POP([C++])
16+
- eval "LIBSNAPPY_VERSON=$cw_cv_system_version"
17+
+ eval "LIBSNAPPY_VERSON=1.2.2"
18+
19+
AC_DEFINE_UNQUOTED(SNAPPY_LIB_VERSION, "$LIBSNAPPY_VERSON", [ ])
20+

0 commit comments

Comments
 (0)