blob: fdc035d5f74898376550f507fad05fe7818ec835 [file] [log] [blame]
Andrew Geissler9aee5002022-03-30 16:27:02 +00001SUMMARY = "Hardware accelerated JPEG compression/decompression library"
2DESCRIPTION = "libjpeg-turbo is a derivative of libjpeg that uses SIMD instructions (MMX, SSE2, NEON) to accelerate baseline JPEG compression and decompression"
3HOMEPAGE = "http://libjpeg-turbo.org/"
4
5LICENSE = "BSD-3-Clause"
6LIC_FILES_CHKSUM = "file://cdjpeg.h;endline=13;md5=8a61af33cc1c681cd5cc297150bbb5bd \
7 file://jpeglib.h;endline=16;md5=52b5eaade8d5b6a452a7693dfe52c084 \
8 file://djpeg.c;endline=11;md5=510b386442ab6a27ee241fc5669bc5ea \
9 "
10DEPENDS:append:x86-64:class-target = " nasm-native"
11DEPENDS:append:x86:class-target = " nasm-native"
12
13SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \
14 file://0001-libjpeg-turbo-fix-package_qa-error.patch \
15 "
16
17SRC_URI[sha256sum] = "467b310903832b033fe56cd37720d1b73a6a3bd0171dbf6ff0b620385f4f76d0"
18UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/libjpeg-turbo/files/"
19UPSTREAM_CHECK_REGEX = "/libjpeg-turbo/files/(?P<pver>(\d+[\.\-_]*)+)/"
20
21PE = "1"
22
23# Drop-in replacement for jpeg
24PROVIDES = "jpeg"
25RPROVIDES:${PN} += "jpeg"
26RREPLACES:${PN} += "jpeg"
27RCONFLICTS:${PN} += "jpeg"
28
29inherit cmake pkgconfig
30
31export NASMENV = "--reproducible --debug-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}"
32
33# Add nasm-native dependency consistently for all build arches is hard
34EXTRA_OECMAKE:append:class-native = " -DWITH_SIMD=False"
35EXTRA_OECMAKE:append:class-nativesdk = " -DWITH_SIMD=False"
36
37# Work around missing x32 ABI support
38EXTRA_OECMAKE:append:class-target = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", "-DWITH_SIMD=False", "", d)}"
39
40# Work around missing non-floating point ABI support in MIPS
41EXTRA_OECMAKE:append:class-target = " ${@bb.utils.contains("MIPSPKGSFX_FPU", "-nf", "-DWITH_SIMD=False", "", d)}"
42
43EXTRA_OECMAKE:append:class-target:arm = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "", "-DWITH_SIMD=False", d)}"
44EXTRA_OECMAKE:append:class-target:armeb = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "", "-DWITH_SIMD=False", d)}"
45
46# Provide a workaround if Altivec unit is not present in PPC
47EXTRA_OECMAKE:append:class-target:powerpc = " ${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "-DWITH_SIMD=False", d)}"
48EXTRA_OECMAKE:append:class-target:powerpc64 = " ${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "-DWITH_SIMD=False", d)}"
49EXTRA_OECMAKE:append:class-target:powerpc64le = " ${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "-DWITH_SIMD=False", d)}"
50
51DEBUG_OPTIMIZATION:append:armv4 = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}"
52DEBUG_OPTIMIZATION:append:armv5 = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}"
53
54PACKAGES =+ "jpeg-tools libturbojpeg"
55
56DESCRIPTION:jpeg-tools = "The jpeg-tools package includes client programs to access libjpeg functionality. These tools allow for the compression, decompression, transformation and display of JPEG files and benchmarking of the libjpeg library."
57FILES:jpeg-tools = "${bindir}/*"
58
59DESCRIPTION:libturbojpeg = "A SIMD-accelerated JPEG codec which provides only TurboJPEG APIs"
60FILES:libturbojpeg = "${libdir}/libturbojpeg.so.*"
61
62BBCLASSEXTEND = "native nativesdk"