openssl-1.1: add patches for CVE-2024-2511 and CVE-2024-4741
[oi-userland.git] / components / library / libjpeg-turbo / Makefile
blobbc5dd7d2f4b20db3142cb9b21cfcc170f7f2118c
2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL)". You may
4 # only use this file in accordance with the terms of the CDDL.
6 # A full copy of the text of the CDDL should have accompanied this
7 # source. A copy of the CDDL is also available via the Internet at
8 # http://www.illumos.org/license/CDDL.
12 # Copyright 2015 Aurelien Larcher
15 BUILD_BITS= 32_and_64
16 USE_COMMON_TEST_MASTER= no
17 include ../../../make-rules/shared-macros.mk
19 COMPONENT_NAME= libjpeg-turbo
20 COMPONENT_VERSION= 3.0.3
21 COMPONENT_SUMMARY= libjpeg -JPEG Turbo libraries
22 COMPONENT_PROJECT_URL= https://www.libjpeg-turbo.org/
23 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
24 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
25 COMPONENT_ARCHIVE_HASH= sha256:343e789069fc7afbcdfe44dbba7dbbf45afa98a15150e079a38e60e44578865d
26 COMPONENT_ARCHIVE_URL= https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
27 COMPONENT_FMRI= image/library/libjpeg-turbo
28 COMPONENT_CLASSIFICATION= System/Multimedia Libraries
29 COMPONENT_LICENSE= IJG,BSD,zlib
30 COMPONENT_LICENSE_FILE= LICENSE.md
32 include $(WS_MAKE_RULES)/prep.mk
33 include $(WS_MAKE_RULES)/cmake.mk
34 include $(WS_MAKE_RULES)/ips.mk
36 CMAKE_DEFAULT_DIRS= no
38 # Warnings are normal: libtool: error: ignoring unknown tag NASM
40 CMAKE_OPTIONS.JPEG6=
41 CMAKE_OPTIONS.JPEG7= -DWITH_JPEG7=ON
42 CMAKE_OPTIONS.JPEG8= -DWITH_JPEG8=ON
44 LIBJPEG_TURBO_X_PREFIX=$(USRLIBDIR)/libjpeg$(JPEG_API_VERSION)-turbo
46 CMAKE_OPTIONS+= -DENABLE_STATIC=FALSE
47 # Allow for build with different API compliance
48 CMAKE_OPTIONS+= $(CMAKE_OPTIONS.JPEG$(JPEG_API_VERSION))
49 CMAKE_OPTIONS+= -DCMAKE_INSTALL_PREFIX=$(LIBJPEG_TURBO_X_PREFIX)
50 CMAKE_OPTIONS+= -DCMAKE_INSTALL_MANDIR=$(USRSHAREMANDIR)
51 CMAKE_OPTIONS+= -DCMAKE_INSTALL_DOCDIR=$(USRSHAREDOCDIR)/libjpeg-turbo
52 CMAKE_OPTIONS+= -DCMAKE_INSTALL_INCLUDEDIR=$(USRINCDIR)/libjpeg$(JPEG_API_VERSION)-turbo
53 CMAKE_OPTIONS.32+= -DCMAKE_INSTALL_BINDIR=$(LIBJPEG_TURBO_X_PREFIX)/bin
54 CMAKE_OPTIONS.32+= -DCMAKE_INSTALL_LIBDIR=$(LIBJPEG_TURBO_X_PREFIX)/lib
55 CMAKE_OPTIONS.64+= -DCMAKE_INSTALL_BINDIR=$(LIBJPEG_TURBO_X_PREFIX)/bin/$(MACH64)
56 CMAKE_OPTIONS.64+= -DCMAKE_INSTALL_LIBDIR=$(LIBJPEG_TURBO_X_PREFIX)/lib/$(MACH64)
58 COMPONENT_TEST_TRANSFORMS+= '-e "s/[0-9. ]*sec//g"'
60 # Define rules for each API build
61 BUILD_DIR_32_6 = $(BUILD_DIR)/$(MACH32)/6
62 BUILD_DIR_32_7 = $(BUILD_DIR)/$(MACH32)/7
63 BUILD_DIR_32_8 = $(BUILD_DIR)/$(MACH32)/8
64 BUILD_DIR_64_6 = $(BUILD_DIR)/$(MACH64)/6
65 BUILD_DIR_64_7 = $(BUILD_DIR)/$(MACH64)/7
66 BUILD_DIR_64_8 = $(BUILD_DIR)/$(MACH64)/8
67 $(BUILD_DIR_32)/%/.configured: BITS=32
68 $(BUILD_DIR_64)/%/.configured: BITS=64
69 $(BUILD_DIR)/%/6/.configured: JPEG_API_VERSION=6
70 $(BUILD_DIR)/%/7/.configured: JPEG_API_VERSION=7
71 $(BUILD_DIR)/%/8/.configured: JPEG_API_VERSION=8
73 BUILD_32 = $(BUILD_DIR_32_6)/.built $(BUILD_DIR_32_7)/.built $(BUILD_DIR_32_8)/.built
74 BUILD_64 = $(BUILD_DIR_64_6)/.built $(BUILD_DIR_64_7)/.built $(BUILD_DIR_64_8)/.built
75 BUILD_32_and_64 = $(BUILD_32) $(BUILD_64)
76 $(BUILD_DIR_32)/%/.built: BITS=32
77 $(BUILD_DIR_64)/%/.built: BITS=64
78 $(BUILD_DIR)/%/6/.built: JPEG_API_VERSION=6
79 $(BUILD_DIR)/%/7/.built: JPEG_API_VERSION=7
80 $(BUILD_DIR)/%/8/.built: JPEG_API_VERSION=8
82 INSTALL_32 = $(BUILD_DIR_32_6)/.installed $(BUILD_DIR_32_7)/.installed $(BUILD_DIR_32_8)/.installed
83 INSTALL_64 = $(BUILD_DIR_64_6)/.installed $(BUILD_DIR_64_7)/.installed $(BUILD_DIR_64_8)/.installed
84 INSTALL_32_and_64 = $(INSTALL_32) $(INSTALL_64)
85 $(BUILD_DIR_32)/%/.installed: BITS=32
86 $(BUILD_DIR_64)/%/.installed: BITS=64
87 $(BUILD_DIR)/%/6/.installed: JPEG_API_VERSION=6
88 $(BUILD_DIR)/%/7/.installed: JPEG_API_VERSION=7
89 $(BUILD_DIR)/%/8/.installed: JPEG_API_VERSION=8
91 ifeq ($(strip $(wildcard $(COMPONENT_TEST_RESULTS_DIR)/results-*.master)),)
92 TEST_32 = $(BUILD_DIR_32_6)/.tested $(BUILD_DIR_32_7)/.tested $(BUILD_DIR_32_8)/.tested
93 TEST_64 = $(BUILD_DIR_64_6)/.tested $(BUILD_DIR_64_7)/.tested $(BUILD_DIR_64_8)/.tested
94 $(BUILD_DIR_32)/%/.tested: BITS=32
95 $(BUILD_DIR_64)/%/.tested: BITS=64
96 $(BUILD_DIR)/%/6/.tested: JPEG_API_VERSION=6
97 $(BUILD_DIR)/%/7/.tested: JPEG_API_VERSION=7
98 $(BUILD_DIR)/%/8/.tested: JPEG_API_VERSION=8
99 else
100 TEST_32 = $(BUILD_DIR_32_6)/.tested-and-compared $(BUILD_DIR_32_7)/.tested-and-compared $(BUILD_DIR_32_8)/.tested-and-compared
101 TEST_64 = $(BUILD_DIR_64_6)/.tested-and-compared $(BUILD_DIR_64_7)/.tested-and-compared $(BUILD_DIR_64_8)/.tested-and-compared
102 $(BUILD_DIR_32)/%/.tested-and-compared: BITS=32
103 $(BUILD_DIR_64)/%/.tested-and-compared: BITS=64
104 $(BUILD_DIR)/%/6/.tested-and-compared: JPEG_API_VERSION=6
105 $(BUILD_DIR)/%/7/.tested-and-compared: JPEG_API_VERSION=7
106 $(BUILD_DIR)/%/8/.tested-and-compared: JPEG_API_VERSION=8
107 endif
109 TEST_32_and_64 = $(TEST_32) $(TEST_64)
111 build: $(BUILD_32_and_64)
113 install: $(INSTALL_32_and_64)
115 test: $(TEST_32_and_64)
117 # Auto-generated dependencies
118 REQUIRED_PACKAGES += system/library
119 REQUIRED_PACKAGES += system/library/math