From a61c6fb05ec1cbc6845b2ed4077ce0c5950c36ed Mon Sep 17 00:00:00 2001 From: root Date: Wed, 25 Jan 2012 23:14:53 +0000 Subject: Wed Jan 25 23:14:53 UTC 2012 --- staging/inkscape/PKGBUILD | 57 +++++++++++++++++++++++++++++++++++++++++ staging/inkscape/install | 13 ++++++++++ staging/inkscape/libpng15.patch | 40 +++++++++++++++++++++++++++++ 3 files changed, 110 insertions(+) create mode 100644 staging/inkscape/PKGBUILD create mode 100644 staging/inkscape/install create mode 100644 staging/inkscape/libpng15.patch (limited to 'staging/inkscape') diff --git a/staging/inkscape/PKGBUILD b/staging/inkscape/PKGBUILD new file mode 100644 index 000000000..b2adc74f2 --- /dev/null +++ b/staging/inkscape/PKGBUILD @@ -0,0 +1,57 @@ +# $Id: PKGBUILD 147200 2012-01-24 06:18:56Z bisson $ +# Contributor: tobias +# Contributor: Tobias Kieslich +# Maintainer: Gaetan Bisson + +pkgname=inkscape +pkgver=0.48.2 +pkgrel=6 +pkgdesc='Vector graphics editor using the SVG file format' +url='http://inkscape.sourceforge.net/' +arch=('i686' 'x86_64') +license=('GPL' 'LGPL') +makedepends=('boost' 'pkg-config' 'intltool') +depends=('gc' 'gtkmm' 'poppler-glib' 'libxslt' 'gsl' 'popt' 'python2' + 'gtkspell' 'imagemagick' 'desktop-file-utils' 'hicolor-icon-theme') +optdepends=('pstoedit: latex formulas' + 'texlive-core: latex formulas' + 'python2-numpy: some extensions' + 'python-lxml: some extensions and filters' + 'pyxml: some extensions' + 'uniconvertor: reading/writing to some proprietary formats') +options=('!libtool') +source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz" + 'libpng15.patch') +sha1sums=('422a4bacd4dc42adafa203244bc9816783cba4d3' + 'd6512f3cb38ca8e2436dc485aa652490d17b3a52') + +install=install + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + + sed -i 's|/usr/bin/python\>|/usr/bin/python2|g' cxxtest/*.py + sed -i 's|/usr/bin/env python\>|/usr/bin/env python2|g' share/*/{test/,}*.py + sed -i 's|"python" },|"python2" },|g' src/extension/implementation/script.cpp + sed -i 's|python -c|python2 -c|g' configure share/extensions/uniconv*.py + sed -i 's|"python"|"python2"|g' src/main.cpp + + patch -p1 -i ../libpng15.patch + + ./configure --prefix=/usr \ + --with-python \ + --with-perl \ + --without-gnome-vfs \ + --with-xft \ + --enable-lcms \ + --enable-poppler-cairo \ + --disable-dependency-tracking \ + + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + + make DESTDIR="${pkgdir}" install +} diff --git a/staging/inkscape/install b/staging/inkscape/install new file mode 100644 index 000000000..6e803bf1d --- /dev/null +++ b/staging/inkscape/install @@ -0,0 +1,13 @@ +post_install() { + update-desktop-database -q + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor +} + +post_upgrade() { + post_install +} + + +post_remove() { + post_install +} diff --git a/staging/inkscape/libpng15.patch b/staging/inkscape/libpng15.patch new file mode 100644 index 000000000..e24913ed6 --- /dev/null +++ b/staging/inkscape/libpng15.patch @@ -0,0 +1,40 @@ +--- inkscape-0.48.1/src/extension/internal/pdfinput/svg-builder.cpp ++++ inkscape-0.48.1-mod//src/extension/internal/pdfinput/svg-builder.cpp +@@ -1443,7 +1443,7 @@ + return NULL; + } + // Set error handler +- if (setjmp(png_ptr->jmpbuf)) { ++ if (setjmp(png_jmpbuf(png_ptr))) { + png_destroy_write_struct(&png_ptr, &info_ptr); + return NULL; + } +--- inkscape-0.48.1/src/helper/png-write.cpp ++++ inkscape-0.48.1-mod//src/helper/png-write.cpp +@@ -165,7 +165,7 @@ + /* Set error handling. REQUIRED if you aren't supplying your own + * error hadnling functions in the png_create_write_struct() call. + */ +- if (setjmp(png_ptr->jmpbuf)) { ++ if (setjmp(png_jmpbuf(png_ptr))) { + /* If we get here, we had a problem reading the file */ + fclose(fp); + png_destroy_write_struct(&png_ptr, &info_ptr); +--- inkscape-0.48.1/src/sp-image.cpp ++++ inkscape-0.48.1-mod//src/sp-image.cpp +@@ -386,9 +386,13 @@ + + #if defined(PNG_iCCP_SUPPORTED) + { +- char* name = 0; ++ png_charp name = 0; + int compression_type = 0; +- char* profile = 0; ++#if (PNG_LIBPNG_VER < 10500) ++ png_charp profile = 0; ++#else ++ png_bytep profile = 0; ++#endif + png_uint_32 proflen = 0; + if ( png_get_iCCP(pngPtr, infoPtr, &name, &compression_type, &profile, &proflen) ) { + // g_message("Found an iCCP chunk named [%s] with %d bytes and comp %d", name, proflen, compression_type); -- cgit v1.2.3-54-g00ecf