diff options
Diffstat (limited to 'multimedia/k9copy-reloaded/k9copy-reloaded.SlackBuild')
-rw-r--r-- | multimedia/k9copy-reloaded/k9copy-reloaded.SlackBuild | 109 |
1 files changed, 21 insertions, 88 deletions
diff --git a/multimedia/k9copy-reloaded/k9copy-reloaded.SlackBuild b/multimedia/k9copy-reloaded/k9copy-reloaded.SlackBuild index aa12e5ddd7288..de7720bde0fb9 100644 --- a/multimedia/k9copy-reloaded/k9copy-reloaded.SlackBuild +++ b/multimedia/k9copy-reloaded/k9copy-reloaded.SlackBuild @@ -29,8 +29,7 @@ PRGNAM=k9copy-reloaded SRCNAM=k9copy VERSION=${VERSION:-3.0.3} -BUILD=${BUILD:-4} -FFMPEG_VERSION=${FFMPEG_VERSION:-2.8.16} +BUILD=${BUILD:-5} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -45,100 +44,27 @@ CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -NUMJOBS=${NUMJOBS:--j7} if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" - # 32bit x86 fails without this... - FFARCHOPTS="--disable-asm" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" - # 32bit x86 fails without this... - FFARCHOPTS="--disable-asm" LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" - FFARCHOPTS="--arch=x86_64 --enable-pic" else SLKCFLAGS="-O2" LIBDIRSUFFIX="" - FFARCHOPTS="" fi -CURRENT=${CURRENT:-no} - set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -if [ "$CURRENT" = "yes" ]; then - # check for gcc5 and abort if not found: - if ! [ -x /usr/bin/gcc-5 ]; then - echo "Cannot find the gcc5 package. Please install the gcc5 package" - echo "and rerun the SlackBuild script." - exit 1 - fi - # Set gcc-5 vars to make it build with gcc5: - # cmake will use these settings to build k9copy-reloaded - source /etc/profile.d/gcc5.sh - # Options for ffmpeg: - GCC5OPTS="--cc=gcc-5 --cxx=g++-5 --ar=gcc-ar-5 --nm=gcc-nm-5 --ranlib=gcc-ranlib-5 --dep-cc=gcc-5" -else - GCC5OPTS="" -fi - -rm -rf ffmpeg* -tar xvf $CWD/ffmpeg-$FFMPEG_VERSION.tar.?z* || exit 1 -cd ffmpeg* || exit 1 - - chown -R root:root . - find . \ - \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ - -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; - - echo "Building static ffmpeg libs ..." - - FFMPEGDIR=/$TMP/ffmpeg-temp - - CFLAGS="$SLKCFLAGS -fvisibility=hidden -I/usr/include/openmj2-2.1" \ - CXXFLAGS="$SLKCFLAGS -fvisibility=hidden -I/usr/include/openmj2-2.1" \ - ./configure \ - --prefix=$FFMPEGDIR/usr \ - $GCC5OPTS \ - --libdir=$FFMPEGDIR/usr/lib${LIBDIRSUFFIX} \ - --shlibdir=$FFMPEGDIR/usr/lib${LIBDIRSUFFIX} \ - --enable-gpl \ - --enable-version3 \ - --enable-postproc \ - --disable-doc \ - --disable-avfilter \ - --disable-avdevice \ - --disable-swresample \ - --disable-ffserver \ - --disable-ffplay \ - --disable-ffmpeg \ - --disable-ffprobe \ - --enable-pthreads \ - --disable-debug \ - --disable-shared \ - --enable-static \ - --enable-hardcoded-tables \ - --enable-memalign-hack \ - --enable-bzlib \ - --enable-zlib \ - --enable-libopenjpeg \ - ${FFARCHOPTS} - - make - make install # Note: no DESTDIR !! -cd - - rm -rf $SRCNAM tar xvf $CWD/$SRCNAM-$VERSION.tar.gz cd $SRCNAM @@ -149,28 +75,35 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; +# Insert a blank CmakeLists.txt file in various subs +# or the build will fail +touch src/libdvdnav-NOW/CMakeLists.txt +touch src/libdvdnav-NOW/vm/CMakeLists.txt +touch src/libdvdnav-NOW/dvdnav/CMakeLists.txt +touch src/libdvdread-NOW/CMakeLists.txt +touch src/libdvdread-NOW/dvdread/CMakeLists.txt + # patches from upstream and community: -patch -p1 < $CWD/patches/k9copy-mimetype.patch -patch -p0 < $CWD/patches/k9copy-tempdir.patch +patch -p1 < $CWD/patches/k9copy-reloaded-consolidated-fixes.patch -# Fix internal dvdnav to link against internal dvdread -patch -p1 < $CWD/patches/k9copy-dvdnav.patch +# Patch for i18n: +patch -p1 < $CWD/patches/k9copy-i18n.patch -# Needed to link with the ffmpeg static libs we just built: -export PKG_CONFIG_PATH="${FFMPEGDIR}/usr/lib${LIBDIRSUFFIX}/pkgconfig:$PKG_CONFIG_PATH" +if [ "${CURRENT:-no}" = "yes" ];then + QT5="ON" +else + QT5="OFF" +fi mkdir -p build cd build cmake \ - -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ - -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ - -DFFMPEGSCALE_LIBRARY:FILEPATH=${FFMPEGDIR}/usr/lib${LIBDIRSUFFIX} \ - -DFFMPEGSCALE_INCLUDE_DIR_LAVC=${FFMPEGDIR}/usr/include \ + -DCMAKE_C_FLAGS="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS="$SLKCFLAGS -std=c++11" \ -DCMAKE_INSTALL_PREFIX=/usr \ - -DLIB_SUFFIX=${LIBDIRSUFFIX} \ - -DMAN_INSTALL_DIR=/usr/man \ + -DQT5_BUILD="$QT5" \ -DCMAKE_BUILD_TYPE=Release .. - make + make make install DESTDIR=$PKG cd .. |