Package Details: lib32-openjpeg2 2.5.0-1

Git Clone URL: (read-only, click to copy)
Package Base: lib32-openjpeg2
Description: An open source JPEG 2000 codec, version 2.5.0
Upstream URL:
Licenses: BSD
Submitter: oxalin
Maintainer: oxalin
Last Packager: oxalin
Votes: 17
Popularity: 0.000005
First Submitted: 2016-04-25 23:48 (UTC)
Last Updated: 2022-05-21 00:51 (UTC)

Latest Comments

1 2 Next › Last »

MarsSeed commented on 2023-07-11 15:25 (UTC)

Never mind. I've realized that none of the consuming 32-bit libraries have any realistic use cases for the marginal JPEG 2000 file format.

(Also this format is too new for it to be stuck in the 32-bit world on desktop, but also too old because now even WebP is widely supported in everyday software and even hardware, whereas this only has a fancy name but is without any actual consumer base.)

I've left comments in all relevant package pages with my proposal that maintainers consider dropping this dependency.

GStreamer and FFMPEG would only use it for JPEG2000 video streams, but FFMPEG has an internal codec for it as well, which is even faster.

Other than that, gegl and poppler are only used by some legacy 32-bit scanner software on AUR. But scanners never supported this codec.

Games, interactive encyclopedias and other desktop multimedia content applications also don't used this format.

MarsSeed commented on 2023-07-11 13:47 (UTC) (edited on 2023-07-11 16:12 (UTC) by MarsSeed)

Seems repo's jbigkit is a static library for some reason, and it gets statically linked to libtiff (see FS#77224). And libtiff's pkg-conf file refers to it as private dependency.

After some consideration, I lean towards recommending the removal of libtiff support altogether from lib32-openjpeg2. The only library that some scanner drivers might use is lib32-gegl via lib32-gimp, which uses lib32-libtiff directly - no need for openjpeg2 to also support libtiff.

Edit 1: also (lib32-)sane uses (lib32-)libtiff directly (without jbigkit as makedepend).

Edit 2: (lib32-)gegl also does not need (lib32-)jbigkit to use libtiff.

MarsSeed commented on 2023-07-11 13:10 (UTC)

In 2022, repo added jbigkit from 2014 as makedepend in the latest version of openjpeg2. But seems highly dubious, as JBIG has zero things to do with JPEG, and openjpeg2 build configuration never refers to jbig, and never did so in the past.

I am AFK nowadays so I cannot verify my hunch, but it would be good if you could take a look; lib32-jbigkit could be dropped from AUR if it was truly unneeded by this package.

dekipantelija commented on 2022-05-23 15:34 (UTC) (edited on 2022-05-23 15:51 (UTC) by dekipantelija)

Thanks for the AUR! Came to pitch in to say that i had to edit the build : The part




i had to add a specifi version number




as the openjpeg2 64bit version is still on 2.4 for me.

Best regards, and sorry for the mess, can't figure out how to use the [code] tag for the life of me

oxalin commented on 2022-05-22 01:36 (UTC)

@MarsSeed: I've been updating packages to be more flexible on native package's version dependency. So I updated exactly as you suggested. :)

MarsSeed commented on 2022-05-19 19:17 (UTC) (edited on 2022-05-19 19:28 (UTC) by MarsSeed)

@oxalin, I'd also like to suggest and ask that you remove the hardcoded versioned dependence on openjpeg2.

That makes Arch system upgrades a pain when there is a newer openjpeg2 in the Arch repo while lib32-openjpeg2 has not yet been bumped.

I would recommend a middle ground, though:


That way, Arch users would have no issues upgrading to the newer repo version of openjpeg2 while the lib32 version is not bumped.

I know that is not ideal, because then the dependents of lib32-openjpeg2 can potentially use newer headers of openjpeg2 than the version of the installed lib32-openjpeg2 when building the package.

But such a scenario rarely causes problems, because header upgrades are usually not drastic (typically upstream devs just mark some definitions deprecated for several releases before dropping them completely). Also, such potential but rare problems would only affect a limited number of user-built lib32 AUR packages.

On the other hand, hardcoding the version of openjpeg2 to lib32-openjpeg2 will prevent users from upgrading openjpeg2 but typically will not prevent them to upgrade ffmpeg or gstreamer. Then, the newer versions of those dependent packages would be incompatible with the non-latest openjpeg2 in case of an upstream SO version bump of the latter, breaking ffmpeg and/or gstreamer and a lot of downstream libraries / apps installed from the Arch repos.

Allowing the 'depends= (repo-package)>=(lib32-version)' constraint would lead to the far lesser evil according to the reasoning explained above. It would prevent breaking the runtime functioning of any Arch repo package because of the not yet bumped lib32 AUR package.

Aozora commented on 2022-05-19 11:33 (UTC) (edited on 2022-05-21 14:15 (UTC) by Aozora)

~~Since the v2.5.0 update is not very much, I made this patch. It SHOULDN'T cause any problems.
Keep in mind that this is an unofficial patch.

After using this patch, don't forget to update the 64-bit version.~~


EDIT: The official one is updated.

RAMChYLD commented on 2022-05-18 18:25 (UTC) (edited on 2022-05-18 18:26 (UTC) by RAMChYLD)

Please update ASAP. This package for some reason has a dependency on the 64-bit openjpeg2, which has been updated to 2.5.0 on the main Arch repo a few days ago.

oxalin commented on 2021-01-08 18:55 (UTC)

@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 (UTC) (edited on 2021-01-03 18:28 (UTC) by sl1pkn07)

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

 pkgdesc="An open source JPEG 2000 codec, version ${pkgver}"
-makedepends=('cmake' 'lib32-gcc-libs' 'lib32-libpng'  'lib32-libtiff' 'lib32-lcms2')
-depends=("${_pkgbase}" 'lib32-zlib')
+             'lib32-gcc-libs'
+             'lib32-libpng'
+             'lib32-libtiff'
+             'lib32-lcms2'
+             )
+         'lib32-zlib'
+         )
+  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 \
+    -DBUILD_DOC=off

 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"