summaryrefslogtreecommitdiffstats
path: root/graphics/photoqt/photoqt.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/photoqt/photoqt.SlackBuild')
-rw-r--r--graphics/photoqt/photoqt.SlackBuild29
1 files changed, 22 insertions, 7 deletions
diff --git a/graphics/photoqt/photoqt.SlackBuild b/graphics/photoqt/photoqt.SlackBuild
index 7463b80cff..111123fd8d 100644
--- a/graphics/photoqt/photoqt.SlackBuild
+++ b/graphics/photoqt/photoqt.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for photoqt
-# Copyright 2013-2018 Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy
+# Copyright 2013-2023 Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +22,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=photoqt
-VERSION=${VERSION:-1.7.1}
+VERSION=${VERSION:-3.4}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +38,14 @@ if [ -z "$ARCH" ]; then
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}
@@ -54,12 +64,14 @@ else
LIBDIRSUFFIX=""
fi
+if pkg-config --exists mpv; then MPV=ON; else MPV=OFF; fi
if pkg-config --exists exiv2; then EXIV2=ON; else EXIV2=OFF; fi
if pkg-config --exists GraphicsMagick; then GM=ON; else GM=OFF; fi
if pkg-config --exists libraw; then RAW=ON; else RAW=OFF; fi
if pkg-config --exists IL; then DEVIL=ON; else DEVIL=OFF; fi
if pkg-config --exists poppler-qt5; then POPPLER=ON; else POPPLER=OFF; fi
if [ -f /usr/include/FreeImage.h ]; then FREEIMAGE=ON; else FREEIMAGE=OFF; fi
+FREEIMAGE=OFF # FreeImage support looks broken ATM so it's forced to OFF
set -e
@@ -77,18 +89,21 @@ 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 {} \;
+sed -i "s|exiv2lib|exiv2|" CMakeLists.txt
+
mkdir -p build
cd build
cmake \
- -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DEXIV2=$EXIV2 \
- -DGM=$GM \
+ -DGRAPHICSMAGICK=$GM \
-DRAW=$RAW \
-DDEVIL=$DEVIL \
-DPOPPLER=$POPPLER \
-DFREEIMAGE=$FREEIMAGE \
+ -DVIDEO_MPV=$MPV \
+ -DCHROMECAST=NO \
-DCMAKE_BUILD_TYPE=Release ..
make
make install DESTDIR=$PKG
@@ -106,4 +121,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