Browse Source

gmic fix for ARM

emacs-27
Leonid Plyushch 6 years ago
parent
commit
e4a9c6a521
  1. 13
      packages/gmic/CImg.h.patch
  2. 8
      packages/gmic/build.sh
  3. 2
      packages/gmic/makefile.patch

13
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;

8
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() {

2
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

Loading…
Cancel
Save