community/gmic to 2.9.0-9

This commit is contained in:
Kevin Mihelich 2020-05-15 20:05:35 +00:00
parent f41cf0127f
commit 8f6dd74412
2 changed files with 36 additions and 4 deletions

View file

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

View file

@ -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)