summaryrefslogtreecommitdiffstats
path: root/multimedia/vobsub2srt/vobsub2srt.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia/vobsub2srt/vobsub2srt.SlackBuild')
-rw-r--r--multimedia/vobsub2srt/vobsub2srt.SlackBuild26
1 files changed, 20 insertions, 6 deletions
diff --git a/multimedia/vobsub2srt/vobsub2srt.SlackBuild b/multimedia/vobsub2srt/vobsub2srt.SlackBuild
index 9fd2f3b0c1..e7da07154d 100644
--- a/multimedia/vobsub2srt/vobsub2srt.SlackBuild
+++ b/multimedia/vobsub2srt/vobsub2srt.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for vobsub2srt
@@ -22,11 +22,14 @@
# 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=vobsub2srt
SRCNAM=VobSub2SRT
VERSION=${VERSION:-1.0pre7}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -36,7 +39,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}
@@ -73,15 +83,18 @@ find -L . \
# patch to build with latest tesseract:
patch -p1 < $CWD/vobsub2srt-c++11.patch
+# fix build with newer g++
+patch -p1 < $CWD/climits.diff
+
mkdir -p build
cd build
cmake \
-DCMAKE_C_FLAGS="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS="$SLKCFLAGS -std=c++11" \
+ -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DINSTALL_DATA_DIR_BASE=/usr/share \
-DINSTALL_DOC_DIR_BASE=/usr/doc \
- -DINSTALL_MAN_DIR=/usr/man \
+ -DINSTALL_MAN_DIR=/usr/man/man1 \
-DCMAKE_BUILD_TYPE=Release ..
make
make install DESTDIR=$PKG
@@ -93,7 +106,8 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+# make install creates the usr/doc/$PRGNAM, so:
+mv $PKG/usr/doc/$PRGNAM $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
COPYING README* \
$PKG/usr/doc/$PRGNAM-$VERSION
@@ -103,4 +117,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
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