ccache: avoid doctest.h Internet download
by lucabon from LinuxQuestions.org on (#6NE3J)
In the latest release of ccache (4.10), "doctest.h" header is needed for build. I think it will be better to have it in the source instead of download it from Internet.
The link to the file is:
https://github.com/doctest/doctest/r...4.11/doctest.h
And the SlackBuild could be modified in this way:
Code:--- ccache.SlackBuild.orig 2021-08-21 04:56:51.689316416 +0200
+++ ccache.SlackBuild 2024-06-10 20:08:35.973679831 +0200
@@ -63,6 +63,10 @@
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
+# Add doctest include, avoid download from Internet:
+mkdir doctest
+cp $CWD/doctest.h doctest/
+
# Configure, build, and install:
mkdir cmake-build
cd cmake-build
@@ -74,6 +78,7 @@
-DDOC_INSTALL_DIR="doc" \
-DCMAKE_INSTALL_MANDIR=/usr/man \
-DREDIS_STORAGE_BACKEND=OFF \
+ -DDOCTEST_INCLUDE_DIR=$TMP/ccache-$VERSION \
.. || exit 1
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
The link to the file is:
https://github.com/doctest/doctest/r...4.11/doctest.h
And the SlackBuild could be modified in this way:
Code:--- ccache.SlackBuild.orig 2021-08-21 04:56:51.689316416 +0200
+++ ccache.SlackBuild 2024-06-10 20:08:35.973679831 +0200
@@ -63,6 +63,10 @@
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
+# Add doctest include, avoid download from Internet:
+mkdir doctest
+cp $CWD/doctest.h doctest/
+
# Configure, build, and install:
mkdir cmake-build
cd cmake-build
@@ -74,6 +78,7 @@
-DDOC_INSTALL_DIR="doc" \
-DCMAKE_INSTALL_MANDIR=/usr/man \
-DREDIS_STORAGE_BACKEND=OFF \
+ -DDOCTEST_INCLUDE_DIR=$TMP/ccache-$VERSION \
.. || exit 1
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1