summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTony Theodore <tonyt@logyst.com>2021-01-10 01:28:50 (GMT)
committerTony Theodore <tonyt@logyst.com>2021-01-10 01:28:50 (GMT)
commit1e59c1967f771dfeece4aec9da8f6624fcaa526f (patch)
tree97a7014e5958b879a6236f2d64a4a3365656f8b5 /src
parentc52ebc3b5b3ad636a25641cb9a57bb7038ed22fb (diff)
downloadmxe-1e59c1967f771dfeece4aec9da8f6624fcaa526f.zip
mxe-1e59c1967f771dfeece4aec9da8f6624fcaa526f.tar.gz
mxe-1e59c1967f771dfeece4aec9da8f6624fcaa526f.tar.bz2
openjpeg: fix .pc file and add test
Diffstat (limited to 'src')
-rw-r--r--src/openjpeg-1-fixes.patch20
-rw-r--r--src/openjpeg.mk5
2 files changed, 25 insertions, 0 deletions
diff --git a/src/openjpeg-1-fixes.patch b/src/openjpeg-1-fixes.patch
new file mode 100644
index 0000000..b666b71
--- /dev/null
+++ b/src/openjpeg-1-fixes.patch
@@ -0,0 +1,20 @@
+This file is part of MXE. See LICENSE.md for licensing information.
+
+Contains ad hoc patches for cross building.
+
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Tony Theodore <tonyt@logyst.com>
+Date: Sun, 10 Jan 2021 11:25:42 +1100
+Subject: [PATCH 1/1] add deps and static flags
+
+
+diff --git a/src/lib/openjp2/libopenjp2.pc.cmake.in b/src/lib/openjp2/libopenjp2.pc.cmake.in
+index 1111111..2222222 100644
+--- a/src/lib/openjp2/libopenjp2.pc.cmake.in
++++ b/src/lib/openjp2/libopenjp2.pc.cmake.in
+@@ -12,3 +12,5 @@ Version: @OPENJPEG_VERSION@
+ Libs: -L${libdir} -lopenjp2
+ Libs.private: -lm
+ Cflags: -I${includedir}
++Cflags.private: -DOPJ_STATIC
++Requires: lcms2 libpng libtiff-4 zlib
diff --git a/src/openjpeg.mk b/src/openjpeg.mk
index fb5e0b6..47cfec9 100644
--- a/src/openjpeg.mk
+++ b/src/openjpeg.mk
@@ -17,4 +17,9 @@ define $(PKG)_BUILD
-DBUILD_TESTING=OFF
$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)'
$(MAKE) -C '$(BUILD_DIR)' -j 1 install
+
+ '$(TARGET)-gcc' -Wall -Wextra \
+ '$(SOURCE_DIR)/tests/unit/testempty1.c' \
+ -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \
+ `'$(TARGET)-pkg-config' libopenjp2 --cflags --libs`
endef