gmic: update to 2.9.7
This commit is contained in:
@@ -1,109 +0,0 @@
|
||||
From 38c7c653cfddbc6c4fb9f9fb1744ab3e1ecbc9f4 Mon Sep 17 00:00:00 2001
|
||||
From: phweyland <philippe.weyland@libertysurf.fr>
|
||||
Date: Wed, 12 Jun 2019 11:38:44 -0300
|
||||
Subject: [PATCH] patch makefile for msys2
|
||||
|
||||
---
|
||||
CMakeLists.txt | 2 +-
|
||||
src/Makefile | 26 +++++++++++++++++++++-----
|
||||
2 file changed, 22 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 547cd70..e118b54 100644
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -113,10 +113,15 @@
|
||||
OS = Unix
|
||||
endif
|
||||
|
||||
-ifneq (, $(findstring MINGW, $(OS)))
|
||||
+ifneq (, $(findstring MINGW64, $(OS)))
|
||||
OS = Windows
|
||||
USR = /mingw64
|
||||
endif
|
||||
+
|
||||
+ifneq (, $(findstring MINGW32, $(OS)))
|
||||
+OS = Windows
|
||||
+USR = /mingw32
|
||||
+endif
|
||||
|
||||
ifeq ($(OS),Darwin)
|
||||
ifeq (,$(wildcard /opt/local))
|
||||
@@ -186,9 +186,6 @@ ifndef NO_STDLIB
|
||||
MANDATORY_CFLAGS += -stdlib=libc++
|
||||
endif
|
||||
endif
|
||||
-ifeq ($(OS),Windows)
|
||||
-MANDATORY_LIBS += -Wl,--stack,16777216
|
||||
-endif
|
||||
|
||||
# Enable optimizations.
|
||||
OPT_CFLAGS = -Ofast
|
||||
@@ -288,8 +288,8 @@ CURL_LIBS = $(shell pkg-config --libs libcurl || echo -lcurl)
|
||||
|
||||
# Enable native support of webcams and video streaming, using the OpenCV library.
|
||||
# (https://opencv.org/)
|
||||
-OPENCV_CFLAGS = -Dcimg_use_opencv $(shell pkg-config opencv --cflags || echo -I/usr/include/opencv) -I/usr/include/opencv
|
||||
-OPENCV_LIBS = $(shell pkg-config opencv --libs || echo -lopencv_core -lopencv_highgui)
|
||||
+OPENCV_CFLAGS = -Dcimg_use_opencv $(shell pkg-config opencv4 --cflags)
|
||||
+OPENCV_LIBS = $(shell pkg-config opencv4 --libs || echo -lopencv_core -lopencv_highgui)
|
||||
|
||||
# Enable support of most classical image file formats, using the GraphicsMagick++ library.
|
||||
# (http://www.graphicsmagick.org/Magick++/)
|
||||
@@ -403,12 +403,21 @@ lib:
|
||||
|
||||
_lib: libgmic.o use_libgmic.cpp
|
||||
ar rcs libgmic.a libgmic.o
|
||||
+ifeq ($(OS),Windows)
|
||||
+ $(CXX) -shared -o libgmic$(SO) \
|
||||
+ -Wl,--out-implib=libgmic$(SO).a \
|
||||
+ -Wl,--export-all-symbols \
|
||||
+ -Wl,--enable-auto-import \
|
||||
+ -Wl,--whole-archive libgmic.o \
|
||||
+ -Wl,--no-whole-archive $(LIBS)
|
||||
+else
|
||||
ifeq ($(OS),Darwin)
|
||||
$(CXX) -shared -std=c++11 -pedantic -o libgmic.so libgmic.o $(LIBS)
|
||||
else
|
||||
$(CXX) -shared -std=c++11 -pedantic -Wl,-soname,libgmic.so.$(VERSION1) -o libgmic.so libgmic.o $(LIBS)
|
||||
$(CXX) -o use_libgmic use_libgmic.cpp -std=c++11 -pedantic -L. -lgmic $(LIBS)
|
||||
endif
|
||||
+endif
|
||||
|
||||
libgmic.o: gmic.cpp gmic.h gmic_stdlib.h CImg.h
|
||||
$(CXX) -o libgmic.o -c gmic.cpp $(PIC) $(CFLAGS)
|
||||
@@ -708,6 +717,12 @@ install:
|
||||
@if [ -f ../gmic-qt/gmic_gimp_qt ]; then cp -f ../gmic-qt/gmic_gimp_qt $(DESTDIR)$(PLUGINDIR)/; fi
|
||||
@if [ -f ../gmic-qt/gmic_krita_qt ]; then cp -f ../gmic-qt/gmic_krita_qt $(DESTDIR)$(USR)/$(BIN)/; fi
|
||||
|
||||
+ifeq ($(OS),Windows)
|
||||
+ mkdir -p $(DESTDIR)$(USR)/share
|
||||
+ mkdir -p $(DESTDIR)$(USR)/$(LIB)
|
||||
+ cp -f libgmic$(SO) $(DESTDIR)$(USR)/$(LIB)
|
||||
+ cp -f libgmic$(SO).a $(DESTDIR)$(USR)/$(LIB)
|
||||
+else
|
||||
ifneq ($(OS),Darwin)
|
||||
mkdir -p $(DESTDIR)$(USR)/share
|
||||
mkdir -p $(DESTDIR)$(USR)/$(LIB)
|
||||
@@ -720,6 +735,7 @@ ifneq ($(OS),Darwin)
|
||||
ln -fs libcgmic.so.$(VERSION) $(DESTDIR)$(USR)/$(LIB)/libcgmic.so.$(VERSION1) ; \
|
||||
ln -fs libcgmic.so.$(VERSION1) $(DESTDIR)$(USR)/$(LIB)/libcgmic.so; \
|
||||
fi
|
||||
+endif
|
||||
endif
|
||||
mkdir -p $(DESTDIR)$(USR)/share/man/
|
||||
mkdir -p $(DESTDIR)$(USR)/share/man/man1/
|
||||
--
|
||||
2.21.0
|
||||
|
||||
--- gmic-2.6.6/CMakeLists.txt.orig 2019-06-21 15:19:00.697414100 +0300
|
||||
+++ gmic-2.6.6/CMakeLists.txt 2019-06-21 15:19:11.752429600 +0300
|
||||
@@ -174,7 +174,7 @@
|
||||
endif()
|
||||
|
||||
if(ENABLE_OPENCV)
|
||||
- pkg_check_modules(OPENCV opencv)
|
||||
+ pkg_check_modules(OPENCV opencv4)
|
||||
endif()
|
||||
if(OPENCV_FOUND)
|
||||
set(CLI_COMPILE_FLAGS "${CLI_COMPILE_FLAGS} -Dcimg_use_opencv")
|
||||
@@ -3,8 +3,8 @@
|
||||
_realname=gmic
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=2.9.0
|
||||
pkgrel=4
|
||||
pkgver=2.9.7
|
||||
pkgrel=1
|
||||
pkgdesc="A Full-Featured Open-Source Framework for Image Processing (mingw-w64)"
|
||||
arch=(any)
|
||||
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64')
|
||||
@@ -21,26 +21,33 @@ depends=("${MINGW_PACKAGE_PREFIX}-fftw"
|
||||
"${MINGW_PACKAGE_PREFIX}-curl"
|
||||
"${MINGW_PACKAGE_PREFIX}-openexr"
|
||||
"${MINGW_PACKAGE_PREFIX}-opencv")
|
||||
|
||||
source=("${_realname}-${pkgver}.tar.gz::https://gmic.eu/files/source/${_realname}_${pkgver}.tar.gz"
|
||||
"0001-gmic-windows-build.patch")
|
||||
sha256sums=('6233695f9b27999dcc7cc3aa7480b0f192bd44de85209091a3b4b8a65ae8c4b5'
|
||||
'6a662bf159b9903b13e3eaa23d75ebf1db3b8569b4e9be319d8b3711e3928ec5')
|
||||
"0002-gmic-mingw-build.patch"::https://github.com/dtschump/gmic/commit/2461be2d9582e8b83ac91989ef7c56e502f4b237.diff)
|
||||
sha256sums=('942537487ea722141230579db3cd4331368429c0e33cb38fee1b17aae9557f16'
|
||||
'1b4e38292334a7b600689b94890b902e0a19d2a89c49ac01c8d32422a231a876')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
patch -p1 -i "${srcdir}/0001-gmic-windows-build.patch"
|
||||
patch -p1 -i "${srcdir}/0002-gmic-mingw-build.patch"
|
||||
}
|
||||
|
||||
build() {
|
||||
rm -rf ${srcdir}/build-${MINGW_CHOST}
|
||||
mkdir -p ${srcdir}/build-${MINGW_CHOST}
|
||||
cd ${srcdir}/build-${MINGW_CHOST}
|
||||
[[ -d "${srcdir}"/build-${CARCH} ]] && rm -rf "${srcdir}"/build-${CARCH}
|
||||
mkdir -p "${srcdir}"/build-${CARCH} && cd "${srcdir}"/build-${CARCH}
|
||||
|
||||
declare -a extra_config
|
||||
if check_option "debug" "n"; then
|
||||
extra_config+=("-DCMAKE_BUILD_TYPE=Release")
|
||||
else
|
||||
extra_config+=("-DCMAKE_BUILD_TYPE=Debug")
|
||||
fi
|
||||
|
||||
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
|
||||
${MINGW_PREFIX}/bin/cmake \
|
||||
-G "MSYS Makefiles" \
|
||||
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
|
||||
-DCMAKE_BUILD_TYPE=RELEASE \
|
||||
"${extra_config[@]}" \
|
||||
-DBUILD_LIB=ON \
|
||||
-DBUILD_LIB_STATIC=OFF \
|
||||
-DBUILD_BASH_COMPLETION=OFF \
|
||||
@@ -57,13 +64,13 @@ build() {
|
||||
-DENABLE_DYNAMIC_LINKING=ON \
|
||||
../${_realname}-${pkgver}
|
||||
|
||||
make
|
||||
|
||||
${MINGW_PREFIX}/bin/cmake --build .
|
||||
}
|
||||
|
||||
package() {
|
||||
cd build-${MINGW_CHOST}
|
||||
make DESTDIR="${pkgdir}" install
|
||||
cd "${srcdir}"/build-${CARCH}
|
||||
|
||||
DESTDIR="${pkgdir}" ${MINGW_PREFIX}/bin/cmake --build . --target install
|
||||
|
||||
install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user