diff --git a/packages/gmic/build.sh b/packages/gmic/build.sh new file mode 100644 index 000000000..44ead5f60 --- /dev/null +++ b/packages/gmic/build.sh @@ -0,0 +1,24 @@ +TERMUX_PKG_HOMEPAGE="http://gmic.eu" +TERMUX_PKG_DESCRIPTION="imageman" +TERMUX_PKG_VERSION=2.0.2 +TERMUX_PKG_SRCURL=http://gmic.eu/files/source/gmic_$TERMUX_PKG_VERSION.tar.gz +TERMUX_PKG_FOLDERNAME="gmic-$TERMUX_PKG_VERSION" +TERMUX_PKG_SHA256=7da9f08d62a9d23fc8badbc7c819cf76f4a9ce3db763710268fdcb80d83ecfc6 +TERMUX_PKG_DEPENDS="graphicsmagick++, libcurl, fftw" +TERMUX_PKG_REVISION=2 +TERMUX_PKG_NO_DEVELSPLIT=yes +TERMUX_PKG_BUILD_IN_SRC=yes +termux_step_configure(){ + return 0; +} +termux_step_make () { + cd src/ + make cli +} +termux_step_make_install() { + cp src/gmic $TERMUX_PREFIX/bin/gmic + cp src/*.h $TERMUX_PREFIX/include/ + gunzip man/gmic.1.gz + cp man/gmic.1 $TERMUX_PREFIX/share/man/man1 +} + diff --git a/packages/gmic/makefile.patch b/packages/gmic/makefile.patch new file mode 100644 index 000000000..ecf2e0ccb --- /dev/null +++ b/packages/gmic/makefile.patch @@ -0,0 +1,52 @@ +--- ../cache/gmic-2.0.2/src/Makefile 2017-06-22 12:41:18.000000000 +0000 ++++ ./src/Makefile 2017-07-25 05:12:48.923623739 +0000 +@@ -51,7 +51,7 @@ + + # Try to auto-detect target OS. + OS := $(shell uname) +-USR = /usr ++USR = $(PREFIX) + LIB = lib + BIN = bin + INCLUDE = include +@@ -122,9 +122,7 @@ + endif + + ifdef NOSTRIP +-STRIP = echo skip strip +-else +-STRIP = strip ++STRIP = echo skip stripe + endif + + #------------------------------------------------- +@@ -175,7 +173,7 @@ + # Flags to enable parallel processing. + PARALLEL_CFLAGS = -Dgmic_is_parallel + ifneq ($(OS),Windows) +-PARALLEL_LIBS = -lpthread ++PARALLEL_LIBS = #-lpthread + endif + + # Flags to enable extra checking of image buffer pointers. +@@ -288,8 +286,8 @@ + GMIC_CLI_CFLAGS = $(MANDATORY_CFLAGS) $(ABORT_CFLAGS) $(PARALLEL_CFLAGS) $(FFTW_CFLAGS) $(CURL_CFLAGS) $(PNG_CFLAGS) $(JPEG_CFLAGS) $(TIFF_CFLAGS) + GMIC_CLI_LIBS = $(MANDATORY_LIBS) $(PARALLEL_LIBS) $(FFTW_LIBS) $(CURL_LIBS) $(PNG_LIBS) $(JPEG_LIBS) $(TIFF_LIBS) + ifeq ($(OS),Unix) # Unix. +-GMIC_CLI_CFLAGS += $(OPENMP_CFLAGS) $(X11_CFLAGS) $(OPENEXR_CFLAGS) $(OPENCV_CFLAGS) # $(XSHM_CFLAGS) $(MAGICK_CFLAGS) +-GMIC_CLI_LIBS += $(OPENMP_LIBS) $(X11_LIBS) $(OPENEXR_LIBS) $(OPENCV_LIBS) # $(XSHM_LIBS) # $(MAGICK_LIBS) ++GMIC_CLI_CFLAGS += $(MAGICK_CFLAGS) # $(OPENMP_CFLAGS) $(X11_CFLAGS) $(OPENEXR_CFLAGS) $(OPENCV_CFLAGS) # $(XSHM_CFLAGS) $(MAGICK_CFLAGS) ++GMIC_CLI_LIBS += $(MAGICK_LIBS) # $(OPENMP_LIBS) $(X11_LIBS) $(OPENEXR_LIBS) $(OPENCV_LIBS) # $(XSHM_LIBS) # $(MAGICK_LIBS) + else + ifeq ($(OS),Darwin) # MacOSX. + GMIC_CLI_CFLAGS += $(X11_CFLAGS) $(OPENEXR_CFLAGS) +@@ -415,8 +413,7 @@ + endif + + cli: +- $(MAKE) "CFLAGS+=$(GMIC_CLI_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(GMIC_CLI_LIBS)" gmic +- $(STRIP) gmic$(EXE) ++ $(MAKE) "CFLAGS+= $(CXXFLAGS) $(GMIC_CLI_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(GMIC_CLI_LIBS)" gmic + + cli_s: + ifeq ($(OS),Darwin)