From e4a9c6a5216446800a67dc65b28f1983e3b39e19 Mon Sep 17 00:00:00 2001 From: Leonid Plyushch Date: Tue, 7 May 2019 01:02:58 +0300 Subject: [PATCH] gmic fix for ARM --- packages/gmic/CImg.h.patch | 13 +++++++++++++ packages/gmic/build.sh | 8 ++++++-- packages/gmic/makefile.patch | 2 +- 3 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 packages/gmic/CImg.h.patch diff --git a/packages/gmic/CImg.h.patch b/packages/gmic/CImg.h.patch new file mode 100644 index 000000000..75e25a034 --- /dev/null +++ b/packages/gmic/CImg.h.patch @@ -0,0 +1,13 @@ +--- src/CImg.h.orig 2019-03-06 00:12:31.199855708 +0000 ++++ ./src/CImg.h 2019-03-06 00:13:39.517197538 +0000 +@@ -60983,8 +60984,8 @@ + _cimg_test_temporary_path("D:\\Temp"); + _cimg_test_temporary_path("D:"); + #else +- _cimg_test_temporary_path("/tmp"); +- _cimg_test_temporary_path("/var/tmp"); ++ _cimg_test_temporary_path("@TERMUX_PREFIX@/tmp"); ++ _cimg_test_temporary_path("@TERMUX_PREFIX@/var/tmp"); + #endif + if (!path_found) { + *s_path = 0; diff --git a/packages/gmic/build.sh b/packages/gmic/build.sh index ca45189bd..6e2e5edd3 100644 --- a/packages/gmic/build.sh +++ b/packages/gmic/build.sh @@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://gmic.eu TERMUX_PKG_DESCRIPTION="Full-featured framework for image processing" TERMUX_PKG_LICENSE="CeCILL-2.1" TERMUX_PKG_VERSION=2.5.7 -TERMUX_PKG_REVISION=1 +TERMUX_PKG_REVISION=2 TERMUX_PKG_SHA256=1cc71b48c1c3da928031b7f32cf3fe4757a07b4f21c3af4167389d54cf2dee5f TERMUX_PKG_SRCURL=https://gmic.eu/files/source/gmic_$TERMUX_PKG_VERSION.tar.gz TERMUX_PKG_DEPENDS="graphicsmagick++, libcurl, fftw, libpng, libjpeg-turbo, libtiff, zlib" @@ -16,7 +16,11 @@ termux_step_configure() { termux_step_make() { cd src/ - make cli + if [ $TERMUX_ARCH = "arm" ]; then + make cli LIBS=" -lunwind -L/data/data/com.termux/files/usr/lib -lfftw3 -lfftw3_threads -lcurl -lpng16 -lz -ljpeg -ltiff -lGraphicsMagick++ -lGraphicsMagick" + else + make cli + fi } termux_step_make_install() { diff --git a/packages/gmic/makefile.patch b/packages/gmic/makefile.patch index 8d3b34454..92b58c9e7 100644 --- a/packages/gmic/makefile.patch +++ b/packages/gmic/makefile.patch @@ -47,7 +47,7 @@ diff -u -r ../gmic-2.2.3/src/Makefile ./src/Makefile cli: - $(MAKE) "CFLAGS+=$(GMIC_CLI_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(GMIC_CLI_LIBS)" _cli - $(STRIP) gmic$(EXE) -+ $(MAKE) "CFLAGS+= $(CXXFLAGS) $(LDFLAGS) $(GMIC_CLI_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(GMIC_CLI_LIBS)" _cli ++ $(MAKE) "CFLAGS+= $(CXXFLAGS) $(GMIC_CLI_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(GMIC_CLI_LIBS)" _cli debug: $(MAKE) "CFLAGS+=$(GMIC_CLI_CFLAGS) $(DEBUG_CFLAGS)" "LIBS+=$(GMIC_CLI_LIBS)" _cli