mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-27 20:40:34 -09:00
Buildroot commit03a1732deabumped the package from 2.0.33 to 4.2.8. This bump includes upstream commit91fca09209which was added to version 3.0.0 and causes build errors when threads are not available: message(FATAL_ERROR "Threading support is not available.") because JAS_ENABLE_MULTITHREADING_SUPPORT defaults to ON: https://github.com/jasper-software/jasper/blob/version-4.2.8/CMakeLists.txt#L124 Add configure options to disable thread support when needed. Fixes: https://autobuild.buildroot.net/results/870/870d6adbac166b22cce217628d477b1bce538320/ Signed-off-by: Bernd Kuhls <bernd@kuhls.net> Signed-off-by: Julien Olivain <ju.o@free.fr> (cherry picked from commitd32b12b548) Signed-off-by: Thomas Perale <thomas.perale@mind.be>
57 lines
1.6 KiB
Makefile
57 lines
1.6 KiB
Makefile
################################################################################
|
|
#
|
|
# jasper
|
|
#
|
|
################################################################################
|
|
|
|
JASPER_VERSION = 4.2.8
|
|
JASPER_SITE = https://github.com/jasper-software/jasper/releases/download/version-$(JASPER_VERSION)
|
|
JASPER_INSTALL_STAGING = YES
|
|
JASPER_LICENSE = JasPer-2.0
|
|
JASPER_LICENSE_FILES = LICENSE.txt
|
|
JASPER_CPE_ID_VALID = YES
|
|
JASPER_SUPPORTS_IN_SOURCE_BUILD = NO
|
|
JASPER_CONF_OPTS = \
|
|
-DJAS_ENABLE_DOC=OFF \
|
|
-DJAS_ENABLE_PROGRAMS=OFF
|
|
|
|
# Despite using JASPER_SUPPORTS_IN_SOURCE_BUILD = NO jasper detects an
|
|
# in-source-build because a subdirectory inside the source directory
|
|
# is used so we need to force the build.
|
|
JASPER_CONF_OPTS += \
|
|
-DALLOW_IN_SOURCE_BUILD=ON
|
|
|
|
# When cross-compiling, we have to feed in the C++ standard to use,
|
|
# upstream doesn't want to auto-detect it:
|
|
# https://github.com/jasper-software/jasper/issues/358
|
|
JASPER_STDC_VERSION="`echo __STDC_VERSION__ | $(TARGET_CROSS)cpp -E -P -`"
|
|
JASPER_CONF_OPTS += \
|
|
-DJAS_STDC_VERSION=$(JASPER_STDC_VERSION)
|
|
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
|
JASPER_CONF_OPTS += -DJAS_ENABLE_SHARED=OFF
|
|
endif
|
|
|
|
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
|
|
JASPER_CONF_OPTS += -DJAS_ENABLE_MULTITHREADING_SUPPORT=ON
|
|
else
|
|
JASPER_CONF_OPTS += -DJAS_ENABLE_MULTITHREADING_SUPPORT=OFF
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_JPEG),y)
|
|
JASPER_CONF_OPTS += -DJAS_ENABLE_LIBJPEG=ON
|
|
JASPER_DEPENDENCIES += jpeg
|
|
else
|
|
JASPER_CONF_OPTS += -DJAS_ENABLE_LIBJPEG=OFF
|
|
endif
|
|
|
|
JASPER_CFLAGS = $(TARGET_CFLAGS)
|
|
|
|
ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
|
|
JASPER_CFLAGS += -O0
|
|
endif
|
|
|
|
JASPER_CONF_OPTS += -DCMAKE_C_FLAGS="$(JASPER_CFLAGS)"
|
|
|
|
$(eval $(cmake-package))
|