summaryrefslogtreecommitdiffstats
path: root/libraries/rapidjson
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/rapidjson')
-rw-r--r--libraries/rapidjson/3b2441b8.patch22
-rw-r--r--libraries/rapidjson/fix-build-on-gcc7.diff13
-rw-r--r--libraries/rapidjson/rapidjson.SlackBuild27
-rw-r--r--libraries/rapidjson/rapidjson.info12
-rw-r--r--libraries/rapidjson/slack-desc2
5 files changed, 48 insertions, 28 deletions
diff --git a/libraries/rapidjson/3b2441b8.patch b/libraries/rapidjson/3b2441b8.patch
new file mode 100644
index 0000000000..0799d22aa0
--- /dev/null
+++ b/libraries/rapidjson/3b2441b8.patch
@@ -0,0 +1,22 @@
+From 3b2441b87f99ab65f37b141a7b548ebadb607b96 Mon Sep 17 00:00:00 2001
+From: Janusz Chorko <janusz.chorko@apdu.pl>
+Date: Fri, 26 Aug 2016 21:17:38 +0200
+Subject: [PATCH] Removed non-compiling assignment operator. Fixed #718
+
+---
+ include/rapidjson/document.h | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h
+index e3e20dfbd..b0f1f70be 100644
+--- a/include/rapidjson/document.h
++++ b/include/rapidjson/document.h
+@@ -316,8 +316,6 @@ struct GenericStringRef {
+
+ GenericStringRef(const GenericStringRef& rhs) : s(rhs.s), length(rhs.length) {}
+
+- GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
+-
+ //! implicit conversion to plain CharType pointer
+ operator const Ch *() const { return s; }
+
diff --git a/libraries/rapidjson/fix-build-on-gcc7.diff b/libraries/rapidjson/fix-build-on-gcc7.diff
deleted file mode 100644
index d55a477678..0000000000
--- a/libraries/rapidjson/fix-build-on-gcc7.diff
+++ /dev/null
@@ -1,13 +0,0 @@
-diff -Nur rapidjson-1.1.0.orig/include/rapidjson/internal/regex.h rapidjson-1.1.0/include/rapidjson/internal/regex.h
---- rapidjson-1.1.0.orig/include/rapidjson/internal/regex.h 2016-08-25 02:59:05.000000000 -0500
-+++ rapidjson-1.1.0/include/rapidjson/internal/regex.h 2017-12-27 01:10:17.765316098 -0600
-@@ -29,6 +29,9 @@
- #ifdef __GNUC__
- RAPIDJSON_DIAG_PUSH
- RAPIDJSON_DIAG_OFF(effc++)
-+#if __GNUC__ >= 7
-+RAPIDJSON_DIAG_OFF(implicit-fallthrough)
-+#endif
- #endif
-
- #ifdef _MSC_VER
diff --git a/libraries/rapidjson/rapidjson.SlackBuild b/libraries/rapidjson/rapidjson.SlackBuild
index e1454d89c6..5f6f1c6aab 100644
--- a/libraries/rapidjson/rapidjson.SlackBuild
+++ b/libraries/rapidjson/rapidjson.SlackBuild
@@ -3,6 +3,7 @@
# Slackware build script for RapidJson
# Copyright 2017 Andre Barboza, Belo Horizonte - Brazil
+# Copyright 2024 Jeremy Hansen <jebrhansen+SBo@gmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -29,7 +30,8 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=rapidjson
VERSION=${VERSION:-1.1.0}
-BUILD=${BUILD:-3}
+GTESTVER=${GTESTVER:-ba96d0b1161f540656efdaed035b3c062b60e006}
+BUILD=${BUILD:-5}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -72,6 +74,9 @@ cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
+rmdir thirdparty/gtest/
+tar xvf $CWD/googletest-$GTESTVER.tar.gz
+mv googletest-$GTESTVER thirdparty/gtest
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -79,26 +84,30 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
-# Patch for -current but should be harmless on -stable
-patch -p1 < $CWD/fix-build-on-gcc7.diff
-find -name CMakeLists.txt | xargs sed -e 's|-Werror||' -i
+# Fix for gcc7+
+find -name CMakeLists.txt -exec sed -i 's/ -Werror//g' {} +
+
+# Fix for current
+patch -p1 < $CWD/3b2441b8.patch
mkdir -p build
cd build
cmake \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS -Wno-error" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DLIB_INSTALL_DIR=/usr/lib${LIBDIRSUFFIX} \
+ -DDOC_INSTALL_DIR=/usr/doc/$PRGNAM-$VERSION \
+ -DRAPIDJSON_BUILD_THIRDPARTY_GTEST=ON \
-DCMAKE_BUILD_TYPE=Release ..
make
make install DESTDIR=$PKG
cd ..
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-mv $PKG/usr/share/doc/RapidJSON/* $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a CHANGELOG.md license.txt readme.md readme.zh-cn.md $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ CHANGELOG.md license.txt readme.md readme.zh-cn.md \
+ $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-rmdir --parents $PKG/usr/share/doc/RapidJSON 2>/dev/null || true
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
diff --git a/libraries/rapidjson/rapidjson.info b/libraries/rapidjson/rapidjson.info
index 4eff481a5f..281fa98e7a 100644
--- a/libraries/rapidjson/rapidjson.info
+++ b/libraries/rapidjson/rapidjson.info
@@ -1,10 +1,12 @@
PRGNAM="rapidjson"
VERSION="1.1.0"
-HOMEPAGE="https://github.com/miloyip/rapidjson/"
-DOWNLOAD="https://github.com/miloyip/rapidjson/archive/v1.1.0/rapidjson-1.1.0.tar.gz"
-MD5SUM="badd12c511e081fec6c89c43a7027bce"
+HOMEPAGE="https://github.com/Tencent/rapidjson/"
+DOWNLOAD="https://github.com/Tencent/rapidjson/archive/v1.1.0/rapidjson-1.1.0.tar.gz \
+ https://github.com/google/googletest/archive/ba96d0b/googletest-ba96d0b1161f540656efdaed035b3c062b60e006.tar.gz"
+MD5SUM="badd12c511e081fec6c89c43a7027bce \
+ b629364cd39a2dd886d449d9559da0f1"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
-MAINTAINER="Andre Barboza"
-EMAIL="bmg.andre@gmail.com"
+MAINTAINER="Jeremy Hansen"
+EMAIL="jebrhansen+SBo@@gmail.com"
diff --git a/libraries/rapidjson/slack-desc b/libraries/rapidjson/slack-desc
index 937f0eb30e..cb48eb4d26 100644
--- a/libraries/rapidjson/slack-desc
+++ b/libraries/rapidjson/slack-desc
@@ -15,5 +15,5 @@ rapidjson:
rapidjson:
rapidjson:
rapidjson:
-rapidjson: https://github.com/miloyip/rapidjson
+rapidjson: https://github.com/Tencent/rapidjson
rapidjson: