Skip to content

Commit

Permalink
gmic: update to 2.9.9
Browse files Browse the repository at this point in the history
Close: #33545
  • Loading branch information
newbluemoon authored and sgn committed Nov 15, 2021
1 parent 0b21700 commit 2c3baf1
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 7 deletions.
1 change: 1 addition & 0 deletions srcpkgs/gmic-krita
47 changes: 40 additions & 7 deletions srcpkgs/gmic/template
@@ -1,7 +1,8 @@
# Template file for 'gmic'
pkgname=gmic
version=2.8.0
version=2.9.9
revision=1
_zart_hash=939cf381c5871e506aabd066037acf2b55143c1d
build_wrksrc="src"
build_style=gnu-makefile
build_helper=qmake
Expand All @@ -13,20 +14,39 @@ short_desc="GREYC's Magic for Image Computing (image processing framework)"
maintainer="Jakub Skrzypnik <jot.skrzyp@gmail.com>"
license="CECILL-2.1"
homepage="http://gmic.eu/"
distfiles="http://gmic.eu/files/source/gmic_${version}.tar.gz"
checksum=d1ca5c726f7570af3a6f0bca27eeb66ef1e6a1b6a17bdaeaf0d59be40b9cd075
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"

post_extract() {
mv ../zart-${_zart_hash} zart
}

post_patch() {
vsed -i -e "s,-I[\$](USR),-I$XBPS_CROSS_BASE/usr,g" Makefile
# Fix library names for openexr-2.4.0
vsed -i Makefile -e "s;-lIlmImf -lHalf;-lIlmImf-2_4 -lHalf-2_4;"
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 krita gmic_qt zart; do
make $_target
done
}

post_install() {
vlicense ../COPYING
}
Expand All @@ -38,18 +58,31 @@ gmic-gimp_package() {
vmove usr/lib/gimp
}
}

gmic-krita_package() {
short_desc+=" - Krita plugin"
depends="krita ${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/bin/gmic_krita_qt
}
}

gmic-zart_package() {
short_desc+=" - ZArt tool"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/bin/zart
vmove usr/share/applications/zart.desktop
vmove usr/share/icons/hicolor/48x48/apps/zart.png
vmove usr/share/icons/hicolor/scalable/apps/zart.svg
}
}

gmic-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove usr/lib/*.so
vmove "usr/lib/*.so"
}
}

0 comments on commit 2c3baf1

Please sign in to comment.