PKGBUILDs/community/gmic/PKGBUILD

87 lines
2.7 KiB
Bash
Raw Normal View History

2013-09-13 14:40:59 +00:00
# $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
2016-09-05 17:12:01 +00:00
highmem=1
2013-09-13 14:40:59 +00:00
pkgbase=gmic
pkgname=("gmic" "gimp-plugin-gmic" "zart")
2017-07-06 18:31:40 +00:00
pkgver=2.0.2
gmic_qt_ver=2.0.0
_commit=c43f88d9537c58be4eeac515282eec8096c4a797
2017-08-24 12:17:42 +00:00
pkgrel=2
2013-09-13 14:40:59 +00:00
arch=("i686" "x86_64")
2015-06-01 14:24:45 +00:00
url="http://gmic.eu/"
2013-09-13 14:40:59 +00:00
license=("custom:CeCILL")
2017-07-06 18:31:40 +00:00
makedepends=('gimp' 'qt5-base' 'fftw' 'openexr' 'opencv' 'mesa' 'gtk2' 'git' 'hdf5')
2016-11-21 13:24:08 +00:00
source=("https://gmic.eu/files/source/gmic_$pkgver.tar.gz"
2017-05-30 12:53:45 +00:00
"git://github.com/dtschump/gmic-community.git#commit=${_commit}"
2017-07-06 18:31:40 +00:00
"https://github.com/c-koi/gmic-qt/archive/v$gmic_qt_ver.tar.gz")
sha256sums=('7da9f08d62a9d23fc8badbc7c819cf76f4a9ce3db763710268fdcb80d83ecfc6'
2017-05-30 12:53:45 +00:00
'SKIP'
2017-07-06 18:31:40 +00:00
'286fc5be19f7ad63b9a20e22ed62064c4cc2bf5113caf59d835e6cd09d81b822')
2013-09-13 14:40:59 +00:00
prepare() {
2016-09-05 15:44:56 +00:00
mv "${srcdir}/gmic-${pkgver}" "${srcdir}/gmic"
cd "${srcdir}/gmic"
2017-07-06 18:31:40 +00:00
2016-09-05 15:44:56 +00:00
ln -sf ../gmic-community/zart zart
2017-07-06 18:31:40 +00:00
ln -sf ../gmic-qt-$gmic_qt_ver gmic-qt
2013-09-13 14:40:59 +00:00
sed -i "s|-mtune=generic|${CFLAGS}|" src/Makefile
2017-05-30 12:53:45 +00:00
2017-07-06 18:31:40 +00:00
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
2013-09-13 14:40:59 +00:00
}
build() {
2016-09-05 15:44:56 +00:00
cd "${srcdir}/gmic"
2017-07-06 18:31:40 +00:00
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"
(cd zart && qmake -o Makefile zart.pro)
2017-05-30 12:53:45 +00:00
make -C src all WGET=/bin/true
make -C zart all WGET=/bin/true
2013-09-13 14:40:59 +00:00
}
package_gmic() {
pkgdesc="GREYC's Magic Image Converter: image processing framework"
2017-07-06 18:31:40 +00:00
depends=("opencv" "fftw" "libtiff" "libjpeg" "libpng" "openexr" "libx11" "hdf5" "curl")
2013-09-13 14:40:59 +00:00
2016-09-05 15:44:56 +00:00
cd "${srcdir}/gmic"
2013-09-13 14:40:59 +00:00
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"
2017-07-06 18:31:40 +00:00
depends=("opencv" "fftw" "qt5-base")
2013-09-13 14:40:59 +00:00
2016-09-05 15:44:56 +00:00
cd "${srcdir}/gmic"
2014-03-19 16:33:05 +00:00
install -Dm755 zart/zart "${pkgdir}/usr/bin/zart"
2017-07-06 18:31:40 +00:00
install -Dm644 zart/Licence_CeCILL_V2-en.html "${pkgdir}/usr/share/licenses/${pkgname}/Licence_CeCILL_V2-en.html"
2013-09-13 14:40:59 +00:00
}
package_gimp-plugin-gmic() {
pkgdesc="Gimp plugin for the G'MIC image processing framework"
2017-07-06 18:31:40 +00:00
depends=("opencv" "gimp" "fftw" "qt5-base" "curl")
2013-09-13 14:40:59 +00:00
2016-09-05 15:44:56 +00:00
cd "${srcdir}/gmic"
2017-07-06 18:31:40 +00:00
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"
2013-09-13 14:40:59 +00:00
}