diff options
-rw-r--r-- | libre/handbrake-svn/PKGBUILD | 171 | ||||
-rw-r--r-- | libre/handbrake/PKGBUILD | 136 | ||||
-rw-r--r-- | libre/handbrake/handbrake.install (renamed from libre/handbrake-svn/handbrake-svn.install) | 0 | ||||
-rw-r--r-- | libre/handbrake/standard-presets-fix-type.patch | 88 |
4 files changed, 224 insertions, 171 deletions
diff --git a/libre/handbrake-svn/PKGBUILD b/libre/handbrake-svn/PKGBUILD deleted file mode 100644 index 264071891..000000000 --- a/libre/handbrake-svn/PKGBUILD +++ /dev/null @@ -1,171 +0,0 @@ -# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net> -# Maintainer (Arch): Evangelos Foutras <evangelos@foutrelis.com> -# Contributor (Arch): Giovanni Scafora <giovanni@archlinux.org> -# Contributor (Arch): Sebastien Piccand <sebcactus gmail com> - -pkgname=('handbrake-svn' 'handbrake-cli-svn') -_pkgver=0.9.9.1 -pkgver=6207 -url="http://handbrake.fr/" -license=('GPL') - -pkgrel=1 -arch=('i686' 'x86_64' 'mips64el') -makedepends=('intltool' 'python2' 'gcc-libs' 'libnotify' - 'gst-plugins-base' 'gtk3' 'dbus-glib') - -# The format is: handbrake_name:[system_name|tarball] -# This list should pretty closely correspond to `grep contrib/ make/include/main.defs` -# _config_loc -# format: "ignored:pacman_pkgname" -# For packages that optionally use the system's versions. The -# build system is not modified, in order that if the module version -# is used, it fails early (assuming the network is down). -# _config_mod -# format: "module_name:file_name" -# For packages that are built as modules. -# _config_sys -# format: "module_name:pacman_pkgname" -# For modules that we *force* to be the system versions. -# _config_ign -# format: "ignored" -# For modules that are optional, but we don't want to download. -declare -ag _contrib_{loc,sys,mod,ign} -_contrib_loc+=('pkgconfig') # FEATURE.local_pkgconfig -_contrib_loc+=('autoconf' # FEATURE.local_autotools - 'automake' - 'libtool' - 'm4') -_contrib_loc+=('bzip2') # HAS.bz2 -_contrib_loc+=('fontconfig' - 'freetype:freetype2' - 'fribidi' - 'libxml2' - 'libass' - 'libogg' - 'libvorbis' - 'libtheora' - 'libsamplerate') -# XXX: I can't get it to set LDFLAGS right to use system fdk-aac -_contrib_mod+=('fdk-aac:fdk-aac-v0.1.1-6-gbae4553.tar.bz2') # FEATURE.fdk_aac (sys:libfdk-aac) -# XXX: I can't get it to set LDFLAGS right to use system mp4v2 -_contrib_mod+=('mp4v2:mp4v2-trunk-r355.tar.bz2') # FEATURE.mp4v2 (sys:libmp4v2) -# libmkv is patched to add features -_contrib_mod+=('libmkv:libmkv-0.6.5-0-g82075ae.tar.gz') # FEATURE.libmkv -_contrib_ign+=('x265') # FEATURE.x265 -_contrib_sys+=('lame') # always -# Using system ffmpeg will break PGS subtitle processing -# https://forum.handbrake.fr/viewtopic.php?f=13&t=27581 -_contrib_mod+=('ffmpeg:libav-v10.1.tar.bz2') # always -# XXX: I can't get it to set LDFLAGS right to use system libvpx -_contrib_mod+=('libvpx:libvpx-v1.3.0.tar.bz2') # always -_contrib_sys+=('libdvdread') # always -# XXX: I don't even know, but system libdvdnav doesn't work -_contrib_mod+=('libdvdnav:libdvdnav-a5c1325.tar.bz2') # always -_contrib_sys+=('libbluray') # always -_contrib_ign+=('libmfx') # FEATURE.qsv -_contrib_sys+=('x264') # always -_contrib_loc+=('zlib') # HAS.libz -_contrib_loc+=('yasm') # FEATURE.local_yasm - -makedepends+=("${_contrib_loc[@]#*:}" "${_contrib_sys[@]#*:}") - -source=("https://repo.parabola.nu/other/handbrake/HandBrake-svn${pkgver}.tar.gz") -for _f in "${_contrib_mod[@]#*:}"; do - source+=("http://download.handbrake.fr/handbrake/contrib/${_f}") - noextract+=("${_f}") -done; unset _f -sha256sums=('2e9cda0bbfc47252c2ebe70b4faa1b34bc8193077f8c32163c9ed702ac6f99ec' - 'f08584d59a02db5facf548ae860c64d2870db63477f605af763c161a1508dcbc' - '5b7d4e62df506b1246463da82cc2f02415eb462e6ccd5848f98f5cdcfc1f3d4f' - '7314a296c68f42b826164074a96e247e52d8ef9287c21ebc5fe1bf9e73643e97' - 'bc3807426d4e73fe8c245730b0df4ba95766cf7e17e47c738ee302f73d066ac9' - 'd3dcc8d84af51c6c382b214397c62402e37a799e8ebcda6f4217aef0010451a9' - 'd190ce2ca4d1d9878145acd9c1b8ac76636c3b6d12066e8cc87ee674f943fb2a') - -mksource=("HandBrake-svn${pkgver}::svn://svn.handbrake.fr/HandBrake/trunk") -mkmd5sums=('SKIP') - -prepare() { - cd "$srcdir/HandBrake-svn$pkgver" - - # Use Python 2 - sed -i 's/python /python2 /' gtk/src/Makefile.am - - local contrib - # Use more system libs - for contrib in "${_contrib_sys[@]}"; do - sed -i \ - -e "s/MODULES += contrib\/${contrib%:*}\$/#& # provided by ${contrib#*:}/" \ - make/include/main.defs - done - # Use the pre-downloaded files - mkdir -p download - for contrib in "${_contrib_mod[@]}"; do - ln -srf "${srcdir}/${contrib[@]#*:}" download/ - done - - # Fix libhb to work with the stable release of libmp4v2 - if in_array libmp4v2 "${makedepends[@]}"; then - local arg='\([^,)]*\)' - sed -i \ - -e "s/MP4Close(${arg})/MP4Close(\1, 0)/" \ - -e "s/MP4Create(${arg},${arg},${arg})/MP4Create(\1,\3)/" \ - -e "s/MP4Optimize(${arg},${arg},${arg})/MP4Optimize(\1,\2)/" \ - -e "s/MP4Read(${arg},${arg})/MP4Read(\1)/" \ - libhb/decmetadata.c libhb/muxmp4.c - fi - - # Fix configure.ac to work with automake 1.13 - if in_array automake "${makedepends[@]}"; then - cd gtk - sed -i \ - -e 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' \ - -e '/AM_PROG_CC_STDC/d' \ - -e 's/$pkg_gudev"/gmodule-2.0 $pkg_gudev"/' \ - configure.ac - autoreconf -vi - fi -} - -build() { - cd "$srcdir/HandBrake-svn$pkgver" - - ./configure \ - --prefix=/usr \ - --force \ - --disable-gtk-update-checks - cd build - make -j1 -} - -package_handbrake-svn() { - pkgdesc="Multithreaded video transcoder" - depends=('bzip2' 'gcc-libs' 'gst-plugins-base' 'libnotify' 'dbus-glib' - 'fribidi' 'libass' 'gtk3' 'fontconfig' 'freetype2' 'libxml2' - 'libogg' 'libvorbis' 'libtheora' 'libsamplerate' 'libbluray' - 'x264' 'desktop-file-utils' 'hicolor-icon-theme') - optdepends=('gst-plugins-good: for video previews' - 'gst-libav: for video previews') - install=$pkgname.install - provides=("${pkgname%-svn}-${_pkgver}") - conflicts=("${pkgname%-svn}") - - cd "$srcdir/HandBrake-svn$pkgver/build" - - make -j1 DESTDIR="$pkgdir" install - rm "$pkgdir/usr/bin/HandBrakeCLI" -} - -package_handbrake-cli-svn() { - pkgdesc="Multithreaded video transcoder (CLI)" - depends=('bzip2' 'gcc-libs' 'zlib' 'fribidi' 'libass' 'libxml2' 'libtheora' - 'libsamplerate' 'libbluray' 'x264') - provides=("${pkgname%-svn}-${_pkgver}") - conflicts=("${pkgname%-svn}") - - cd "$srcdir/HandBrake-svn$pkgver/build" - install -D HandBrakeCLI "$pkgdir/usr/bin/HandBrakeCLI" -} - -# vim:set ts=2 sw=2 et: diff --git a/libre/handbrake/PKGBUILD b/libre/handbrake/PKGBUILD new file mode 100644 index 000000000..61211f85a --- /dev/null +++ b/libre/handbrake/PKGBUILD @@ -0,0 +1,136 @@ +# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net> +# Maintainer (Arch): Evangelos Foutras <evangelos@foutrelis.com> +# Contributor (Arch): Giovanni Scafora <giovanni@archlinux.org> +# Contributor (Arch): Sebastien Piccand <sebcactus gmail com> + +pkgname=('handbrake' 'handbrake-cli') +pkgver=0.10.1 +pkgrel=2.parabola +url="http://handbrake.fr/" +license=('GPL') + +pkgrel=1 +arch=('i686' 'x86_64') +depends=('gcc-libs') +_gui_depends=('libnotify' 'dbus-glib' 'gtk3' 'gst-plugins-base') +makedepends=('intltool' 'python2' "${_gui_depends[@]}") +source=(https://handbrake.fr/mirror/HandBrake-$pkgver.tar.bz2 + standard-presets-fix-type.patch) + +# HandBrake has a bunch of dependencies that may be either pacman +# packages, or built in the contrib/ directory as "modules". This is +# a big config section to decide which dependencies are going to be +# pacman packages, and which dependencies are going to be modules. +# +# This list should pretty closely correspond to +# `grep contrib/ make/include/main.defs` +# +# The format for _depends[n] is: handbrake_name[:pacman_name] +# The format for _modules[n] is: handbrake_name:tarball_name +makedepends+=('pkgconfig') # module if FEATURE.local_pkgconfig +makedepends+=('cmake') # module if FEATURE.local_cmake +makedepends+=('autoconf') # module if FEATURE.local_autotools +makedepends+=('automake') # module if FEATURE.local_autotools +makedepends+=('libtool') # module if FEATURE.local_autotools +makedepends+=('m4') # module if FEATURE.local_autotools +depends+=('bzip2') # module if !HAS.bz2 +depends+=('fontconfig') # module if on darwin, cygwin, or mingw +depends+=('freetype2') # module if on darwin, cygwin, or mingw +depends+=('fribidi') # module if on darwin, cygwin, or mingw +depends+=('libxml2') # module if on darwin, cygwin, or mingw +depends+=('libass') # module if on darwin, cygwin, or mingw +depends+=('libogg') # module if on darwin, cygwin, or mingw +depends+=('libvorbis') # module if on darwin, cygwin, or mingw +depends+=('libtheora') # module if on darwin, cygwin, or mingw +depends+=('libsamplerate') # module if on darwin, cygwin, or mingw +depends+=('lame') # module if on darwin, cygwin, or mingw +depends+=('libx264') # module if on darwin, cygwin, or mingw +_depends+=('fdk-aac:libfdk-aac') # enable as module if FEATURE.fdk_aac +_depends+=('x265') # enable as module if FEATURE.x265 +# Using system ffmpeg will break PGS subtitle processing +# https://forum.handbrake.fr/viewtopic.php?f=13&t=27581 +_modules+=('ffmpeg:libav-v10.1.tar.bz2') # always a module +_depends+=('libvpx') # always a module +_depends+=('libdvdread') # always a module; also forced in Arch +_depends+=('libdvdnav') # always a module; also forced in Arch +_depends+=('libbluray') # always a module; also forced in Arch +#_depends+=('pthreadw32') # module if !HAS.pthread (glibc) +#_depends+=('libmfx') # enable as module if FEATURE.qsv +#_depends+=('libiconv') # module if !HAS.iconv (glibc) +depends+=('zlib') # module if !HAS.libz +#_depends+=('libgnurx') # module if !HAS.regex (glibc) +makedepends+=('yasm') # module if FEATURE.local_yasm + +depends+=("${_depends[@]#*:}") +source+=("${_modules[@]/#*:/http://download.handbrake.fr/handbrake/contrib/}") +noextract+=("${_modules[@]#*:}") + +# Lock the specific version of libx264, as it changes often. +depends+=('libx264.so') + +sha256sums=('7ea42031fd4d5efd04903a9aae79c952c50fd43b6f7bf08fd1a93f6b358a23f5' + 'dce9dc044321b26a9022b1a4d23950c781c51c8c07653ba19c3eedf30f1d54d4' + 'bc3807426d4e73fe8c245730b0df4ba95766cf7e17e47c738ee302f73d066ac9') + +prepare() { + cd "$srcdir/HandBrake-$pkgver" + + local dep + + # Use more system libraries + for dep in "${_depends[@]}"; do + sed -i \ + -e "s/MODULES += contrib\/${dep%:*}\$/#& # provided by ${dep#*:}/" \ + make/include/main.defs + done + echo 'TEST.GCC.l += fdk-aac x265' >> test/module.defs + + # Use the pre-downloaded files + mkdir -p download + for dep in "${_modules[@]}"; do + ln -srf "${srcdir}/${dep[@]#*:}" download/ + done + + # Fix crash while adding job (FS#43060) + # https://forum.handbrake.fr/viewtopic.php?f=12&t=32090 + # https://trac.handbrake.fr/changeset/7008/branches/0.10.x + patch -Np2 -i ../standard-presets-fix-type.patch +} + +build() { + cd "$srcdir/HandBrake-$pkgver" + + ./configure \ + --prefix=/usr \ + --force \ + --disable-gtk-update-checks + cd build + make +} + +package_handbrake() { + pkgdesc="Multithreaded video transcoder" + depends+=("${_gui_depends[@]}" 'hicolor-icon-theme' 'desktop-file-utils') + optdepends=('gst-plugins-good: for video previews' + 'gst-libav: for video previews') + install=$pkgname.install + + conflicts=("$pkgname-svn") + replaces=("$pkgname-svn") + + cd "$srcdir/HandBrake-$pkgver/build" + make DESTDIR="$pkgdir" install + rm "$pkgdir/usr/bin/HandBrakeCLI" +} + +package_handbrake-cli() { + pkgdesc+="Multithreaded video transcoder (CLI)" + + conflicts=("$pkgname-svn") + replaces=("$pkgname-svn") + + cd "$srcdir/HandBrake-$pkgver/build" + install -D HandBrakeCLI "$pkgdir/usr/bin/HandBrakeCLI" +} + +# vim:set ts=2 sw=2 et: diff --git a/libre/handbrake-svn/handbrake-svn.install b/libre/handbrake/handbrake.install index 87c29e4db..87c29e4db 100644 --- a/libre/handbrake-svn/handbrake-svn.install +++ b/libre/handbrake/handbrake.install diff --git a/libre/handbrake/standard-presets-fix-type.patch b/libre/handbrake/standard-presets-fix-type.patch new file mode 100644 index 000000000..797c3fa6b --- /dev/null +++ b/libre/handbrake/standard-presets-fix-type.patch @@ -0,0 +1,88 @@ +Index: branches/0.10.x/gtk/src/standard_presets.xml
+===================================================================
+--- branches/0.10.x/gtk/src/standard_presets.xml (revision 6995)
++++ branches/0.10.x/gtk/src/standard_presets.xml (revision 7008)
+@@ -85,5 +85,5 @@
+ <string></string>
+ <key>PictureDenoiseFilter</key>
+- <integer>off</integer>
++ <string>off</string>
+ <key>PictureDenoiseCustom</key>
+ <string></string>
+@@ -216,5 +216,5 @@
+ <string></string>
+ <key>PictureDenoiseFilter</key>
+- <integer>off</integer>
++ <string>off</string>
+ <key>PictureDenoiseCustom</key>
+ <string></string>
+@@ -347,5 +347,5 @@
+ <string></string>
+ <key>PictureDenoiseFilter</key>
+- <integer>off</integer>
++ <string>off</string>
+ <key>PictureDenoiseCustom</key>
+ <string></string>
+@@ -478,5 +478,5 @@
+ <string></string>
+ <key>PictureDenoiseFilter</key>
+- <integer>off</integer>
++ <string>off</string>
+ <key>PictureDenoiseCustom</key>
+ <string></string>
+@@ -625,5 +625,5 @@
+ <string></string>
+ <key>PictureDenoiseFilter</key>
+- <integer>off</integer>
++ <string>off</string>
+ <key>PictureDenoiseCustom</key>
+ <string></string>
+@@ -772,5 +772,5 @@
+ <string></string>
+ <key>PictureDenoiseFilter</key>
+- <integer>off</integer>
++ <string>off</string>
+ <key>PictureDenoiseCustom</key>
+ <string></string>
+@@ -919,5 +919,5 @@
+ <string></string>
+ <key>PictureDenoiseFilter</key>
+- <integer>off</integer>
++ <string>off</string>
+ <key>PictureDenoiseCustom</key>
+ <string></string>
+@@ -1050,5 +1050,5 @@
+ <string></string>
+ <key>PictureDenoiseFilter</key>
+- <integer>off</integer>
++ <string>off</string>
+ <key>PictureDenoiseCustom</key>
+ <string></string>
+@@ -1181,5 +1181,5 @@
+ <string></string>
+ <key>PictureDenoiseFilter</key>
+- <integer>off</integer>
++ <string>off</string>
+ <key>PictureDenoiseCustom</key>
+ <string></string>
+@@ -1312,5 +1312,5 @@
+ <string></string>
+ <key>PictureDenoiseFilter</key>
+- <integer>off</integer>
++ <string>off</string>
+ <key>PictureDenoiseCustom</key>
+ <string></string>
+@@ -1458,5 +1458,5 @@
+ <string></string>
+ <key>PictureDenoiseFilter</key>
+- <integer>off</integer>
++ <string>off</string>
+ <key>PictureDenoiseCustom</key>
+ <string></string>
+@@ -1605,5 +1605,5 @@
+ <string></string>
+ <key>PictureDenoiseFilter</key>
+- <integer>off</integer>
++ <string>off</string>
+ <key>PictureDenoiseCustom</key>
+ <string></string>
|