From 8f6dd74412fafc88a10e3084d52bcf5eff3099bf Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Fri, 15 May 2020 20:05:35 +0000 Subject: [PATCH] community/gmic to 2.9.0-9 --- community/gmic/PKGBUILD | 15 +++++++++++---- community/gmic/gmic-fix-cmake.patch | 25 +++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 community/gmic/gmic-fix-cmake.patch diff --git a/community/gmic/PKGBUILD b/community/gmic/PKGBUILD index e1ec164fb..5c2ea6929 100644 --- a/community/gmic/PKGBUILD +++ b/community/gmic/PKGBUILD @@ -14,21 +14,26 @@ highmem=1 pkgbase=gmic pkgname=(gmic zart gimp-plugin-gmic krita-plugin-gmic) pkgver=2.9.0 -pkgrel=7 +pkgrel=9 arch=(x86_64) url="https://gmic.eu/" license=(custom:CeCILL) makedepends=(cmake gimp qt5-base fftw openexr opencv eigen graphicsmagick qt5-tools) -source=(https://gmic.eu/files/source/gmic_$pkgver.tar.gz zart-opencv4.patch) +source=(https://gmic.eu/files/source/gmic_$pkgver.tar.gz zart-opencv4.patch gmic-fix-cmake.patch) sha256sums=('6233695f9b27999dcc7cc3aa7480b0f192bd44de85209091a3b4b8a65ae8c4b5' - 'f4295a2b9a6730060e1dd763c602bd5156570d623bc69c2214dfd11e94943296') + 'f4295a2b9a6730060e1dd763c602bd5156570d623bc69c2214dfd11e94943296' + 'f4fd5e274347777e9d5a030c22a0f279e32dc023bb4723ca09a6c10c7d2cac75') prepare() { mkdir -p build{,-qt,-krita,-gimp,-zart} sed -e 's|pkg_check_modules(OPENCV opencv)|pkg_check_modules(OPENCV opencv4)|' -i gmic-$pkgver/CMakeLists.txt + + cd gmic-$pkgver + patch -p1 -i "$srcdir"/gmic-fix-cmake.patch + # fix build with openCV 4.0 - cd gmic-$pkgver/zart + cd zart patch -p1 -i ../../zart-opencv4.patch sed -e 's|opencv|opencv4|' -i zart.pro @@ -90,6 +95,8 @@ package_gmic() { cd ../build-qt make DESTDIR="$pkgdir" install + + install -Dm644 "$srcdir"/gmic-$pkgver/resources/gmic_cluts.gmz -t "$pkgdir"/usr/share/gmic } package_zart() { diff --git a/community/gmic/gmic-fix-cmake.patch b/community/gmic/gmic-fix-cmake.patch new file mode 100644 index 000000000..329f5eb98 --- /dev/null +++ b/community/gmic/gmic-fix-cmake.patch @@ -0,0 +1,25 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c7c63f22..e6e4a155 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -377,7 +377,7 @@ if(BUILD_MAN) + add_custom_command( + OUTPUT ${CMAKE_BINARY_DIR}/man/gmic.1 + DEPENDS gmic +- COMMAND LD_LIBRARY_PATH=${GMIC_BINARIES_PATH} ${GMIC_BINARIES_PATH}/gmic -v - ${CMAKE_SOURCE_DIR}/src/gmic_stdlib.gmic raw:${CMAKE_SOURCE_DIR}/src/gmic_stdlib.gmic,uchar -__help man 2> ${CMAKE_BINARY_DIR}/man/gmic.1 ++ COMMAND LD_LIBRARY_PATH=${GMIC_BINARIES_PATH} ${GMIC_BINARIES_PATH}/gmic -v - ${CMAKE_SOURCE_DIR}/src/gmic_stdlib.gmic raw:${CMAKE_SOURCE_DIR}/src/gmic_stdlib.gmic,uchar -__help man > ${CMAKE_BINARY_DIR}/man/gmic.1 + ) + add_custom_target(man ALL DEPENDS ${CMAKE_BINARY_DIR}/man/gmic.1) + install(FILES ${CMAKE_BINARY_DIR}/man/gmic.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1/) +@@ -388,9 +388,10 @@ if(BUILD_BASH_COMPLETION) + add_custom_command( + OUTPUT ${CMAKE_BINARY_DIR}/resources/gmic_bashcompletion.sh + DEPENDS gmic +- COMMAND LD_LIBRARY_PATH=${GMIC_BINARIES_PATH} ${GMIC_BINARIES_PATH}/gmic -v - ${CMAKE_SOURCE_DIR}/src/gmic_stdlib.gmic raw:${CMAKE_SOURCE_DIR}/src/gmic_stdlib.gmic,uchar -document_gmic bash 2> ${CMAKE_BINARY_DIR}/resources/gmic_bashcompletion.sh ++ COMMAND LD_LIBRARY_PATH=${GMIC_BINARIES_PATH} ${GMIC_BINARIES_PATH}/gmic -v - ${CMAKE_SOURCE_DIR}/src/gmic_stdlib.gmic raw:${CMAKE_SOURCE_DIR}/src/gmic_stdlib.gmic,uchar -document_gmic bash > ${CMAKE_BINARY_DIR}/resources/gmic_bashcompletion.sh + ) + add_custom_target(bashcompletion ALL DEPENDS ${CMAKE_BINARY_DIR}/resources/gmic_bashcompletion.sh) ++ install(FILES ${CMAKE_BINARY_DIR}/resources/gmic_bashcompletion.sh RENAME gmic DESTINATION ${CMAKE_INSTALL_DATADIR}/bash-completion/completions) + endif() + + include(CMakePackageConfigHelpers)