diff options
Diffstat (limited to 'community-staging/gmic')
-rw-r--r-- | community-staging/gmic/PKGBUILD | 54 | ||||
-rw-r--r-- | community-staging/gmic/opencv-buildfix.patch | 15 |
2 files changed, 69 insertions, 0 deletions
diff --git a/community-staging/gmic/PKGBUILD b/community-staging/gmic/PKGBUILD new file mode 100644 index 000000000..5166bd65d --- /dev/null +++ b/community-staging/gmic/PKGBUILD @@ -0,0 +1,54 @@ +# $Id: PKGBUILD 62764 2012-01-26 14:17:03Z spupykin $ +# 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> + +pkgbase=gmic +pkgname=('gmic' 'gimp-plugin-gmic') +pkgver=1.5.0.8 +pkgrel=2 +pkgdesc="image procession framework" +arch=('i686' 'x86_64') +license=('custom:CeCILL') +url="http://gmic.sourceforge.net" +makedepends=('gimp' 'fftw' 'lapack' 'opencv' 'graphicsmagick' 'openexr' 'imagemagick') +options=('docs' '!emptydirs') +source=("http://downloads.sourceforge.net/sourceforge/gmic/gmic_$pkgver.tar.gz" + opencv-buildfix.patch) +md5sums=('530e733b81e3c1cca7f17bfad4a56821' + 'f135182ced743c296e08ddd560fa6be9') + +build() { + cd "$srcdir/gmic-$pkgver" + CFLAGS+=" -Dcimg_use_lapack" + LDFLAGS="-llapack" + sed -i "s#-lhighgui#-lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_ml -lopencv_video -lopencv_features2d -lopencv_calib3d -lopencv_objdetect -lopencv_contrib -lopencv_legacy -lopencv_flann#" configure + sed -i "s#-lcv#-lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_ml -lopencv_video -lopencv_features2d -lopencv_calib3d -lopencv_objdetect -lopencv_contrib -lopencv_legacy -lopencv_flann#" configure + ./configure --prefix=/usr + sed -i 's|OPENCV_CFLAGS = .*|OPENCV_CFLAGS = -Dcimg_use_opencv -I$(USR)/include/opencv `pkg-config --cflags opencv`|' src/Makefile + sed -i 's|OPENCV_LDFLAGS = .*|OPENCV_LDFLAGS = `pkg-config --libs opencv`|' src/Makefile + sed -i 's|cp -f gmic_gimp.*||' src/Makefile + sed -i 's|ln -s $(DESTDIR)$(USR)|ln -s $(USR)|' src/Makefile + patch -p1 <$srcdir/opencv-buildfix.patch + make -C src all +} + +package_gmic() { + depends=('fftw' 'lapack' 'opencv' 'graphicsmagick' 'openexr') + replaces=('greycstoration') + + cd "$srcdir/gmic-$pkgver" + make -C src install DESTDIR="$pkgdir" USR=/usr + install -Dm644 COPYING "$pkgdir/usr/share/licenses/gmic/LICENSE" +} + +package_gimp-plugin-gmic() { + pkgdesc="Gimp plugin for the GMIC image procession framework" + depends=('gimp' 'fftw' 'lapack') + replaces=('gimp-plugin-greycstoration' 'gimp-plugin-gmic4gimp') + + cd "$srcdir/gmic-$pkgver" + install -Dm755 src/gmic_gimp "$pkgdir/usr/lib/gimp/2.0/plug-ins/gmic_gimp" + install -Dm644 COPYING "$pkgdir/usr/share/licenses/gimp-plugin-gmic/LICENSE" +} diff --git a/community-staging/gmic/opencv-buildfix.patch b/community-staging/gmic/opencv-buildfix.patch new file mode 100644 index 000000000..7fda2ea54 --- /dev/null +++ b/community-staging/gmic/opencv-buildfix.patch @@ -0,0 +1,15 @@ +diff -wbBur gmic-1.5.0.3.org/src/CImg.h gmic-1.5.0.3/src/CImg.h +--- gmic-1.5.0.3.org/src/CImg.h 2011-09-22 18:37:54.000000000 +0400 ++++ gmic-1.5.0.3/src/CImg.h 2011-10-05 18:03:25.000000000 +0400 +@@ -234,7 +234,11 @@ + // Using OpenCV is not mandatory. + #ifdef cimg_use_opencv + #include <cstddef> ++#undef True ++#undef False + #include "cv.h" ++#define True 1 ++#define False 0 + #include "highgui.h" + #endif + |