Package Details: mozjpeg 4.1.5-1

Git Clone URL: https://aur.archlinux.org/mozjpeg.git (read-only, click to copy)
Package Base: mozjpeg
Description: Improved JPEG encoder
Upstream URL: https://github.com/mozilla/mozjpeg
Keywords: c cmake encoder jpeg make mozilla
Licenses: zlib, IJG, BSD-3-Clause-Modification
Conflicts: libjpeg, libjpeg-turbo, mozjpeg-git, turbojpeg
Provides: libjpeg, libjpeg-turbo, libjpeg.so, turbojpeg
Submitter: afontenot
Maintainer: begin-theadventu
Last Packager: begin-theadventu
Votes: 30
Popularity: 0.113460
First Submitted: 2015-08-14 12:26 (UTC)
Last Updated: 2024-04-18 10:57 (UTC)

Dependencies (3)

Required by (1046)

Sources (1)

Pinned Comments

afontenot commented on 2024-04-18 04:00 (UTC)

Hi all,

I'm disowning this package for the following reasons:

  • The project is basically dead, no commits in 6 months.
  • The project maintainer hasn't rebased it on libjpeg-turbo 3.0, making this package basically useless because it's designed to replace the system's dynamically linked libjpeg: https://github.com/mozilla/mozjpeg/issues/437
  • A new JPEG encoder called JPEGLI is released and basically eats Mozjpeg's lunch on every single image I've tested. It's much superior. I strongly recommend anyone who needs a JPEG encoder to switch to this; an encoder cjpegli is included in the libjxl package in extra.

Unfortuantely, jpegli is not (yet) a drop-in replacement for libjpeg, because it is also based on the 2.0 version of libjpeg-turbo.

For comparisons between JPEGLI and MozJPEG (and other codecs), please check https://afontenot.github.io/image-formats-comparison/#sunset&JPEGLI=l&MOZJPEG=l

Latest Comments

« First ‹ Previous 1 2 3 4 Next › Last »

afontenot commented on 2020-11-25 23:17 (UTC)

@eworm: thank you for the explanation! I'll fix that right away. I was looking at the mpv PKGBUILD, but I was so honed in on the libjpeg-turbo dependency (which doesn't have an .so) that I didn't realize that libjpeg.so was there or could be a problem.

Appreciate the information, and the fix to the mpv PKGBUILD (although my end needs to be fixed too).

eschwartz commented on 2020-11-25 23:17 (UTC)

Please add provides+=(libjpeg.so) note the .so at the end. This does automatic versioning of the version of shared libraries.

Note it's more or less completely useless for very stable library definitions. But libjpeg-turbo's PKGBUILD provides it for its libjpeg ABI emulation, therefore packages will potentially depend on it.

This is completely separate from the fact that things depending on libjpeg.so should depend on it, not on "libjpeg-turbo", since that would prevent the use of the drop-in compatible IJG libjpeg version 8 project... but your package is broken either way.

eworm commented on 2020-11-25 23:09 (UTC)

The mpv package depends on a libjpeg soname. To make it happy with mozjpeg you need to add 'libjpeg.so' to privides array.

graysky commented on 2020-11-21 12:02 (UTC)

As caltigin mentioned, you are missing some deps.

katt commented on 2020-11-13 22:45 (UTC)

Updated to 4.0.0 and fixed source filename

diff --git a/PKGBUILD b/PKGBUILD
index 952f1ab..762d8d1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,41 +5,42 @@
 # Contributor: N30N <archlinux@alunamation.com>

 pkgname="mozjpeg"
-pkgver=3.3.1
-pkgrel=2
+pkgver=4.0.0
+pkgrel=1
 pkgdesc="JPEG image codec with accelerated baseline decoding and superior encoding"
 url="https://github.com/mozilla/mozjpeg"
 license=("BSD")
 arch=("i686" "x86_64" "armv7h")
 depends=("glibc")
-makedepends=("nasm")
-source=("$url/archive/v${pkgver}.tar.gz")
-sha1sums=('1a4be569d62f51e1377e46b8b22b6a64fb121794')
+makedepends=("nasm" "cmake")
+source=(${pkgname}-${pkgver}.tar.gz::"$url/archive/v${pkgver}.tar.gz")
+sha1sums=('e2bc33ab65d18d5b26baf842b1ca128fea30387a')

 provides=("libjpeg=8.1.2" "turbojpeg" "libjpeg-turbo")
 conflicts=("libjpeg" "mozjpeg-git" "turbojpeg" "libjpeg-turbo")

 build() {
-       cd "${srcdir}/${pkgname}-${pkgver}"
-       autoreconf -fiv
-       ./configure --prefix=/usr --with-jpeg8 --mandir=/usr/share/man
-       make
+       cmake -B build -S ${pkgname}-${pkgver} \
+               -DCMAKE_INSTALL_PREFIX=/usr \
+               -DCMAKE_INSTALL_LIBDIR=/usr/lib \
+               -DWITH_JPEG8=ON \
+               -DPNG_SUPPORTED=OFF
+       make -C build
 }

 # much too slow for default, can be enabled if desired
 #check() {
-#      cd "${srcdir}/${pkgname}-${pkgver}"
-#      make test
+#      make test -C build
 #}

 package() {
-       cd "${srcdir}/${pkgname}-${pkgver}"
-       make \
+       make -C build \
                DESTDIR="${pkgdir}" \
                docdir="/usr/share/doc/${pkgname}" \
                exampledir="/usr/share/doc/${pkgname}" \
                install

+       cd ${pkgname}-${pkgver}
        install -D LICENSE.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
        install -m644 jpegint.h "${pkgdir}/usr/include"
 }

graysky commented on 2019-08-15 18:37 (UTC)

Could you add "armv7h" to the arch list? Package builds fine.

In the future, just build with makepkg -sA

afontenot commented on 2019-03-29 04:35 (UTC)

Note that mozjpeg does not yet have a released version based on the latest turbojpeg. Fortunately this doesn't seem to be a problem for most applications. If you have issues with mozjpeg crashing, however, you may need to switch back to turbojpeg and use mozjpeg-opt (not maintained by me) for the time being.

afontenot commented on 2018-03-09 20:12 (UTC)

Done!

flacks commented on 2018-03-08 08:34 (UTC)

Could you add "armv7h" to the arch list? Package builds fine.