summaryrefslogtreecommitdiffstats
path: root/graphics/darktable/darktable.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/darktable/darktable.SlackBuild')
-rw-r--r--graphics/darktable/darktable.SlackBuild42
1 files changed, 35 insertions, 7 deletions
diff --git a/graphics/darktable/darktable.SlackBuild b/graphics/darktable/darktable.SlackBuild
index 5a2f374bbe..2c20db3062 100644
--- a/graphics/darktable/darktable.SlackBuild
+++ b/graphics/darktable/darktable.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for darktable
@@ -22,22 +22,37 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20230510 bkw: use cmake rpath support, so lensfun03 doesn't need
+# /etc/ld.so.conf.d/ any more.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=darktable
-VERSION=${VERSION:-2.4.4}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-4.2.1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+# Slackware's lensfun isn't compatible
+LENSFUN=${LENSFUN:-lensfun03}
if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
# SSE2 instructions are *required* at runtime. That's a proper subset of i686,
# but hopefully forcing i686 in the package name will alert users of older cpus.
+ case "$( uname -m )" in
i?86) ARCH=i686 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
-CWD=$(pwd)
+# 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
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -68,9 +83,15 @@ 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 {} \;
+# If you want to use llvm instead of gcc uncomment the following two lines
+#export CC=clang
+#export CXX=clang++
+
mkdir -p build
cd build
cmake \
+ -DCMAKE_INSTALL_RPATH=/opt/$LENSFUN/lib$LIBDIRSUFFIX \
+ -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
@@ -78,6 +99,10 @@ cd build
-DDONT_USE_INTERNAL_LUA=Off \
-DUSE_LIBSECRET=On \
-DBINARY_PACKAGE_BUILD=1 \
+ -DDONT_USE_INTERNAL_LUA=0 \
+ -DLensFun_INCLUDE_DIR="/opt/$LENSFUN/include/lensfun" \
+ -DLensFun_LIBRARIES="/opt/$LENSFUN/lib$LIBDIRSUFFIX" \
+ -DLensFun_LIBRARY="/opt/$LENSFUN/lib$LIBDIRSUFFIX/liblensfun.so" \
-DCMAKE_BUILD_TYPE=Release ..
VERBOSE=1 make
make install DESTDIR=$PKG
@@ -93,7 +118,10 @@ for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; r
mv $PKG/usr/share/doc $PKG/usr
mv $PKG/usr/doc/$PRGNAM $PKG/usr/doc/$PRGNAM-$VERSION
# Add a few missed docs
-cp -a doc/ChangeLog doc/NEWS doc/TODO $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ CONTRIBUTING.md LICENSE RELEASE_NOTES.md LICENSE AUTHORS \
+ doc/thumbnail*.txt doc/grouping.txt doc/*.md doc/NEWS \
+ $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
( cd $PKG/usr/doc ; ln -s $PRGNAM-$VERSION $PRGNAM )
@@ -102,4 +130,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE