PKGBUILDs/community/gmic/PKGBUILD
2017-09-05 13:50:24 +00:00

92 lines
2.8 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.3
gmic_qt_ver=2.0.0
_commit=ffc89e7f8a7491f35191fe7e5ffce531128d77ef
pkgrel=1
arch=("i686" "x86_64")
url="http://gmic.eu/"
license=("custom:CeCILL")
makedepends=('gimp' 'qt5-base' 'fftw' 'openexr' 'opencv' 'mesa' 'gtk2' 'git' 'hdf5')
source=("https://gmic.eu/files/source/gmic_$pkgver.tar.gz"
"git://github.com/dtschump/gmic-community.git#commit=${_commit}"
"https://github.com/c-koi/gmic-qt/archive/v$gmic_qt_ver.tar.gz")
sha256sums=('b1f65aba4aa76bdf6da1ad923018de6844f5b76f9974978b4b12be108f87261e'
'SKIP'
'286fc5be19f7ad63b9a20e22ed62064c4cc2bf5113caf59d835e6cd09d81b822')
prepare() {
mv "${srcdir}/gmic-${pkgver}" "${srcdir}/gmic"
cd "${srcdir}/gmic"
ln -sf ../gmic-community/zart zart
ln -sf ../gmic-qt-$gmic_qt_ver gmic-qt
sed -i "s|-mtune=generic|${CFLAGS}|" src/Makefile
sed -i -e 's|/etc/bash_completion.d|/usr/share/bash-completion/completions|g' \
src/Makefile
sed -i -e 's|-Ofast|-O2 -fno-fast-math|g' \
gmic-qt/gmic_qt.pro
}
build() {
cd "${srcdir}/gmic"
# unset CFLAGS
# unset CXXFLAGS
# export CPPFLAGS="-Wno-implicit-fallthrough -Wno-format-truncation -fno-fast-math"
# export QMAKE_CXXFLAGS="-fno-fast-math"
# export QMAKE_CPPFLAGS="-fno-fast-math"
msg qweqeqwe
(cd zart && qmake -o Makefile zart.pro)
msg asdasdasd
make -C src all WGET=/bin/true -j1
msg zxczxczxc
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" "hdf5" "curl")
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" "qt5-base")
cd "${srcdir}/gmic"
install -Dm755 zart/zart "${pkgdir}/usr/bin/zart"
install -Dm644 zart/Licence_CeCILL_V2-en.html "${pkgdir}/usr/share/licenses/${pkgname}/Licence_CeCILL_V2-en.html"
}
package_gimp-plugin-gmic() {
pkgdesc="Gimp plugin for the G'MIC image processing framework"
depends=("opencv" "gimp" "fftw" "qt5-base" "curl")
cd "${srcdir}/gmic"
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"
}