Package Details: lib32-openjpeg2 2.4.0-1

Git Clone URL: https://aur.archlinux.org/lib32-openjpeg2.git (read-only, click to copy)
Package Base: lib32-openjpeg2
Description: An open source JPEG 2000 codec, version 2.4.0
Upstream URL: http://www.openjpeg.org
Licenses: BSD
Submitter: oxalin
Maintainer: oxalin
Last Packager: oxalin
Votes: 16
Popularity: 0.71
First Submitted: 2016-04-25 23:48
Last Updated: 2021-01-08 18:52

Latest Comments

oxalin commented on 2021-01-08 18:55

@sl1pkn07: thanks for the cleanup suggestion. I incorporated a big part of it in the latest update.

sl1pkn07 commented on 2021-01-03 18:09

diff --git a/PKGBUILD b/PKGBUILD
index 5665db0..2a9cc06 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,46 +1,51 @@
 # Maintainer: Alexandre Demers <alexandre.f.demers@gmail.com>

-_setPrefix="/usr"
-_setLibdir="lib32"
-_setFullLibdir="${_setPrefix}/${_setLibdir}"
-_pkgbase=openjpeg2
-
-pkgname=${_setLibdir}-${_pkgbase}
-pkgver=2.3.1
+pkgname=lib32-openjpeg2
+pkgver=2.4.0
 pkgrel=1
 pkgdesc="An open source JPEG 2000 codec, version ${pkgver}"
 arch=('x86_64')
 license=('BSD')
 url="http://www.openjpeg.org"
-makedepends=('cmake' 'lib32-gcc-libs' 'lib32-libpng'  'lib32-libtiff' 'lib32-lcms2')
-depends=("${_pkgbase}" 'lib32-zlib')
+makedepends=('cmake'
+             'lib32-gcc-libs'
+             'lib32-libpng'
+             'lib32-libtiff'
+             'lib32-lcms2'
+             )
+depends=("openjpeg2=${pkgver}"
+         'lib32-zlib'
+         )
 source=("https://github.com/uclouvain/openjpeg/archive/v${pkgver}.tar.gz")
-md5sums=("3b9941dc7a52f0376694adb15a72903f")
+sha256sums=('8702ba68b442657f11aaeb2b338443ca8d5fb95b0d845757968a7be31ef7f16d')
+
+prepare(){
+  mkdir -p build
+}

 build() {
   export CFLAGS="-m32"
   export CXXFLAGS="-m32"
-  export PKG_CONFIG_PATH="${_setFullLibdir}/pkgconfig"
+  export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"

-  cd "${srcdir}"
-  mkdir -p build
   cd build
-  cmake "../openjpeg-$pkgver" -DCMAKE_INSTALL_PREFIX=${_setPrefix} -DOPENJPEG_INSTALL_LIB_DIR=${_setLibdir} -DBUILD_DOC=off
+  cmake "../openjpeg-${pkgver}" \
+    -DCMAKE_BUILD_TYPE=Release \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DOPENJPEG_INSTALL_LIB_DIR=lib32 \
+    -DBUILD_SHARED_LIBS=ON \
+    -DBUILD_STATIC_LIBS=OFF \
+    -DBUILD_DOC=off
+
   make
 }

 package() {
-  cd "${srcdir}/build"
-  make DESTDIR="${pkgdir}" install
+  make -C build DESTDIR="${pkgdir}" install

   # removing unneeded files and folders
-  rm -rf "${pkgdir}/${_setPrefix}"/{bin,include}
-  rm -fr "${pkgdir}/${_setFullLibdir}"/openjpeg-2.3
+  rm -rf "${pkgdir}/usr/"{bin,include}

   # installing license
-  mkdir -p "${pkgdir}/${_setPrefix}"/share/licenses/openjpeg-2.3
-  cp LICENSE.txt "${pkgdir}/${_setPrefix}"/share/licenses/openjpeg-2.3/LICENSE
-
-  mkdir -p "${pkgdir}/${_setPrefix}"/share/licenses/${pkgname}
-  ln -s ../openjpeg-2.3/LICENSE "${pkgdir}/${_setPrefix}"/share/licenses/${pkgname}/LICENSE
+  install -Dm644 "openjpeg-${pkgver}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
 }

oxalin commented on 2016-09-30 04:47

Missing dependencies added, thanks,

J5lx commented on 2016-09-26 04:03

lib32-libpng, lib32-zlib, lib32-libtiff and lib32-lcms2 should be added to the dependencies.