summaryrefslogtreecommitdiffstats
path: root/handbrake
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2015-10-02 10:22:59 +0000
committer Eric Hameleers <alien@slackware.com>2015-10-02 10:22:59 +0000
commitf7b83089c2a9584093f6a180775294cce708dc37 (patch)
tree149e227e216139c4c4453d11f5f8873b6b6fdc88 /handbrake
parent39152ff2a42535609d04a9c08bb2193bb5477062 (diff)
downloadasb-f7b83089c2a9584093f6a180775294cce708dc37.tar.gz
asb-f7b83089c2a9584093f6a180775294cce708dc37.tar.xz
handbrake: add a WITH_GUI variable that allows to skip compiling the GTK+3 based GUI program
Diffstat (limited to 'handbrake')
-rwxr-xr-xhandbrake/build/handbrake.SlackBuild59
1 files changed, 36 insertions, 23 deletions
diff --git a/handbrake/build/handbrake.SlackBuild b/handbrake/build/handbrake.SlackBuild
index 23ce2231..4ef36483 100755
--- a/handbrake/build/handbrake.SlackBuild
+++ b/handbrake/build/handbrake.SlackBuild
@@ -68,6 +68,11 @@ RELREV=${RELREV:-""}
BUILD=${BUILD:-1}
TAG=${TAG:-alien}
+# Do you want to compile the GTK+3 based GUI (ghb) or just HandBrakeCLI ?
+# By default the script compiles the GUI but that will fail if your GTK+3
+# is not new enough.
+WITH_GUI=${WITH_GUI:-"YES"}
+
DOCS="AUTHORS BUILD COPYING* CREDITS NEWS THANKS TRANSLATIONS"
CONTRIBURL="http://download.handbrake.fr/handbrake/contrib"
@@ -319,6 +324,12 @@ cd -
# it's gone in git master and replaced by the one we just added:
rm contrib/lame/P00-darwin-xmmintrin.patch
+if [ "$WITH_GUI" = "YES" -o "$WITH_GUI" = "yes" ]; then
+ GUI_OPTS="--disable-gtk-update-checks"
+else
+ GUI_OPTS="--disable-gtk"
+fi
+
mkdir download
for FF in $(seq 1 $(( ${#SOURCE[@]} -1 ))); do
cp ${SOURCE[$FF]} download/
@@ -328,42 +339,43 @@ chmod -R u+w,go+r-w,a+X-s .
echo Building ...
-# This will build the commandline and GTK programs
+# This will build the commandline and GTK (if requested) programs:
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
LDFLAGS="$SLKLDFLAGS" \
./configure \
--prefix=/usr \
- --disable-gtk-update-checks \
--launch --launch-jobs=0 \
+ ${GUI_OPTS} \
2>&1 | tee $OUTPUT/configure-${PRGNAM}.log
-# Compile and install the GTK gui and commandline client:
+# Compile and install the GTK gui (if requested) and commandline client:
cd build
make 2>&1 | tee $OUTPUT/make-${PRGNAM}.log
make install DESTDIR=$PKG
cd -
-# Add application bitmaps, not just a SVG:
-for i in 16 24 32 48 64 96 128; do
- mkdir -p $PKG/usr/share/icons/hicolor/${i}x${i}/apps
- convert $PKG/usr/share/icons/hicolor/scalable/apps/hb-icon.svg \
- -resize ${i}x${i} \
- $PKG/usr/share/icons/hicolor/${i}x${i}/apps/hb-icon.png
-done
-
-# Show an icon in the XFCE menu:
-mkdir -p $PKG/usr/share/pixmaps
-cp -a $PKG/usr/share/icons/hicolor/128x128/apps/hb-icon.png \
- $PKG/usr/share/pixmaps/
-
-# Remove this cache file, it will get in our way:
-[ -f $PKG/usr/share/icons/hicolor/icon-theme.cache ] \
- && rm -f $PKG/usr/share/icons/hicolor/icon-theme.cache
-
-# Add this to the doinst.sh:
-! [ -d $PKG/install ] && mkdir -p $PKG/install
-cat <<EOT >> $PKG/install/doinst.sh
+if [ "$WITH_GUI" = "YES" -o "$WITH_GUI" = "yes" ]; then
+ # Add application bitmaps, not just a SVG:
+ for i in 16 24 32 48 64 96 128; do
+ mkdir -p $PKG/usr/share/icons/hicolor/${i}x${i}/apps
+ convert $PKG/usr/share/icons/hicolor/scalable/apps/hb-icon.svg \
+ -resize ${i}x${i} \
+ $PKG/usr/share/icons/hicolor/${i}x${i}/apps/hb-icon.png
+ done
+
+ # Show an icon in the XFCE menu:
+ mkdir -p $PKG/usr/share/pixmaps
+ cp -a $PKG/usr/share/icons/hicolor/128x128/apps/hb-icon.png \
+ $PKG/usr/share/pixmaps/
+
+ # Remove this cache file, it will get in our way:
+ [ -f $PKG/usr/share/icons/hicolor/icon-theme.cache ] \
+ && rm -f $PKG/usr/share/icons/hicolor/icon-theme.cache
+
+ # Add this to the doinst.sh:
+ ! [ -d $PKG/install ] && mkdir -p $PKG/install
+ cat <<EOT >> $PKG/install/doinst.sh
# Update the desktop database:
if [ -x usr/bin/update-desktop-database ]; then
chroot . /usr/bin/update-desktop-database usr/share/applications > /dev/null 2> /dev/null
@@ -382,6 +394,7 @@ if [ -d usr/share/icons/hicolor ]; then
fi
EOT
+fi # End [ "$WITH_GUI" = "YES" -o "$WITH_GUI" = "yes" ]
# Add documentation:
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/gtk