diff options
-rw-r--r-- | .SRCINFO | 31 | ||||
-rw-r--r-- | 0001-fix-compile-with-openjp25.patch | 26 | ||||
-rw-r--r-- | PKGBUILD | 52 |
3 files changed, 77 insertions, 32 deletions
@@ -1,30 +1,29 @@ -# Generated by mksrcinfo v8 -# Thu May 31 18:44:55 UTC 2018 pkgbase = libdcp-git pkgdesc = A small C++ library which can create and read Digital Cinema Packages using JPEG2000 and WAV files - pkgver = 0.r1633.a602723 + pkgver = 1.8.27.r1.gb36f9bf7 pkgrel = 1 - url = http://carlh.net/software/libdcp + url = https://carlh.net/libdcp arch = i686 arch = x86_64 license = GPL - makedepends = python2 - makedepends = boost>=1.45 + makedepends = git + makedepends = python + makedepends = boost>=1.72.0 + makedepends = gcc makedepends = pkg-config - depends = libcxml-git - depends = libsndfile - depends = openssl depends = libxml++2.6 depends = xmlsec depends = imagemagick - depends = openjpeg2 + depends = openjpeg2>=2.5 + depends = libcxml-git depends = libsigc++>=2.0 - depends = boost-libs>=1.61.0 - depends = libasdcp-cth - provides = libdcp=1.4.3devel + depends = boost-libs>=1.72.0 + depends = libasdcp-cth-git + provides = libdcp conflicts = libdcp - source = libdcp::git://git.carlh.net/git/libdcp.git#branch=master - sha512sums = SKIP + source = libdcp-git::git+git://git.carlh.net/git/libdcp.git#branch=v1.8.x + source = 0001-fix-compile-with-openjp25.patch + sha256sums = SKIP + sha256sums = 671046a87eaf567ca94cde72a92497239155d7cb12450ee12b41b2eed13c78fb pkgname = libdcp-git - diff --git a/0001-fix-compile-with-openjp25.patch b/0001-fix-compile-with-openjp25.patch new file mode 100644 index 000000000000..1cc8768962b3 --- /dev/null +++ b/0001-fix-compile-with-openjp25.patch @@ -0,0 +1,26 @@ +--- a/src/j2k_transcode.cc 2022-05-17 10:07:44.525679224 +0200 ++++ b/src/j2k_transcode.cc 2022-05-17 10:04:18.846330309 +0200 +@@ -46,7 +46,7 @@ + #include <openjpeg.h> + #include <cmath> + #include <iostream> +- ++#include <string> + + using std::min; + using std::pow; +@@ -315,10 +315,13 @@ + parameters.max_comp_size = parameters.max_cs_size / 1.25; + parameters.tcp_numlayers = 1; + parameters.tcp_mct = 1; +- parameters.numgbits = fourk ? 2 : 1; ++ string numgbits = "GUARD_BITS="; ++ numgbits.append(std::to_string(fourk ? 2 : 1)); ++ const char* extraopt[] { numgbits.data(), nullptr }; + + /* Setup the encoder parameters using the current image and user parameters */ + opj_setup_encoder (encoder, ¶meters, xyz->opj_image()); ++ opj_encoder_set_extra_options(encoder, extraopt); + + auto stream = opj_stream_default_create (OPJ_FALSE); + if (!stream) { @@ -1,33 +1,53 @@ # Maintainer: Markus Kalb <mk@filmkreis.tu-darmstadt.de> +# Maintainer: Benjamin Radel <aur@radel.tk> # Contributor: Stefan Karner <stefan.karner@student.tuwien.ac.at> pkgname=libdcp-git -pkgver=0.r1652.9facd09 +pkgver=1.8.27.r1.gb36f9bf7 pkgrel=1 +_branch=v1.8.x pkgdesc="A small C++ library which can create and read Digital Cinema Packages using JPEG2000 and WAV files" arch=('i686' 'x86_64') -url="http://carlh.net/software/libdcp" +url="https://carlh.net/libdcp" license=('GPL') -depends=('libcxml-git' 'libsndfile' 'openssl' 'libxml++2.6' 'xmlsec' 'imagemagick' 'openjpeg2' 'libsigc++>=2.0' 'boost-libs>=1.61.0' 'libasdcp-cth') -makedepends=('python2' 'boost>=1.45' 'pkg-config') -provides=('libdcp=1.4.3devel') +depends=('libxml++2.6' 'xmlsec' 'imagemagick' 'openjpeg2>=2.5' 'libcxml-git' 'libsigc++>=2.0' 'boost-libs>=1.72.0' 'libasdcp-cth-git') +makedepends=('git' 'python' 'boost>=1.72.0' 'gcc' 'pkg-config') +provides=('libdcp') conflicts=('libdcp') -source=("libdcp::git://git.carlh.net/git/libdcp.git#branch=master") -sha512sums=('SKIP') +source=("${pkgname}::git+git://git.carlh.net/git/libdcp.git#branch=${_branch}" + "0001-fix-compile-with-openjp25.patch") +sha256sums=('SKIP' + '671046a87eaf567ca94cde72a92497239155d7cb12450ee12b41b2eed13c78fb') pkgver() { - cd libdcp - printf "0.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + cd "$pkgname" + git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +} + + +prepare() { + cd $srcdir/${pkgname} + ### Patch libdcp for openjpeg>2.5 ### + for p in "${source[@]}"; do + if [[ "$p" =~ \.patch$ ]]; then + echo "Applying patch ${p##*/}" + patch -p1 -N -i "${srcdir}/${p##*/}" + fi + done } build() { - export PKG_CONFIG_LIBDIR="/usr/lib64/pkgconfig/:/usr/lib/pkgconfig/:$PKG_CONFIG_LIBDIR" - export CXXFLAGS="$CXXFLAGS -std=c++11" - cd libdcp - python2 waf configure --prefix=/usr - python2 waf build + ### Configure libdcp ### + cd "${srcdir}/${pkgname}" + python waf configure --prefix=/usr --disable-tests + python waf build } package() { - cd libdcp - python2 waf install --destdir=$pkgdir + cd "${srcdir}/${pkgname}" + python waf install --destdir=$pkgdir + cd "${pkgdir}" + if [ -d usr/lib64 ] + then + mv usr/lib64 usr/lib + fi } |