blob: e1df754b76f60530d879d3f1111e011a78a7124a [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001SUMMARY = "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=8184bcc7c4ac7b9edc6a7bc00f231d0b \
7 file://jpeglib.h;endline=16;md5=7ea97dc83b0f59052ee837e61ef0e08f \
8 file://djpeg.c;endline=11;md5=c59e19811c006cb38f82d6477134d314 \
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[md5sum] = "79f76fbfb0c6109631332762d10e16d2"
18SRC_URI[sha256sum] = "acb8599fe5399af114287ee5907aea4456f8f2c1cc96d26c28aebfdf5ee82fed"
19UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/libjpeg-turbo/files/"
20UPSTREAM_CHECK_REGEX = "/libjpeg-turbo/files/(?P<pver>(\d+[\.\-_]*)+)/"
21
22PE= "1"
23
24# Drop-in replacement for jpeg
25PROVIDES = "jpeg"
26RPROVIDES_${PN} += "jpeg"
27RREPLACES_${PN} += "jpeg"
28RCONFLICTS_${PN} += "jpeg"
29
30inherit cmake pkgconfig
31
32# Add nasm-native dependency consistently for all build arches is hard
33EXTRA_OECMAKE_append_class-native = " -DWITH_SIMD=False"
34EXTRA_OECMAKE_append_class-nativesdk = " -DWITH_SIMD=False"
35
36# Work around missing x32 ABI support
37EXTRA_OECMAKE_append_class-target = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", "-DWITH_SIMD=False", "", d)}"
38
39# Work around missing non-floating point ABI support in MIPS
40EXTRA_OECMAKE_append_class-target = " ${@bb.utils.contains("MIPSPKGSFX_FPU", "-nf", "-DWITH_SIMD=False", "", d)}"
41
42# Provide a workaround if Altivec unit is not present in PPC
43EXTRA_OECMAKE_append_class-target_powerpc = " ${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "-DWITH_SIMD=False", d)}"
44EXTRA_OECMAKE_append_class-target_powerpc64 = " ${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "-DWITH_SIMD=False", d)}"
45
46DEBUG_OPTIMIZATION_append_armv4 = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}"
47DEBUG_OPTIMIZATION_append_armv5 = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}"
48
49PACKAGES =+ "jpeg-tools libturbojpeg"
50
51DESCRIPTION_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."
52FILES_jpeg-tools = "${bindir}/*"
53
54DESCRIPTION_libturbojpeg = "A SIMD-accelerated JPEG codec which provides only TurboJPEG APIs"
55FILES_libturbojpeg = "${libdir}/libturbojpeg.so.*"
56
57BBCLASSEXTEND = "native nativesdk"