vim: update to 9.1.0984
[oi-userland.git] / components / library / jxrlib / Makefile
blob798510af159c7673969df15c212536471360162e
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
15 BUILD_BITS= 64
16 BUILD_STYLE= justmake
18 include ../../../make-rules/shared-macros.mk
20 COMPONENT_NAME= jxrlib
21 COMPONENT_VERSION= 0.2.4
22 COMPONENT_SUMMARY= Decode and encode JPEG-XR data from Java
23 COMPONENT_PROJECT_URL= https://github.com/glencoesoftware/jxrlib
24 COMPONENT_FMRI= library/jxrlib
25 COMPONENT_CLASSIFICATION=System/Libraries
26 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
27 COMPONENT_ARCHIVE= $(COMPONENT_SRC).zip
28 COMPONENT_ARCHIVE_URL= https://github.com/glencoesoftware/$(COMPONENT_NAME)/archive/refs/tags/v$(COMPONENT_VERSION).zip
29 COMPONENT_ARCHIVE_HASH= sha256:aef05b75f33551baf03373e13011ca25623632cfe6079b2d0ea32f4535e72b75
30 COMPONENT_LICENSE= BSD 2-Clause
31 COMPONENT_LICENSE_FILE= LICENSE
33 include $(WS_MAKE_RULES)/common.mk
35 PATH=$(PATH.gnu)
36 COMPONENT_PRE_BUILD_ACTION += cd $(@D)/java && mkdir -p target/swig/ome/jxrlib;
37 COMPONENT_PRE_BUILD_ACTION += cd $(@D)/java && swig -java -c++ -package ome.jxrlib -outdir target/swig/ome/jxrlib -o target/swig/JXR_wrap.cxx JXR.i;
38 COMPONENT_PRE_BUILD_ACTION += mkdir -p $(@D)/garbagecollector; \
39 echo \<settings\>\<localRepository\>$(@D)\/garbagecollector\/Repository\<\/localRepository\>\<\/settings\> > "$(@D)/garbagecollector/settings.xml"; \
40 sed 's|"DIR_INSTALL": "$(DIR_INSTALL)"|"PREFIX": "$(PREFIX)"|g' -i $(SOURCE_DIR)/Makefile
41 COMPONENT_BUILD_GMAKE_ARGS+=SHARED=1
42 COMPONENT_BUILD_GMAKE_ARGS+=PREFIX=/usr
43 COMPONENT_BUILD_GMAKE_ARGS+=swig all
44 COMPONENT_BUILD_GMAKE_ARGS+=CC="$(CC) $(CFLAGS)"
45 COMPONENT_BUILD_GMAKE_ARGS+=CXX="$(CXX) $(CXXFLAGS)"
46 COMPONENT_PRE_INSTALL_ACTION=LD_LIBRARY_PATH="$(@D)/build" mvn -s "$(@D)/garbagecollector/settings.xml" -f $(@D)/java package
47 COMPONENT_INSTALL_ARGS+=SHARED=1
48 COMPONENT_INSTALL_ARGS+=PREFIX=/usr
49 COMPONENT_INSTALL_ARGS+=DIR_INSTALL=$(PROTO_DIR)/
50 COMPONENT_POST_INSTALL_ACTION += cd $(@D)/java/target && ginstall -Dm 644 $(COMPONENT_SRC).jar $(PROTO_DIR)/usr/share/java/$(COMPONENT_SRC).jar
52 # Build dependencies
53 REQUIRED_PACKAGES += developer/build/maven
54 REQUIRED_PACKAGES += runtime/java/openjdk8
56 # Auto-generated dependencies
57 REQUIRED_PACKAGES += system/library