2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2012-06-03 08:32:24 +02:00
|
|
|
#
|
|
|
|
# jpeg-turbo
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2012-06-03 08:32:24 +02:00
|
|
|
|
2022-03-04 20:32:10 +01:00
|
|
|
JPEG_TURBO_VERSION = 2.1.3
|
2012-06-03 08:32:24 +02:00
|
|
|
JPEG_TURBO_SOURCE = libjpeg-turbo-$(JPEG_TURBO_VERSION).tar.gz
|
2017-07-24 20:26:03 +02:00
|
|
|
JPEG_TURBO_SITE = https://downloads.sourceforge.net/project/libjpeg-turbo/$(JPEG_TURBO_VERSION)
|
2018-05-31 19:08:19 +02:00
|
|
|
JPEG_TURBO_LICENSE = IJG (libjpeg), BSD-3-Clause (TurboJPEG), Zlib (SIMD)
|
|
|
|
JPEG_TURBO_LICENSE_FILES = LICENSE.md README.ijg
|
2021-03-02 14:45:33 +01:00
|
|
|
JPEG_TURBO_CPE_ID_VENDOR = libjpeg-turbo
|
|
|
|
JPEG_TURBO_CPE_ID_PRODUCT = libjpeg-turbo
|
2012-06-03 08:32:24 +02:00
|
|
|
JPEG_TURBO_INSTALL_STAGING = YES
|
2016-09-04 00:58:42 +02:00
|
|
|
JPEG_TURBO_PROVIDES = jpeg
|
2016-12-11 16:52:16 +01:00
|
|
|
JPEG_TURBO_DEPENDENCIES = host-pkgconf
|
2016-09-04 00:58:42 +02:00
|
|
|
|
2018-08-14 22:40:56 +02:00
|
|
|
JPEG_TURBO_CONF_OPTS = -DWITH_JPEG8=ON
|
2012-06-03 08:32:24 +02:00
|
|
|
|
2018-08-26 19:23:12 +02:00
|
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
|
|
|
JPEG_TURBO_CONF_OPTS += -DENABLE_STATIC=ON -DENABLE_SHARED=OFF
|
|
|
|
else ifeq ($(BR2_SHARED_STATIC_LIBS),y)
|
|
|
|
JPEG_TURBO_CONF_OPTS += -DENABLE_STATIC=ON -DENABLE_SHARED=ON
|
|
|
|
else ifeq ($(BR2_SHARED_LIBS),y)
|
|
|
|
JPEG_TURBO_CONF_OPTS += -DENABLE_STATIC=OFF -DENABLE_SHARED=ON
|
|
|
|
endif
|
|
|
|
|
2016-12-11 16:52:17 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_JPEG_SIMD_SUPPORT),y)
|
2018-08-14 22:40:56 +02:00
|
|
|
JPEG_TURBO_CONF_OPTS += -DWITH_SIMD=ON
|
2012-06-03 08:32:24 +02:00
|
|
|
# x86 simd support needs nasm
|
|
|
|
JPEG_TURBO_DEPENDENCIES += $(if $(BR2_X86_CPU_HAS_MMX),host-nasm)
|
|
|
|
else
|
2018-08-14 22:40:56 +02:00
|
|
|
JPEG_TURBO_CONF_OPTS += -DWITH_SIMD=OFF
|
2012-06-03 08:32:24 +02:00
|
|
|
endif
|
|
|
|
|
2020-02-22 19:10:40 +01:00
|
|
|
# Ensure that jpeg-turbo is compiled with -fPIC to allow linking the static
|
|
|
|
# libraries with dynamically linked programs. This is not a requirement
|
|
|
|
# for most architectures but is mandatory for ARM.
|
|
|
|
# This allow to avoid link issues with BR2_SSP_ALL:
|
|
|
|
# jsimd_none.c.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against external symbol `__stack_chk_guard@@GLIBC_2.17'
|
|
|
|
# can not be used when making a shared object; recompile with -fPIC
|
|
|
|
ifeq ($(BR2_STATIC_LIBS),)
|
|
|
|
JPEG_TURBO_CONF_OPTS += -DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
|
|
|
endif
|
|
|
|
|
2020-04-12 13:06:32 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_JPEG_TURBO_TOOLS),)
|
|
|
|
define JPEG_TURBO_REMOVE_TOOLS
|
2014-02-11 03:07:38 +01:00
|
|
|
rm -f $(addprefix $(TARGET_DIR)/usr/bin/,cjpeg djpeg jpegtran rdjpgcom tjbench wrjpgcom)
|
2012-06-03 08:32:24 +02:00
|
|
|
endef
|
2020-04-12 13:06:32 +02:00
|
|
|
JPEG_TURBO_POST_INSTALL_TARGET_HOOKS += JPEG_TURBO_REMOVE_TOOLS
|
|
|
|
endif
|
2012-06-03 08:32:24 +02:00
|
|
|
|
2018-08-14 22:40:56 +02:00
|
|
|
$(eval $(cmake-package))
|