mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-29 16:18:44 +08:00
Add pcre
This commit is contained in:
parent
0f6c0682e1
commit
5e0eb81416
44
recipes/pcre/recipe.sh
Normal file
44
recipes/pcre/recipe.sh
Normal file
@ -0,0 +1,44 @@
|
||||
VERSION=8.42
|
||||
TAR=https://ftp.pcre.org/pub/pcre/pcre-$VERSION.tar.bz2
|
||||
BUILD_DEPENDS=()
|
||||
|
||||
function recipe_version {
|
||||
echo "$VERSION"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_update {
|
||||
echo "skipping update"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_build {
|
||||
sysroot="$(realpath ../sysroot)"
|
||||
export CFLAGS="-I$sysroot/include"
|
||||
export LDFLAGS="-L$sysroot/lib"
|
||||
export LIBS="-Wl,--whole-archive -lpthread -Wl,--no-whole-archive"
|
||||
./configure \
|
||||
--host=${HOST} \
|
||||
--prefix=/ \
|
||||
--disable-shared \
|
||||
--enable-static
|
||||
make -j"$(nproc)"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_test {
|
||||
echo "skipping test"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_clean {
|
||||
make clean
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_stage {
|
||||
dest="$(realpath $1)"
|
||||
make DESTDIR="$dest" install
|
||||
rm -f "$dest/lib/"*.la
|
||||
skip=1
|
||||
}
|
||||
17
recipes/pcre/redox.patch
Normal file
17
recipes/pcre/redox.patch
Normal file
@ -0,0 +1,17 @@
|
||||
diff -ruwN source/pcretest.c source-new/pcretest.c
|
||||
--- source/pcretest.c 2017-06-13 10:49:46.000000000 -0600
|
||||
+++ source-new/pcretest.c 2019-01-05 11:04:15.198224299 -0700
|
||||
@@ -3168,7 +3168,7 @@
|
||||
((stack_size = get_value((pcre_uint8 *)argv[op+1], &endptr)),
|
||||
*endptr == 0))
|
||||
{
|
||||
-#if defined(_WIN32) || defined(WIN32) || defined(__minix) || defined(NATIVE_ZOS) || defined(__VMS)
|
||||
+#if defined(_WIN32) || defined(WIN32) || defined(__minix) || defined(NATIVE_ZOS) || defined(__VMS) || defined(__redox__)
|
||||
printf("PCRE: -S not supported on this OS\n");
|
||||
exit(1);
|
||||
#else
|
||||
@@ -5770,4 +5770,3 @@
|
||||
}
|
||||
|
||||
/* End of pcretest.c */
|
||||
-
|
||||
Loading…
Reference in New Issue
Block a user