gmic: fix license, clean do_build
This commit is contained in:
parent
483b7168ca
commit
f9156b4cc1
|
@ -0,0 +1,44 @@
|
|||
Index: gmic-2.9.9/src/Makefile
|
||||
===================================================================
|
||||
--- gmic-2.9.9.orig/src/Makefile
|
||||
+++ gmic-2.9.9/src/Makefile
|
||||
@@ -163,13 +163,13 @@ NO_PRERELEASE = $(shell date +%y%m%d)
|
||||
NO_PRERELEASE_CFLAGS = -Dgmic_prerelease="\\\"$(PRERELEASE)\\\""
|
||||
|
||||
# Minimal set of flags mandatory to compile G'MIC.
|
||||
-MANDATORY_CFLAGS = -Dgmic_build -Dcimg_date=\\\"\\\" -Dcimg_time=\\\"\\\" -Dcimg_use_zlib -I. $(shell pkg-config --cflags zlib || echo -I$(USR)/$(INCLUDE)) $(PRERELEASE_CFLAGS) $(EXTRA_CFLAGS)
|
||||
+MANDATORY_CFLAGS = -Dgmic_build -Dcimg_date=\\\"\\\" -Dcimg_time=\\\"\\\" -Dcimg_use_zlib -I. $(shell pkg-config --cflags zlib) $(PRERELEASE_CFLAGS) $(EXTRA_CFLAGS)
|
||||
MANDATORY_LIBS = $(shell pkg-config --libs zlib || echo -lz) $(EXTRA_LIBS)
|
||||
|
||||
ifndef NO_SRIPDLIB
|
||||
MANDATORY_CFLAGS += -std=c++11 -pedantic
|
||||
endif
|
||||
-MANDATORY_LIBS += -L$(USR)/$(LIB)
|
||||
+MANDATORY_LIBS +=
|
||||
ifdef IS_GCC
|
||||
MANDATORY_CFLAGS += -Wall -Wextra -Wfatal-errors -Werror=unknown-pragmas -Werror=unused-label
|
||||
MANDATORY_LIBS += -lm
|
||||
@@ -250,7 +250,7 @@ endif
|
||||
# Enable faster X11 display, using XShm extension.
|
||||
# (ftp://www.x.org/pub/X11R7.7/doc/man/man3/XShm.3.xhtml)
|
||||
XSHM_CFLAGS = -Dcimg_use_xshm $(shell pkg-config --cflags xcb-shm)
|
||||
-XSHM_LIBS = $(shell pkg-config --libs xcb-shm || echo -L$(USR)/X11R6/lib) -lXext
|
||||
+XSHM_LIBS = $(shell pkg-config --libs xcb-shm) -lXext
|
||||
|
||||
# Enable image display, using GDI32 (Windows).
|
||||
GDI32_CFLAGS = -Dcimg_display=2
|
||||
@@ -303,12 +303,12 @@ OPENCV_LIBS = $(shell pkg-config opencv
|
||||
|
||||
# Enable support of most classical image file formats, using the GraphicsMagick++ library.
|
||||
# (http://www.graphicsmagick.org/Magick++/)
|
||||
-MAGICK_CFLAGS = -Dcimg_use_magick $(shell pkg-config --cflags GraphicsMagick++ || echo -I$(USR)/$(INCLUDE)/GraphicsMagick)
|
||||
+MAGICK_CFLAGS = -Dcimg_use_magick $(shell pkg-config --cflags GraphicsMagick++ || echo -I$(XBPS_CROSS_BASE)$(USR)/$(INCLUDE)/GraphicsMagick)
|
||||
MAGICK_LIBS = $(shell pkg-config --libs GraphicsMagick++ || echo -lGraphicsMagick++)
|
||||
|
||||
# Enable native support of EXR image files, using the OpenEXR library.
|
||||
# (http://www.openexr.com/)
|
||||
-OPENEXR_CFLAGS = -Dcimg_use_openexr -I$(USR)/$(INCLUDE)/OpenEXR
|
||||
+OPENEXR_CFLAGS = -Dcimg_use_openexr -I$(XBPS_CROSS_BASE)$(USR)/$(INCLUDE)/OpenEXR
|
||||
OPENEXR_LIBS = -lIlmImf -lHalf
|
||||
|
||||
# Enable Fast Fourier Transforms, using the FFTW3 library.
|
|
@ -0,0 +1,28 @@
|
|||
Index: gmic-2.9.9/src/Makefile
|
||||
===================================================================
|
||||
--- gmic-2.9.9.orig/src/Makefile
|
||||
+++ gmic-2.9.9/src/Makefile
|
||||
@@ -192,9 +192,9 @@ endif
|
||||
|
||||
# Enable optimizations for 'cli'.
|
||||
FLTO = -flto
|
||||
-OPT_CLI_CFLAGS = -Ofast
|
||||
+OPT_CLI_CFLAGS =
|
||||
ifdef IS_GCC
|
||||
-OPT_CLI_CFLAGS = -Ofast -mtune=generic $(FLTO)
|
||||
+OPT_CLI_CFLAGS = $(FLTO)
|
||||
OPT_CLI_LIBS = $(FLTO)
|
||||
endif
|
||||
ifdef icpc
|
||||
Index: gmic-2.9.9/gmic-qt/gmic_qt.pro
|
||||
===================================================================
|
||||
--- gmic-2.9.9.orig/gmic-qt/gmic_qt.pro
|
||||
+++ gmic-2.9.9/gmic-qt/gmic_qt.pro
|
||||
@@ -445,7 +445,6 @@ translations/zh_tw.ts
|
||||
|
||||
# PRE_TARGETDEPS +=
|
||||
|
||||
-QMAKE_CXXFLAGS_RELEASE += -Ofast # -O3 -s
|
||||
QMAKE_LFLAGS_RELEASE += -s
|
||||
QMAKE_CXXFLAGS_DEBUG += -Dcimg_verbosity=3
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
Index: gmic-2.9.9/src/Makefile
|
||||
===================================================================
|
||||
--- gmic-2.9.9.orig/src/Makefile
|
||||
+++ gmic-2.9.9/src/Makefile
|
||||
@@ -67,8 +67,8 @@ INCLUDE = include
|
||||
SO = .so
|
||||
PIC = -fPIC
|
||||
EXE =
|
||||
-WGET = wget --no-check-certificate --quiet -O
|
||||
-PLUGINDIR = $(shell gimptool-2.0 --gimpplugindir)/plug-ins
|
||||
+WGET = false
|
||||
+PLUGINDIR = /usr/lib/gimp/2.0/plug-ins
|
||||
VERSION = $(shell grep 'gmic_version\ ' gmic.h | tail -c4 | head -c3)
|
||||
VERSION1 = $(shell grep 'gmic_version\ ' gmic.h | tail -c4 | head -c1)
|
||||
VERSION2 = $(shell grep 'gmic_version\ ' gmic.h | tail -c3 | head -c1)
|
|
@ -0,0 +1,39 @@
|
|||
Index: gmic-2.9.9/src/Makefile
|
||||
===================================================================
|
||||
--- gmic-2.9.9.orig/src/Makefile
|
||||
+++ gmic-2.9.9/src/Makefile
|
||||
@@ -327,25 +327,32 @@ BOARD_LIBS = -lboard
|
||||
#-------------------------------
|
||||
# Define main Makefile entries.
|
||||
#-------------------------------
|
||||
|
||||
# Multi-targets
|
||||
#--------------
|
||||
-all:
|
||||
+all: cli lib gimp gmic_qt libc zart
|
||||
+
|
||||
+gmic_qt: gimp
|
||||
+
|
||||
+gimp zart: cli lib libc
|
||||
+
|
||||
+cli lib libc: all-banner
|
||||
+
|
||||
+all-banner:
|
||||
@echo "**"
|
||||
ifeq ($(OS),Unix)
|
||||
@echo "** Start building G'MIC with default Unix configuration."
|
||||
else
|
||||
ifeq ($(OS),Darwin)
|
||||
@echo "** Start building G'MIC with default MacOSX configuration."
|
||||
else
|
||||
@echo "** Start building G'MIC with default Windows configuration."
|
||||
endif
|
||||
endif
|
||||
@echo "**"
|
||||
- $(MAKE) cli lib gimp krita gmic_qt libc zart
|
||||
|
||||
native:
|
||||
$(MAKE) "CFLAGS+=$(GMIC_CLI_CFLAGS) -Ofast -march=native" "LIBS+=$(GMIC_CLI_LIBS)" cli
|
||||
|
||||
# CLI (standard)
|
||||
#---------------
|
|
@ -1,52 +1,31 @@
|
|||
# Template file for 'gmic'
|
||||
pkgname=gmic
|
||||
version=2.9.9
|
||||
revision=1
|
||||
revision=2
|
||||
_zart_hash=939cf381c5871e506aabd066037acf2b55143c1d
|
||||
build_wrksrc="src"
|
||||
build_style=gnu-makefile
|
||||
build_helper=qmake
|
||||
make_build_args=NOSTRIP=yes
|
||||
make_use_env=yes
|
||||
hostmakedepends="pkg-config gimp qt5-host-tools qt5-qmake"
|
||||
makedepends="fftw-devel ilmbase-devel libopenexr-devel MesaLib-devel libopencv-devel
|
||||
libgomp-devel lcms2-devel libpng-devel libjpeg-turbo-devel tiff-devel libcurl-devel
|
||||
gtk+-devel gimp-devel qt5-devel"
|
||||
short_desc="GREYC's Magic for Image Computing (image processing framework)"
|
||||
maintainer="Jakub Skrzypnik <jot.skrzyp@gmail.com>"
|
||||
license="CECILL-2.1"
|
||||
license="CECILL-2.1, CECILL-C"
|
||||
homepage="http://gmic.eu/"
|
||||
distfiles="http://gmic.eu/files/source/gmic_${version}.tar.gz
|
||||
https://github.com/c-koi/zart/archive/${_zart_hash}.tar.gz"
|
||||
checksum="9f053338752ec96a6b619718037767682c5fd58e2471c08f3740fdb070605bc0
|
||||
eec47cc9b572cb3e3c26b424381948e12161e129f3d0d3ceca87ff4a8f99fe5d"
|
||||
disable_parallel_build="yes"
|
||||
# disable_parallel_build="yes"
|
||||
|
||||
post_extract() {
|
||||
mv ../zart-${_zart_hash} zart
|
||||
}
|
||||
|
||||
post_patch() {
|
||||
vsed -i Makefile -e "s,-I[\$](USR),-I$XBPS_CROSS_BASE/usr,g"
|
||||
vsed -i Makefile -e "s/-Ofast/-O2/g"
|
||||
# uses gimptool-2.0 to determine PLUGINDIR which fails in cross builds
|
||||
vsed -i Makefile -e "s,^PLUGINDIR = .*,PLUGINDIR = /usr/lib/gimp/2\.0/plug-ins,g"
|
||||
vsed -i ../gmic-qt/gmic_qt.pro -e "s/-Ofast/-O2/g"
|
||||
# Not supported on ppc but we already compile for baselines
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
ppc*) vsed -i Makefile -e 's;-mtune=generic;;' ;;
|
||||
esac
|
||||
}
|
||||
|
||||
do_build() {
|
||||
make CC="$CC" CXX="$CXX" LD="$LD" AR="$AR" RANLIB="$RANLIB" \
|
||||
CPP="$CPP" AS="$AS" OBJCOPY="$OBJCOPY" OBJDUMP="$OBJDUMP" \
|
||||
CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" \
|
||||
cli lib libc
|
||||
|
||||
for _target in gimp gmic_qt zart; do
|
||||
make $_target
|
||||
done
|
||||
}
|
||||
|
||||
post_install() {
|
||||
vlicense ../COPYING
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue