summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMathew Robinson <chasinglogic@gmail.com>2018-12-18 15:12:40 -0500
committerMathew Robinson <chasinglogic@gmail.com>2019-01-02 11:36:54 -0500
commitdb3fc1eba2ca7c8089daa586c037000cfcc715d6 (patch)
tree97f23ce387cf46991c6462bba69dd9413e501005 /src
parent94f6c4d2832e4ec88b30045ceb1907af54725c78 (diff)
downloadmongo-db3fc1eba2ca7c8089daa586c037000cfcc715d6.tar.gz
SERVER-32413 Update pcre_get_sources.sh to incorporate patches
Diffstat (limited to 'src')
-rw-r--r--src/third_party/pcre-8.42/patches/0001-SERVER-38002-Fix-typo-in-HAVE_STRTOLL-define.patch29
-rw-r--r--src/third_party/scripts/pcre_get_sources.sh10
2 files changed, 39 insertions, 0 deletions
diff --git a/src/third_party/pcre-8.42/patches/0001-SERVER-38002-Fix-typo-in-HAVE_STRTOLL-define.patch b/src/third_party/pcre-8.42/patches/0001-SERVER-38002-Fix-typo-in-HAVE_STRTOLL-define.patch
new file mode 100644
index 00000000000..e267bb68cfe
--- /dev/null
+++ b/src/third_party/pcre-8.42/patches/0001-SERVER-38002-Fix-typo-in-HAVE_STRTOLL-define.patch
@@ -0,0 +1,29 @@
+From 4194a80db9aad98d370840c69e0b8084b7768adc Mon Sep 17 00:00:00 2001
+From: Mathew Robinson <chasinglogic@gmail.com>
+Date: Sat, 15 Dec 2018 11:39:19 -0500
+Subject: [PATCH] SERVER-38002 Fix typo in HAVE_STRTOLL define
+
+---
+ src/third_party/pcre-8.42/build_posix/config.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/third_party/pcre-8.42/build_posix/config.h b/src/third_party/pcre-8.42/build_posix/config.h
+index f16a434edb..7476947999 100644
+--- a/src/third_party/pcre-8.42/build_posix/config.h
++++ b/src/third_party/pcre-8.42/build_posix/config.h
+@@ -122,10 +122,10 @@ sure both macros are undefined; an emulation function will then be used. */
+ /* #undef HAVE_STRTOIMAX */
+
+ /* Define to 1 if you have `strtoll'. */
+-/* #undef HAVE_STRTOLL */
++#define HAVE_STRTOLL 1
+
+ /* Define to 1 if you have `strtoq'. */
+-#define HAVE_STRTOQ 1
++/* #define HAVE_STRTOQ 1 */
+
+ /* Define to 1 if you have the <sys/stat.h> header file. */
+ #define HAVE_SYS_STAT_H 1
+--
+2.20.0
+
diff --git a/src/third_party/scripts/pcre_get_sources.sh b/src/third_party/scripts/pcre_get_sources.sh
index cf6a2acd88d..6f62740bcd6 100644
--- a/src/third_party/scripts/pcre_get_sources.sh
+++ b/src/third_party/scripts/pcre_get_sources.sh
@@ -16,13 +16,17 @@ if [ "$#" -ne 0 ]; then
exit 1
fi
+
VERSION=8.42
NAME=pcre
TARBALL=$NAME-$VERSION.tar.gz
TARBALL_DIR=$NAME-$VERSION
TEMP_DIR=$(mktemp -d /tmp/pcre.XXXXXX)
trap "rm -rf $TEMP_DIR" EXIT
+OLD_DIR=$(find $(git rev-parse --show-toplevel)/src/third_party -name 'pcre-*' -type d)
+OLD_PATCH_DIR="$OLD_DIR/patches"
DEST_DIR=$(git rev-parse --show-toplevel)/src/third_party/$NAME-$VERSION
+PATCH_DIR="$DEST_DIR/patches"
UNAME=$(uname | tr A-Z a-z)
if [ $UNAME == "sunos" ]; then
@@ -98,3 +102,9 @@ fi
# Copy over config.h
mkdir $DEST_DIR/build_$TARGET_UNAME || true
cp $TEMP_DIR/config.h $DEST_DIR/build_$TARGET_UNAME
+cp -R $OLD_PATCH_DIR $PATCH_DIR
+
+cd $DEST_DIR
+for patchfile in $PATCH_DIR/*; do
+ patch -p4 < $patchfile
+done