easy-rsa: update to 3.2.1
[oi-userland.git] / components / library / FreeImage / Makefile
blob7829776adeec621627568e12fc4f6605a84e3797
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 2022, Daniel Chan
13 # Copyright 2022, Niklas Poslovski
16 BUILD_STYLE= justmake
17 include ../../../make-rules/shared-macros.mk
19 COMPONENT_NAME= FreeImage
20 COMPONENT_VERSION_MAJOR=3
21 COMPONENT_VERSION_MINOR=18
22 COMPONENT_VERSION_PATCH=0
23 COMPONENT_VERSION= $(COMPONENT_VERSION_MAJOR).$(COMPONENT_VERSION_MINOR).$(COMPONENT_VERSION_PATCH)
24 COMPONENT_REVISION= 12
25 COMPONENT_SUMMARY= A library project for developers to support popular graphics image formats
26 COMPONENT_PROJECT_URL= https://freeimage.sourceforge.io
27 COMPONENT_SRC= $(COMPONENT_NAME)
28 COMPONENT_ARCHIVE= $(COMPONENT_NAME)$(COMPONENT_VERSION_MAJOR)$(COMPONENT_VERSION_MINOR)$(COMPONENT_VERSION_PATCH).zip
29 COMPONENT_ARCHIVE_URL= https://downloads.sourceforge.net/freeimage/$(COMPONENT_ARCHIVE)
30 COMPONENT_ARCHIVE_HASH= sha256:f41379682f9ada94ea7b34fe86bf9ee00935a3147be41b6569c9605a53e438fd
31 COMPONENT_FMRI= library/libfreeimage
32 COMPONENT_CLASSIFICATION=System/Libraries
33 COMPONENT_LICENSE= GPLv3
34 COMPONENT_LICENSE_FILE= license-gplv3.txt
36 TEST_TARGET= $(NO_TESTS)
37 include $(WS_MAKE_RULES)/common.mk
39 # build with the distribution preferred libjpeg implementation
40 CFLAGS += $(JPEG_CPPFLAGS) $(JPEG_CFLAGS)
41 CXXFLAGS += $(JPEG_CPPFLAGS) $(JPEG_CXXFLAGS)
42 LDFLAGS += $(JPEG_LDFLAGS)
44 LDFLAGS += -L/usr/lib/$(MACH64) -ljpegxr
45 COMPONENT_POST_UNPACK_ACTION= \
46 cp $(SOURCE_DIR)/../libfreeimage.pc $(SOURCE_DIR)/ ;\
47 dos2unix $(SOURCE_DIR)/FreeImage.2013.vcxproj $(SOURCE_DIR)/FreeImage.2013.vcxproj_bak ;\
48 iconv -f 8859-15 -t UTF-8 $(SOURCE_DIR)/FreeImage.2013.vcxproj_bak > $(SOURCE_DIR)/FreeImage.2013.vcxproj ;\
49 echo "\n" >> $(SOURCE_DIR)/FreeImage.2013.vcxproj
51 COMPONENT_COPY_ACTION = cp $(SOURCE_DIR)/Source/LibJPEG/transupp.h $(SOURCE_DIR)/Dist/ && rm -r $(SOURCE_DIR)/Source/Lib* $(SOURCE_DIR)/Source/ZLib $(SOURCE_DIR)/Source/OpenEXR && cp -r $(SOURCE_DIR)/* $(@D)
52 COMPONENT_PRE_BUILD_ACTION = \
53 echo -n "SRC" test ;\
54 chmod +x $(@D)/gensrclist.sh;\
55 chmod +x $(@D)/genfipsrclist.sh;\
56 cd $(@D) && ./gensrclist.sh ;\
57 cd $(@D) && ./genfipsrclist.sh ;\
58 $(GSED) -i -e "s@MACH64@$(MACH64)@" $(@D)/Makefile.gnu
59 COMPONENT_BUILD_GMAKE_ARGS="file=Makefile.gnu"
61 FIFLAGS= -fPIC
62 FIFLAGS += -fexceptions
63 FIFLAGS += -fvisibility=default
64 CFLAGS += $(FIFLAGS)
65 CXXFLAGS += $(FIFLAGS)
66 CXXFLAGS += -Wno-ctor-dtor-privacy
68 # Auto-generated dependencies
69 REQUIRED_PACKAGES += $(GCC_RUNTIME_PKG)
70 REQUIRED_PACKAGES += $(GXX_RUNTIME_PKG)
71 REQUIRED_PACKAGES += $(JPEG_IMPLEM_PKG)
72 REQUIRED_PACKAGES += image/library/libpng16
73 REQUIRED_PACKAGES += image/library/libraw
74 REQUIRED_PACKAGES += image/library/libtiff
75 REQUIRED_PACKAGES += image/library/openjpeg
76 REQUIRED_PACKAGES += library/imath
77 REQUIRED_PACKAGES += library/jxrlib
78 REQUIRED_PACKAGES += library/libwebp
79 REQUIRED_PACKAGES += library/openexr
80 REQUIRED_PACKAGES += library/zlib
81 REQUIRED_PACKAGES += system/library