PKGBUILDs/community/gmic/PKGBUILD
2018-01-20 01:13:53 +00:00

78 lines
2.5 KiB
Bash

# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com>
# Contributor: farid <farid at archlinuc-br.org>
# Contributor: Archie <Mymaud@gmail.com>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - remove -mtune=generic from makefile, replace with our CFLAGS
highmem=1
pkgbase=gmic
pkgname=(gmic zart gimp-plugin-gmic krita-plugin-gmic)
pkgver=2.1.9
_gmic_qt_ver=218
_commit=26c271d8a721447f24f118c9d0236a02118d0009
pkgrel=2
arch=(x86_64)
url="http://gmic.eu/"
license=(custom:CeCILL)
makedepends=(gimp qt5-base fftw openexr opencv git hdf5)
source=("https://gmic.eu/files/source/gmic_$pkgver.tar.gz"
git://github.com/dtschump/gmic-community.git#commit=$_commit
gmic-qt-v.$_gmic_qt_ver.tar.gz::"https://github.com/c-koi/gmic-qt/archive/v.$_gmic_qt_ver.tar.gz")
sha256sums=('c316ed518924810a37e29347c93198db92a038c0fb86bf6a0da6e7c9c48202b5'
'SKIP'
'697861e5a1e024a3ccf9c96e513ec9f60f65d6e3c438ba355afcd10839b06f39')
prepare() {
mv gmic-$pkgver gmic
mv gmic-community/zart zart
mv gmic-qt-v.$_gmic_qt_ver gmic-qt
sed -e 's|/etc/bash_completion.d|/usr/share/bash-completion/completions|g' -i gmic/src/Makefile
sed -e 's|-Ofast|-O2 -fno-fast-math|g' -i gmic-qt/gmic_qt.pro
sed -i "s|-mtune=generic|${CFLAGS}|" gmic/src/Makefile
}
build() {
cd gmic
make -C src all WGET=/bin/true -j1
}
package_gmic() {
pkgdesc="GREYC's Magic Image Converter: image processing framework"
depends=(opencv fftw curl)
optdepends=('qt5-base: for the Qt UI')
cd gmic/src
make DESTDIR="$pkgdir" install
install -Dm644 ../COPYING "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
rm -rf "$pkgdir"/usr/{bin/zart,lib/gimp,share/zart,bin/gmic_krita_qt}
}
package_zart() {
pkgdesc="A GUI for G'MIC real-time manipulations on the output of a webcam"
depends=(opencv fftw qt5-base)
install -Dm755 zart/zart -t "$pkgdir"/usr/bin
install -Dm644 zart/Licence_CeCILL_V2-en.html -t "$pkgdir"/usr/share/licenses/$pkgname
}
package_gimp-plugin-gmic() {
pkgdesc="Gimp plugin for the G'MIC image processing framework"
depends=(gimp fftw qt5-base curl)
install -Dm755 gmic-qt/gmic_gimp_qt "$pkgdir"/usr/lib/gimp/2.0/plug-ins/gmic_gimp
install -Dm644 gmic-qt/COPYING "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
package_krita-plugin-gmic() {
pkgdesc="Krita plugin for the G'MIC image processing framework"
depends=(krita)
cd gmic-qt
install -Dm755 gmic_krita_qt -t "$pkgdir"/usr/bin/
}