[arch-commits] Commit in graphicsmagick/trunk (PKGBUILD)

Ronald van Haren ronald at archlinux.org
Mon Aug 2 07:09:55 EDT 2010


    Date: Monday, August 2, 2010 @ 07:09:55
  Author: ronald
Revision: 86494

upgpkg: graphicsmagick 1.3.7-3
add perl bindings FS#19841

Modified:
  graphicsmagick/trunk/PKGBUILD

----------+
 PKGBUILD |   31 +++++++++++++++++++++----------
 1 file changed, 21 insertions(+), 10 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2010-08-02 09:36:20 UTC (rev 86493)
+++ PKGBUILD	2010-08-02 11:09:55 UTC (rev 86494)
@@ -1,32 +1,43 @@
 # $Id$
 # Maintainer: Ronald van Haren <ronald.archlinux.org>
 # Contributor: Jaroslav Lichtblau <dragonlord at aur.archlinux.org>
+# Contributor: Anton Leontiev <bunder at t-25.ru>
 
 pkgname=graphicsmagick
 pkgver=1.3.7
-pkgrel=2
+pkgrel=3
 pkgdesc="Image processing system"
 arch=('i686' 'x86_64')
 url="http://www.graphicsmagick.org/"
 license=('MIT')
+makedepends=('perl')
 depends=('bzip2' 'freetype2' 'ghostscript' 'jasper' 'lcms' 'libsm' 
 	'libtiff' 'libwmf' 'libxml2' 'libtool')
-options=('!libtool' 'force')
-#source=(http://downloads.sourceforge.net/sourceforge/${pkgname}/GraphicsMagick-${pkgver}.tar.bz2)
+options=('!libtool')
 source=(http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-history/1.3/GraphicsMagick-${pkgver}.tar.gz)
 md5sums=('ac019a9ece8c45f5213bf31981588c63')
 
 build() {
-  cd "${srcdir}/GraphicsMagick-${pkgver}"
+  cd "${srcdir}/GraphicsMagick-$pkgver"
 
-  ./configure --prefix=/usr --enable-shared --with-gs-font-dir=/usr/share/fonts/Type1 --with-quantum-depth=16
+  ./configure --prefix=/usr --with-perl --enable-shared --with-gs-font-dir=/usr/share/fonts/Type1 || return 1
   make || return 1
-  make DESTDIR="${pkgdir}" install
+  make DESTDIR="${pkgdir}" install || return 1
 
   # Install MIT license
-  install -Dm644 "Copyright.txt" "${pkgdir}/usr/share/licenses/${pkgname}/Copyright.txt" || return 1
+  install -Dm644 "Copyright.txt" "${pkgdir}/usr/share/licenses/$pkgname/Copyright.txt" || return 1
 
+  # Install perl bindings
+  # The patching was introduced in order to build perl module without installing package itself and
+  # not to introduce unnecessary path into LD_RUN_PATH
+  cd PerlMagick || return 1
+  sed -i -e "s:'LDDLFLAGS'  => \"\(.*\)\":'LDDLFLAGS'  => \"-L${pkgdir}/usr/lib \1\":" Makefile.PL
+  perl Makefile.PL INSTALLDIRS=vendor PREFIX=/usr DESTDIR="${pkgdir}" || return 1
+  sed -i -e "s/LDLOADLIBS =/LDLOADLIBS = -lGraphicsMagick/" Makefile
+  make || return 1
+  make install || return 1
+
   # Remove perllocal.pod and .packlist
-  find "${pkgdir}" -name perllocal.pod -delete
-  find "${pkgdir}" -name .packlist -delete
-}
+  rm -rf "${pkgdir}/usr/lib/perl5/core_perl"
+  rm "${pkgdir}/usr/lib/perl5/vendor_perl/auto/Graphics/Magick/.packlist"
+}
\ No newline at end of file



More information about the arch-commits mailing list