summaryrefslogtreecommitdiffstats
path: root/development
diff options
context:
space:
mode:
author B. Watson2022-04-21 20:21:10 +0200
committer B. Watson2022-04-21 20:21:10 +0200
commita8356efb6d89221048551b7b1562cd702c2e617b (patch)
tree07fe0ff2bc545382825b2fcf17850b30372f0889 /development
parent0055e1a64e216e47fd32ed254a2fedbfe1e0d2d5 (diff)
downloadslackbuilds-a8356efb6d89221048551b7b1562cd702c2e617b.tar.gz
development/Catch: Fix docs; make self-test optional.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'development')
-rw-r--r--development/Catch/Catch.SlackBuild21
-rw-r--r--development/Catch/README4
2 files changed, 18 insertions, 7 deletions
diff --git a/development/Catch/Catch.SlackBuild b/development/Catch/Catch.SlackBuild
index be0ef0653f..5eba4cb477 100644
--- a/development/Catch/Catch.SlackBuild
+++ b/development/Catch/Catch.SlackBuild
@@ -22,11 +22,15 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220421 bkw: Modified by SlackBuilds.org, BUILD=2:
+# - move docs to correct Slackware doc dir.
+# - make the self-tests optional.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=Catch
VERSION=${VERSION:-2.13.8}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -38,9 +42,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -75,9 +76,12 @@ cd ${PRGNAM}2-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
+ -o -perm 511 \) -exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
+
+wanttest=OFF
+[ "${SELFTEST:-no}" = "yes" ] && wanttest=ON
mkdir -p build
cd build
@@ -91,7 +95,7 @@ cd build
-DCATCH_BUILD_EXAMPLES=OFF \
-DCATCH_ENABLE_COVERAGE=OFF \
-DCATCH_ENABLE_WERROR=OFF \
- -DBUILD_TESTING=ON \
+ -DBUILD_TESTING=$wanttest \
-DCMAKE_BUILD_TYPE=Release ..
make
make install DESTDIR=$PKG
@@ -101,6 +105,9 @@ mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a LICENSE.txt README.md docs/ $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+mv $PKG/usr/share/doc/Catch2 $PKG/usr/doc/$PRGNAM-$VERSION &>/dev/null || true
+rm -rf $PKG/usr/share/doc
+
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
diff --git a/development/Catch/README b/development/Catch/README
index 6023fbb3c9..b32660bb25 100644
--- a/development/Catch/README
+++ b/development/Catch/README
@@ -19,3 +19,7 @@ Key features:
Standard C/C++ operators are used for the comparison -
yet the full expression is decomposed and lhs and rhs
values are logged.
+
+Note: To enable Catch's self-tests, export SELFTEST=yes in the
+script's environment. This doesn't affect the binary package that gets
+built.