PKGBUILDs/community/gmic/PKGBUILD
2017-05-30 12:53:45 +00:00

77 lines
2.6 KiB
Bash

# $Id$
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: 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" "gimp-plugin-gmic" "zart")
pkgver=2.0.0
_commit=440f068f665597aa10d8e01cc8b73cafdf0e4479
pkgrel=1
arch=("i686" "x86_64")
url="http://gmic.eu/"
license=("custom:CeCILL")
makedepends=('gimp' 'qt4' 'fftw' 'openexr' 'opencv' 'mesa' 'gtk2' 'git')
source=("https://gmic.eu/files/source/gmic_$pkgver.tar.gz"
"git://github.com/dtschump/gmic-community.git#commit=${_commit}"
"gmic_stdlib.h-$pkgver::http://gmic.eu/gmic_stdlib.h"
"CImg.h-$pkgver::https://github.com/dtschump/CImg/blob/master/CImg.h?raw=true")
sha256sums=('27c57f0ca630895a0dab5c0eff854f3133a29743267c4aa196dc2d1936463ca4'
'SKIP'
'5557eba6da03e8c1df2bb2f36644577245540b247e71b130b6aa03c45c87b8d9'
'27d35b0c402897e270f74cbca7b90541cfe860b308b868f96b06fa372fdbd6be')
prepare() {
mv "${srcdir}/gmic-${pkgver}" "${srcdir}/gmic"
cd "${srcdir}/gmic"
sed -i -e 's|qmake zart.pro|qmake-qt4 zart.pro|g' \
-e 's|/etc/bash_completion.d|/usr/share/bash-completion/completions|g' \
src/Makefile
ln -sf ../gmic-community/zart zart
sed -i "s|-mtune=generic|${CFLAGS}|" src/Makefile
mkdir -p ../CImg
cp -L ../gmic_stdlib.h-$pkgver src/gmic_stdlib.h
cp -L ../CImg.h-$pkgver ../CImg/CImg.h
}
build() {
cd "${srcdir}/gmic"
(cd zart && qmake-qt4 -o Makefile zart.pro)
make -C src all WGET=/bin/true
make -C zart all WGET=/bin/true
}
package_gmic() {
pkgdesc="GREYC's Magic Image Converter: image processing framework"
depends=("opencv" "fftw" "libtiff" "libjpeg" "libpng" "openexr" "libx11")
cd "${srcdir}/gmic"
make -C src install DESTDIR="$pkgdir" USR="/usr"
install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
rm -rf "${pkgdir}/usr/"{bin/zart,lib/gimp,share/zart}
}
package_zart() {
pkgdesc="A GUI for G'MIC real-time manipulations on the output of a webcam"
depends=("opencv" "fftw" "qt4")
cd "${srcdir}/gmic"
install -Dm755 zart/zart "${pkgdir}/usr/bin/zart"
install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
package_gimp-plugin-gmic() {
pkgdesc="Gimp plugin for the G'MIC image processing framework"
depends=("opencv" "gimp" "fftw")
cd "${srcdir}/gmic"
install -Dm755 src/gmic_gimp_gtk "${pkgdir}/usr/lib/gimp/2.0/plug-ins/gmic_gimp"
install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}