|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
#!/bin/bash |
|
|
|
|
# Build script for Slackware |
|
|
|
|
# Copyright (C) 2011,2014,2016,2017 Damien Goutte-Gattat |
|
|
|
|
# Copyright (C) 2011,2014,2016,2017,2019 Damien Goutte-Gattat |
|
|
|
|
# |
|
|
|
|
# Redistribution and use of this script, with or without modifications, |
|
|
|
|
# is permitted provided that the following conditions are met: |
|
|
|
@ -24,11 +24,11 @@
|
|
|
|
|
# |
|
|
|
|
# Latest gmic sourcecode is available at: <http://gmic.eu/>. |
|
|
|
|
# |
|
|
|
|
# Depends: l/opencv |
|
|
|
|
# Depends: l/opencv, l/qt5 |
|
|
|
|
|
|
|
|
|
# Source package infos |
|
|
|
|
NAMESRC=${NAMESRC:-gmic} |
|
|
|
|
VERSION=${VERSION:-1.7.9} |
|
|
|
|
VERSION=${VERSION:-2.7.5} |
|
|
|
|
ARCHIVE=${ARCHIVE:-${NAMESRC}_$VERSION.tar.gz} |
|
|
|
|
WGET=${WGET:-http://gmic.eu/files/source/$ARCHIVE} |
|
|
|
|
|
|
|
|
@ -80,36 +80,24 @@ fi
|
|
|
|
|
sha256sum -c $ARCHIVE.sha256 |
|
|
|
|
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1) |
|
|
|
|
|
|
|
|
|
# Download the gmic-community code |
|
|
|
|
# (Could one of the GMIC developers tell me the point of |
|
|
|
|
# making a tarball release while leaving some essential |
|
|
|
|
# files OUTSIDE OF THE FUCKING TARBALL?) |
|
|
|
|
if [ ! -r gmic-community.tar.gz ]; then |
|
|
|
|
git clone https://github.com/dtschump/gmic-community.git |
|
|
|
|
cd gmic-community |
|
|
|
|
git archive --format=tar --prefix=gmic-community/ \ |
|
|
|
|
42d16ee2aa4f0aff6e81eb5f12f5193151ba7640 | \ |
|
|
|
|
gzip -c > ../gmic-community.tar.gz |
|
|
|
|
cd .. |
|
|
|
|
rm -rf gmic-community |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
# Compile |
|
|
|
|
cd $TMP |
|
|
|
|
echo "Building $ARCHIVE..." |
|
|
|
|
tar xf $CWD/$ARCHIVE |
|
|
|
|
tar xf $CWD/gmic-community.tar.gz |
|
|
|
|
sed -i 's,^ GMIC_PATH = ../../gmic/src/, GMIC_PATH = ../../gmic-1.7.9/src/,' gmic-community/zart/zart.pro |
|
|
|
|
cd $NAME/src |
|
|
|
|
CFLAGS=$CPUOPT \ |
|
|
|
|
CXXFLAGS=$CPUOPT \ |
|
|
|
|
make -j $JOBS |
|
|
|
|
make -j $JOBS \ |
|
|
|
|
OPENCV_CFLAGS="-Dcimg_use_opencv -I/usr/include/opencv4" \ |
|
|
|
|
OPENCV_LIBS="-lopencv_core -lopencv_highgui -lopencv_videoio" \ |
|
|
|
|
QMAKE=qmake-qt5 \ |
|
|
|
|
cli lib libc gimp |
|
|
|
|
make install LIB=lib$LIBDIRSUFFIX DESTDIR=$PKG |
|
|
|
|
|
|
|
|
|
# Install the docs |
|
|
|
|
mkdir -p $PKG/usr/doc/$NAME |
|
|
|
|
install -m 644 ../COPYING ../README $PKG/usr/doc/$NAME |
|
|
|
|
mv $PKG/usr/share/man $PKG/usr/man |
|
|
|
|
rmdir $PKG/usr/share |
|
|
|
|
|
|
|
|
|
# Copy slack-desc file |
|
|
|
|
install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc |
|
|
|
@ -117,6 +105,7 @@ install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc
|
|
|
|
|
# Add dependency infos |
|
|
|
|
cat <<EOF > $PKG/install/slack-required |
|
|
|
|
opencv |
|
|
|
|
qt5 |
|
|
|
|
EOF |
|
|
|
|
|
|
|
|
|
# Package the tree |
|
|
|
|