diff options
Diffstat (limited to 'multimedia/ccextractor/ccextractor.SlackBuild')
-rw-r--r-- | multimedia/ccextractor/ccextractor.SlackBuild | 69 |
1 files changed, 37 insertions, 32 deletions
diff --git a/multimedia/ccextractor/ccextractor.SlackBuild b/multimedia/ccextractor/ccextractor.SlackBuild index c7825134a4..8e072caee8 100644 --- a/multimedia/ccextractor/ccextractor.SlackBuild +++ b/multimedia/ccextractor/ccextractor.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for ccextractor -# Copyright 2019 Matt Dinslage, Springfield, MO +# Copyright 2023 Matt Dinslage, Springfield MO # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=ccextractor VERSION=${VERSION:-0.94} -BUILD=${BUILD:-1} +BUILD=${BUILD:-4} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -38,9 +38,6 @@ if [ -z "$ARCH" ]; then esac fi -# 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 @@ -64,20 +61,14 @@ else LIBDIRSUFFIX="" fi -if [ "${GUI:-yes}" = "yes" ]; then - gui="--with-gui" -else - gui="" -fi - set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar -xvf $CWD/$PRGNAM-$VERSION.tar.gz -cd $PRGNAM-$VERSION/linux +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -85,30 +76,44 @@ 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 {} \; -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ -./autogen.sh -./configure \ - --prefix=/usr \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --enable-static=no \ - --docdir=/usr/doc/$PRGNAM-$VERSION \ - --without-rust \ - --enable-hardsubx \ - --enable-ffmpeg \ - --enable-ocr \ - --build=$ARCH-slackware-linux - -make -make install DESTDIR=$PKG +# Fix libdir +if [ "$ARCH" = "x86_64" ]; then +sed -i \ + -e 's|${prefix}/lib|${prefix}/lib64|g' \ + -e 's|lib/pkgconfig|lib64/pkgconfig|g' \ + -e 's|lib)|lib64)|g' \ + src/lib_ccx/CMakeLists.txt +fi + +# Fix building with new leptonica +patch -p1 < $CWD/leptonica-1.83.1.patch + +mkdir -p build +cd build + cmake ../src \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIB_SUFFIX=${LIBDIRSUFFIX} \ + -DMAN_INSTALL_DIR=/usr/man \ + -DWITHOUT_RUST=ON \ + -DWITH_OCR=ON \ + -DWITH_HARDSUBX=ON \ + -DWITH_FFMPEG=ON \ + -DCMAKE_BUILD_TYPE=Release .. + make + make install/strip DESTDIR=$PKG +cd .. + +rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a ../LICENSE.txt ../README.md $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + LICENSE.txt README.md \ + $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install |