From 2aa2acfff38de7de825868995e49792ecfc03126 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 24 Jan 2012 23:15:03 +0000 Subject: Tue Jan 24 23:15:02 UTC 2012 --- community-staging/gdk-pixbuf/PKGBUILD | 43 +++ .../gdk-pixbuf-0.22.0-bmp_reject_corrupt.patch | 48 ++++ .../gdk-pixbuf/gdk-pixbuf-0.22.0-bmp_secure.patch | 19 ++ .../gdk-pixbuf/gdk-pixbuf-0.22.0-loaders.patch | 134 +++++++++ .../gdk-pixbuf/gdk-pixbuf-0.22.0.patch | 129 +++++++++ community-staging/gdk-pixbuf/libpng15.patch | 30 ++ community-staging/libharu/PKGBUILD | 34 +++ community-staging/libharu/libpng15.patch | 302 +++++++++++++++++++++ community-staging/mapnik/PKGBUILD | 51 ++++ community-staging/mapnik/mapnik.install | 11 + community-staging/openmotif/PKGBUILD | 45 +++ community-staging/python2-matplotlib/PKGBUILD | 52 ++++ community-staging/python2-matplotlib/setup.cfg | 83 ++++++ community-staging/qpxtool/PKGBUILD | 28 ++ community-staging/qpxtool/libpng15.patch | 127 +++++++++ community-staging/rawstudio/PKGBUILD | 36 +++ community-staging/rawstudio/libpng15.patch | 40 +++ community-staging/rawstudio/rawstudio.install | 11 + 18 files changed, 1223 insertions(+) create mode 100644 community-staging/gdk-pixbuf/PKGBUILD create mode 100644 community-staging/gdk-pixbuf/gdk-pixbuf-0.22.0-bmp_reject_corrupt.patch create mode 100644 community-staging/gdk-pixbuf/gdk-pixbuf-0.22.0-bmp_secure.patch create mode 100644 community-staging/gdk-pixbuf/gdk-pixbuf-0.22.0-loaders.patch create mode 100644 community-staging/gdk-pixbuf/gdk-pixbuf-0.22.0.patch create mode 100644 community-staging/gdk-pixbuf/libpng15.patch create mode 100644 community-staging/libharu/PKGBUILD create mode 100644 community-staging/libharu/libpng15.patch create mode 100644 community-staging/mapnik/PKGBUILD create mode 100644 community-staging/mapnik/mapnik.install create mode 100644 community-staging/openmotif/PKGBUILD create mode 100644 community-staging/python2-matplotlib/PKGBUILD create mode 100644 community-staging/python2-matplotlib/setup.cfg create mode 100644 community-staging/qpxtool/PKGBUILD create mode 100644 community-staging/qpxtool/libpng15.patch create mode 100644 community-staging/rawstudio/PKGBUILD create mode 100644 community-staging/rawstudio/libpng15.patch create mode 100644 community-staging/rawstudio/rawstudio.install (limited to 'community-staging') diff --git a/community-staging/gdk-pixbuf/PKGBUILD b/community-staging/gdk-pixbuf/PKGBUILD new file mode 100644 index 000000000..8c9a1bced --- /dev/null +++ b/community-staging/gdk-pixbuf/PKGBUILD @@ -0,0 +1,43 @@ +# $Id: PKGBUILD 62652 2012-01-23 09:38:23Z spupykin $ +# Maintainer: Sergej Pupykin +# Contributor: dorphell +# Contributor: Judd Vinet + +pkgname=gdk-pixbuf +pkgver=0.22.0 +pkgrel=9 +pkgdesc="Image loading and manipulation library" +arch=('i686' 'x86_64') +url="http://www.gtk.org/" +license=('GPL' 'LGPL') +depends=('gtk' 'libtiff' 'libpng') +makedepends=('libxt') +options=('!libtool') +source=(ftp://ftp.gnome.org/pub/gnome/sources/${pkgname}/0.24/${pkgname}-${pkgver}.tar.bz2 + gdk-pixbuf-0.22.0-bmp_reject_corrupt.patch + gdk-pixbuf-0.22.0-bmp_secure.patch + gdk-pixbuf-0.22.0-loaders.patch + gdk-pixbuf-0.22.0.patch + libpng15.patch) +md5sums=('05fcb68ceaa338614ab650c775efc2f2' + 'd1fb93f1ae994875158a7e0c108c36f8' + '5f59d5772b1482d885a180dbc581cf84' + '3cf31ae0509747f72ac27a9fd96109c2' + 'e0f5f301ce958b7cea0be631ed7b8e56' + '16db4dc83d507ebcf15d1beb753a77bc') + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + export SED=/bin/sed + patch -Np1 -i ${srcdir}/gdk-pixbuf-0.22.0-bmp_reject_corrupt.patch + patch -Np0 -i ${srcdir}/gdk-pixbuf-0.22.0-bmp_secure.patch + patch -Np1 -i ${srcdir}/gdk-pixbuf-0.22.0-loaders.patch + patch -Np0 -i ${srcdir}/gdk-pixbuf-0.22.0.patch + patch -Np1 -i ${srcdir}/libpng15.patch + libtoolize --force --copy --automake + autoreconf --force --install + ./configure --prefix=/usr --disable-gtk-doc + make + make DESTDIR=${pkgdir} install + rm -rf ${pkgdir}/usr/share/gnome +} diff --git a/community-staging/gdk-pixbuf/gdk-pixbuf-0.22.0-bmp_reject_corrupt.patch b/community-staging/gdk-pixbuf/gdk-pixbuf-0.22.0-bmp_reject_corrupt.patch new file mode 100644 index 000000000..ffb4378aa --- /dev/null +++ b/community-staging/gdk-pixbuf/gdk-pixbuf-0.22.0-bmp_reject_corrupt.patch @@ -0,0 +1,48 @@ +--- gdk-pixbuf-0.22.0/gdk-pixbuf/io-bmp.c 2002-09-27 23:12:40.000000000 +0200 ++++ gdk-pixbuf-0.22.0.patched/gdk-pixbuf/io-bmp.c 2005-03-30 01:33:06.000000000 +0200 +@@ -31,8 +31,6 @@ + #include "gdk-pixbuf-private.h" + #include "gdk-pixbuf-io.h" + +- +- + #if 0 + /* If these structures were unpacked, they would define the two headers of the + * BMP file. After them comes the palette, and then the image data. +@@ -206,7 +204,7 @@ + + if (State == NULL) + return NULL; +- ++ + while (feof(f) == 0) { + length = fread(membuf, 1, sizeof (membuf), f); + if (length > 0) +@@ -245,11 +243,26 @@ + static gboolean + grow_buffer (struct bmp_progressive_state *State) + { +- guchar *tmp = realloc (State->buff, State->BufferSize); ++ guchar *tmp; ++ ++ if (State->BufferSize == 0) { ++#if 0 ++ g_set_error (error, ++ GDK_PIXBUF_ERROR, ++ GDK_PIXBUF_ERROR_CORRUPT_IMAGE, ++ _("BMP image has bogus header data")); ++#endif ++ State->read_state = READ_STATE_ERROR; ++ return FALSE; ++ } ++ ++ tmp = realloc (State->buff, State->BufferSize); ++ + if (!tmp) { + State->read_state = READ_STATE_ERROR; + return FALSE; + } ++ + State->buff = tmp; + return TRUE; + } diff --git a/community-staging/gdk-pixbuf/gdk-pixbuf-0.22.0-bmp_secure.patch b/community-staging/gdk-pixbuf/gdk-pixbuf-0.22.0-bmp_secure.patch new file mode 100644 index 000000000..29471f147 --- /dev/null +++ b/community-staging/gdk-pixbuf/gdk-pixbuf-0.22.0-bmp_secure.patch @@ -0,0 +1,19 @@ +Index: io-bmp.c +=================================================================== +RCS file: /cvs/gnome/gtk+/gdk-pixbuf/io-bmp.c,v +retrieving revision 1.41 +diff -u -p -r1.41 io-bmp.c +--- gdk-pixbuf/io-bmp.c 13 Aug 2004 02:26:57 -0000 1.41 ++++ gdk-pixbuf/io-bmp.c 20 Aug 2004 00:18:14 -0000 +@@ -876,8 +876,10 @@ DoCompressed(struct bmp_progressive_stat + guchar c; + gint idx; + +- if (context->compr.y >= context->Header.height) ++ if (context->compr.y >= context->Header.height) { ++ context->BufferDone = 0; + return TRUE; ++ } + + y = context->compr.y; + diff --git a/community-staging/gdk-pixbuf/gdk-pixbuf-0.22.0-loaders.patch b/community-staging/gdk-pixbuf/gdk-pixbuf-0.22.0-loaders.patch new file mode 100644 index 000000000..068653808 --- /dev/null +++ b/community-staging/gdk-pixbuf/gdk-pixbuf-0.22.0-loaders.patch @@ -0,0 +1,134 @@ +diff -NurdB gdk-pixbuf-0.22.0/gdk-pixbuf/io-ico.c gdk-pixbuf-0.22.0-patched/gdk-pixbuf/io-ico.c +--- gdk-pixbuf-0.22.0/gdk-pixbuf/io-ico.c 2002-09-27 17:19:15.000000000 -0500 ++++ gdk-pixbuf-0.22.0-patched/gdk-pixbuf/io-ico.c 2005-10-27 11:28:23.000000000 -0500 +@@ -330,6 +330,9 @@ + + State->HeaderSize+=I; + ++ if (State->HeaderSize < 0) ++ return FALSE; ++ + if (State->HeaderSize>State->BytesInHeaderBuf) { + guchar *tmp=realloc(State->HeaderBuf,State->HeaderSize); + if (!tmp) +diff -NurdB gdk-pixbuf-0.22.0/gdk-pixbuf/io-xpm.c gdk-pixbuf-0.22.0-patched/gdk-pixbuf/io-xpm.c +--- gdk-pixbuf-0.22.0/gdk-pixbuf/io-xpm.c 2001-03-01 15:16:28.000000000 -0500 ++++ gdk-pixbuf-0.22.0-patched/gdk-pixbuf/io-xpm.c 2005-10-27 11:29:14.000000000 -0500 +@@ -243,8 +243,8 @@ + break; + else { + if (numnames > 0) { +- space -= 1; +- strcat (color, " "); ++ strncat (color, " ", space); ++ space -= MIN (space, 1); + } + + strncat (color, temp, space); +@@ -281,7 +281,8 @@ + /* Fall through to the xpm_read_string. */ + + case op_body: +- xpm_read_string (h->infile, &h->buffer, &h->buffer_size); ++ if(!xpm_read_string (h->infile, &h->buffer, &h->buffer_size)) ++ return NULL; + return h->buffer; + + default: +@@ -317,13 +318,6 @@ + return NULL; + } + +-/* Destroy notification function for the pixbuf */ +-static void +-free_buffer (guchar *pixels, gpointer data) +-{ +- free (pixels); +-} +- + static gboolean + xpm_color_parse (const char *spec, XColor *color) + { +@@ -342,7 +336,8 @@ + gchar pixel_str[32]; + GHashTable *color_hash; + _XPMColor *colors, *color, *fallbackcolor; +- guchar *pixels, *pixtmp; ++ guchar *pixtmp; ++ GdkPixbuf* pixbuf; + + fallbackcolor = NULL; + +@@ -352,16 +347,33 @@ + return NULL; + } + sscanf (buffer, "%d %d %d %d", &w, &h, &n_col, &cpp); +- if (cpp >= 32) { +- g_warning ("XPM has more than 31 chars per pixel."); ++ if (cpp <= 0 || cpp >= 32) { ++ g_warning ("XPM has invalid number of chars per pixel."); + return NULL; + } ++ if (n_col <= 0 || ++ n_col >= G_MAXINT / (cpp + 1) || ++ n_col >= G_MAXINT / sizeof (_XPMColor)) { ++ g_warning ("XPM file has invalid number of colors"); ++ return NULL; ++ } + + /* The hash is used for fast lookups of color from chars */ + color_hash = g_hash_table_new (g_str_hash, g_str_equal); + +- name_buf = g_new (gchar, n_col * (cpp + 1)); +- colors = g_new (_XPMColor, n_col); ++ name_buf = g_new (gchar, n_col * (cpp + 1)); ++ if (!name_buf) { ++ g_warning ("Cannot allocate memory for loading XPM image"); ++ g_hash_table_destroy (color_hash); ++ return NULL; ++ } ++ colors = g_new (_XPMColor, n_col); ++ if (!colors) { ++ g_warning ("Cannot allocate memory for loading XPM image"); ++ g_hash_table_destroy (color_hash); ++ g_free (name_buf); ++ return NULL; ++ } + + for (cnt = 0; cnt < n_col; cnt++) { + gchar *color_name; +@@ -397,12 +409,8 @@ + fallbackcolor = color; + } + +- if (is_trans) +- pixels = malloc (w * h * 4); +- else +- pixels = malloc (w * h * 3); +- +- if (!pixels) { ++ pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, is_trans, 8, w, h); ++ if (!pixbuf) { + g_hash_table_destroy (color_hash); + g_free (colors); + g_free (name_buf); +@@ -410,7 +418,7 @@ + } + + wbytes = w * cpp; +- pixtmp = pixels; ++ pixtmp = pixbuf->pixels; + + for (ycnt = 0; ycnt < h; ycnt++) { + buffer = (*get_buf) (op_body, handle); +@@ -443,9 +451,7 @@ + g_free (colors); + g_free (name_buf); + +- return gdk_pixbuf_new_from_data (pixels, GDK_COLORSPACE_RGB, is_trans, 8, +- w, h, is_trans ? (w * 4) : (w * 3), +- free_buffer, NULL); ++ return pixbuf; + } + + /* Shared library entry point for file loading */ diff --git a/community-staging/gdk-pixbuf/gdk-pixbuf-0.22.0.patch b/community-staging/gdk-pixbuf/gdk-pixbuf-0.22.0.patch new file mode 100644 index 000000000..8e0f55680 --- /dev/null +++ b/community-staging/gdk-pixbuf/gdk-pixbuf-0.22.0.patch @@ -0,0 +1,129 @@ +--- configure.in ++++ configure.in +@@ -21,6 +21,7 @@ + AC_PROG_CC + AC_ISC_POSIX + AM_PROG_CC_STDC ++AM_PROG_AS + AC_PROG_INSTALL + AC_PROG_LN_S + AC_PROG_MAKE_SET +@@ -147,18 +148,18 @@ + dnl Test for libtiff + if test -z "$LIBTIFF"; then + AC_CHECK_LIB(tiff, TIFFReadScanline, +- AC_CHECK_HEADER(tiffio.h, ++ [AC_CHECK_HEADER(tiffio.h, + TIFF='tiff'; LIBTIFF='-ltiff', +- AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***)), +- AC_CHECK_LIB(tiff, TIFFWriteScanline, +- AC_CHECK_HEADER(tiffio.h, ++ AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))], ++ [AC_CHECK_LIB(tiff, TIFFWriteScanline, ++ [AC_CHECK_HEADER(tiffio.h, + TIFF='tiff'; LIBTIFF='-ltiff -ljpeg -lz', +- AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***)), +- AC_CHECK_LIB(tiff34, TIFFFlushData, +- AC_CHECK_HEADER(tiffio.h, ++ AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))], ++ [AC_CHECK_LIB(tiff34, TIFFFlushData, ++ [AC_CHECK_HEADER(tiffio.h, + TIFF='tiff'; LIBTIFF='-ltiff34 -ljpeg -lz', +- AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***)), +- AC_MSG_WARN(*** TIFF plug-in will not be built (TIFF library not found) ***), -ljpeg -lz -lm), -ljpeg -lz -lm), -lm) ++ AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))], ++ AC_MSG_WARN(*** TIFF plug-in will not be built (TIFF library not found) ***), -ljpeg -lz -lm)], -ljpeg -lz -lm)], -lm) + fi + + dnl Test for libjpeg +@@ -191,9 +192,9 @@ + dnl Test for libpng + if test -z "$LIBPNG"; then + AC_CHECK_LIB(png, png_read_info, +- AC_CHECK_HEADER(png.h, ++ [AC_CHECK_HEADER(png.h, + png_ok=yes, +- png_ok=no), ++ png_ok=no)], + AC_MSG_WARN(*** PNG loader will not be built (PNG library not found) ***), -lz -lm) + if test "$png_ok" = yes; then + AC_MSG_CHECKING([for png_structp in png.h]) +--- doc/Makefile.am ++++ doc/Makefile.am +@@ -156,7 +156,7 @@ + done; \ + fi) + # echo '-- Installing $(srcdir)/html/index.sgml' ; \ +-# $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \ ++# $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); + + # + # Require gtk-doc when making dist +--- gdk-pixbuf.m4 ++++ gdk-pixbuf.m4 +@@ -9,7 +9,7 @@ + dnl AM_PATH_GDK_PIXBUF([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) + dnl Test for GDK_PIXBUF, and define GDK_PIXBUF_CFLAGS and GDK_PIXBUF_LIBS + dnl +-AC_DEFUN(AM_PATH_GDK_PIXBUF, ++AC_DEFUN([AM_PATH_GDK_PIXBUF], + [dnl + dnl Get the cflags and libraries from the gdk-pixbuf-config script + dnl +--- gdk-pixbuf/Makefile.am ++++ gdk-pixbuf/Makefile.am +@@ -18,7 +18,7 @@ + + libgnomecanvaspixbuf_la_LDFLAGS = -version-info 1:0:0 $(EXTRA_GNOME_LIBS) + +-libexecdir = $(libdir)/gdk-pixbuf/loaders ++loaderdir = $(libdir)/gdk-pixbuf/loaders + + # + # The PNG plugin. +@@ -118,7 +118,7 @@ + + if BUILD_DYNAMIC_MODULES + +-libexec_LTLIBRARIES = \ ++loader_LTLIBRARIES = \ + $(PNG_LIB) \ + $(JPEG_LIB) \ + $(GIF_LIB) \ +@@ -134,7 +134,7 @@ + extra_sources = + + else +-libexec_LTLIBRARIES = ++loader_LTLIBRARIES = + + extra_sources = $(libpixbufloader_png_la_SOURCES) \ + $(libpixbufloader_jpeg_la_SOURCES) \ +@@ -159,7 +159,7 @@ + -I$(top_builddir)/gdk-pixbuf \ + $(X11_CFLAGS) $(GLIB_CFLAGS) $(GTK_CFLAGS) $(GNOME_CFLAGS) + +-AM_CPPFLAGS = "-DPIXBUF_LIBDIR=\"$(libexecdir)\"" ++AM_CPPFLAGS = "-DPIXBUF_LIBDIR=\"$(loaderdir)\"" + + LDADDS = libgdk_pixbuf.la $(GLIB_LIBS) $(GTK_LIBS) $(STATIC_LIB_DEPS) + +@@ -211,7 +211,7 @@ + gdk-pixbuf-parse-color.c \ + $(extra_sources) + +-libgdk_pixbuf_xlib_la_LDFLAGS = -version-info 2:0:0 -export-dynamic $(GLIB_LIBS) $(X11_LIBS) ++libgdk_pixbuf_xlib_la_LDFLAGS = -version-info 2:0:0 -export-dynamic $(GLIB_LIBS) + libgdk_pixbuf_xlib_la_LIBADD = pixops/libpixops.la libgdk_pixbuf.la $(GTK_LIBS) + + +--- gdk-pixbuf/io-bmp.c ++++ gdk-pixbuf/io-bmp.c +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + #include "gdk-pixbuf-private.h" + #include "gdk-pixbuf-io.h" + diff --git a/community-staging/gdk-pixbuf/libpng15.patch b/community-staging/gdk-pixbuf/libpng15.patch new file mode 100644 index 000000000..e667288f8 --- /dev/null +++ b/community-staging/gdk-pixbuf/libpng15.patch @@ -0,0 +1,30 @@ +diff -wbBur gdk-pixbuf-0.22.0/gdk-pixbuf/io-png.c gdk-pixbuf-0.22.0.my/gdk-pixbuf/io-png.c +--- gdk-pixbuf-0.22.0/gdk-pixbuf/io-png.c 2001-01-24 23:59:23.000000000 +0300 ++++ gdk-pixbuf-0.22.0.my/gdk-pixbuf/io-png.c 2012-01-23 13:33:08.000000000 +0400 +@@ -175,7 +175,7 @@ + return NULL; + } + +- if (setjmp (png_ptr->jmpbuf)) { ++ if (setjmp (png_jmpbuf(png_ptr))) { + png_destroy_read_struct (&png_ptr, &info_ptr, &end_info); + return NULL; + } +@@ -311,7 +311,7 @@ + return NULL; + } + +- if (setjmp (lc->png_read_ptr->jmpbuf)) { ++ if (setjmp (png_jmpbuf(lc->png_read_ptr))) { + if (lc->png_info_ptr) + png_destroy_read_struct(&lc->png_read_ptr, NULL, NULL); + g_free(lc); +@@ -366,7 +366,7 @@ + lc->max_row_seen_in_chunk = -1; + + /* Invokes our callbacks as needed */ +- if (setjmp (lc->png_read_ptr->jmpbuf)) { ++ if (setjmp (png_jmpbuf(lc->png_read_ptr))) { + return FALSE; + } else { + png_process_data(lc->png_read_ptr, lc->png_info_ptr, buf, size); diff --git a/community-staging/libharu/PKGBUILD b/community-staging/libharu/PKGBUILD new file mode 100644 index 000000000..862dab0ce --- /dev/null +++ b/community-staging/libharu/PKGBUILD @@ -0,0 +1,34 @@ +# $Id: PKGBUILD 62648 2012-01-23 08:59:04Z spupykin $ +# Maintainer: Sergej Pupykin +# Maintainer : SpepS +# Contributor: Auguste +# Contributor: Jose Negron + +pkgname=libharu +pkgver=2.2.1 +pkgrel=2 +pkgdesc="C/C++ library for generating PDF documents" +url="http://libharu.org/wiki/Main_Page" +arch=('i686' 'x86_64') +license=('custom:ZLIB') +depends=('libpng' 'gcc-libs') +options=(!libtool) +source=("http://libharu.org/files/$pkgname-$pkgver.tar.gz" + libpng15.patch) +md5sums=('63da8e087744f1d6cf16f9501b1cb766' + '3793dd30017474bcd277af3b419bc0f6') + +build() { + cd "$srcdir/$pkgname-$pkgver" + patch -p1 <$srcdir/libpng15.patch + ./configure --prefix=/usr + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir/" install + # license + install -d "$pkgdir/usr/share/licenses/$pkgname" + sed -n '102,120p' README > "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} diff --git a/community-staging/libharu/libpng15.patch b/community-staging/libharu/libpng15.patch new file mode 100644 index 000000000..05a8d39fc --- /dev/null +++ b/community-staging/libharu/libpng15.patch @@ -0,0 +1,302 @@ +diff -wbBur libharu-2.2.1/src/hpdf_image_png.c libharu-2.2.1.my/src/hpdf_image_png.c +--- libharu-2.2.1/src/hpdf_image_png.c 2010-02-08 12:27:51.000000000 +0300 ++++ libharu-2.2.1.my/src/hpdf_image_png.c 2012-01-23 12:53:05.000000000 +0400 +@@ -110,13 +110,13 @@ + { + png_uint_32 len = png_get_rowbytes(png_ptr, info_ptr); + png_bytep* row_pointers = HPDF_GetMem (image->mmgr, +- info_ptr->height * sizeof (png_bytep)); ++ png_image_height(png_ptr, info_ptr) * sizeof (png_bytep)); + + if (row_pointers) { + HPDF_UINT i; + +- HPDF_MemSet (row_pointers, 0, info_ptr->height * sizeof (png_bytep)); +- for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) { ++ HPDF_MemSet (row_pointers, 0, png_image_height(png_ptr, info_ptr) * sizeof (png_bytep)); ++ for (i = 0; i < (HPDF_UINT)png_image_height(png_ptr, info_ptr); i++) { + row_pointers[i] = HPDF_GetMem (image->mmgr, len); + + if (image->error->error_no != HPDF_OK) +@@ -126,7 +126,7 @@ + if (image->error->error_no == HPDF_OK) { + png_read_image(png_ptr, row_pointers); + if (image->error->error_no == HPDF_OK) { /* add this line */ +- for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) { ++ for (i = 0; i < (HPDF_UINT)png_image_height(png_ptr, info_ptr); i++) { + if (HPDF_Stream_Write (image->stream, row_pointers[i], len) != + HPDF_OK) + break; +@@ -135,7 +135,7 @@ + } + + /* clean up */ +- for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) { ++ for (i = 0; i < (HPDF_UINT)png_image_height(png_ptr, info_ptr); i++) { + HPDF_FreeMem (image->mmgr, row_pointers[i]); + } + +@@ -156,7 +156,7 @@ + if (buf_ptr) { + HPDF_UINT i; + +- for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) { ++ for (i = 0; i < (HPDF_UINT)png_image_height(png_ptr, info_ptr); i++) { + png_read_rows(png_ptr, (png_byte**)&buf_ptr, NULL, 1); + if (image->error->error_no != HPDF_OK) + break; +@@ -183,13 +183,13 @@ + HPDF_UINT i, j; + png_bytep *row_ptr; + +- row_ptr = HPDF_GetMem (image->mmgr, info_ptr->height * sizeof(png_bytep)); ++ row_ptr = HPDF_GetMem (image->mmgr, png_image_height(png_ptr, info_ptr) * sizeof(png_bytep)); + if (!row_ptr) { + return HPDF_FAILD_TO_ALLOC_MEM; + } else { + png_uint_32 len = png_get_rowbytes(png_ptr, info_ptr); + +- for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) { ++ for (i = 0; i < (HPDF_UINT)png_image_height(png_ptr, info_ptr); i++) { + row_ptr[i] = HPDF_GetMem(image->mmgr, len); + if (!row_ptr[i]) { + for (; i >= 0; i--) { +@@ -207,19 +207,19 @@ + goto Error; + } + +- for (j = 0; j < info_ptr->height; j++) { +- for (i = 0; i < info_ptr->width; i++) { +- smask_data[info_ptr->width * j + i] = (row_ptr[j][i] < num_trans) ? trans[row_ptr[j][i]] : 0xFF; ++ for (j = 0; j < png_image_height(png_ptr, info_ptr); j++) { ++ for (i = 0; i < png_image_width(png_ptr, info_ptr); i++) { ++ smask_data[png_image_width(png_ptr, info_ptr) * j + i] = (row_ptr[j][i] < num_trans) ? trans[row_ptr[j][i]] : 0xFF; + } + +- if (HPDF_Stream_Write (image->stream, row_ptr[j], info_ptr->width) != HPDF_OK) { ++ if (HPDF_Stream_Write (image->stream, row_ptr[j], png_image_width(png_ptr, info_ptr)) != HPDF_OK) { + ret = HPDF_FILE_IO_ERROR; + goto Error; + } + } + + Error: +- for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) { ++ for (i = 0; i < (HPDF_UINT)png_image_height(png_ptr, info_ptr); i++) { + HPDF_FreeMem (image->mmgr, row_ptr[i]); + } + +@@ -245,13 +245,13 @@ + return HPDF_INVALID_PNG_IMAGE; + } + +- row_ptr = HPDF_GetMem (image->mmgr, info_ptr->height * sizeof(png_bytep)); ++ row_ptr = HPDF_GetMem (image->mmgr, png_image_height(png_ptr, info_ptr) * sizeof(png_bytep)); + if (!row_ptr) { + return HPDF_FAILD_TO_ALLOC_MEM; + } else { + png_uint_32 len = png_get_rowbytes(png_ptr, info_ptr); + +- for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) { ++ for (i = 0; i < (HPDF_UINT)png_image_height(png_ptr, info_ptr); i++) { + row_ptr[i] = HPDF_GetMem(image->mmgr, len); + if (!row_ptr[i]) { + for (; i >= 0; i--) { +@@ -271,12 +271,12 @@ + + switch (color_type) { + case PNG_COLOR_TYPE_RGB_ALPHA: +- row_len = 3 * info_ptr->width * sizeof(png_byte); +- for (j = 0; j < info_ptr->height; j++) { +- for (i = 0; i < info_ptr->width; i++) { ++ row_len = 3 * png_image_width(png_ptr, info_ptr) * sizeof(png_byte); ++ for (j = 0; j < png_image_height(png_ptr, info_ptr); j++) { ++ for (i = 0; i < png_image_width(png_ptr, info_ptr); i++) { + row = row_ptr[j]; + memmove(row + (3 * i), row + (4*i), 3); +- smask_data[info_ptr->width * j + i] = row[4 * i + 3]; ++ smask_data[png_image_width(png_ptr, info_ptr) * j + i] = row[4 * i + 3]; + } + + if (HPDF_Stream_Write (image->stream, row, row_len) != HPDF_OK) { +@@ -286,12 +286,12 @@ + } + break; + case PNG_COLOR_TYPE_GRAY_ALPHA: +- row_len = info_ptr->width * sizeof(png_byte); +- for (j = 0; j < info_ptr->height; j++) { +- for (i = 0; i < info_ptr->width; i++) { ++ row_len = png_image_width(png_ptr, info_ptr) * sizeof(png_byte); ++ for (j = 0; j < png_image_height(png_ptr, info_ptr); j++) { ++ for (i = 0; i < png_image_width(png_ptr, info_ptr); i++) { + row = row_ptr[j]; + row[i] = row[2 * i]; +- smask_data[info_ptr->width * j + i] = row[2 * i + 1]; ++ smask_data[png_image_width(png_ptr, info_ptr) * j + i] = row[2 * i + 1]; + } + + if (HPDF_Stream_Write (image->stream, row, row_len) != HPDF_OK) { +@@ -306,7 +306,7 @@ + } + + Error: +- for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) { ++ for (i = 0; i < (HPDF_UINT)png_image_height(png_ptr, info_ptr); i++) { + HPDF_FreeMem (image->mmgr, row_ptr[i]); + } + +@@ -448,7 +448,7 @@ + } + + /* 16bit images are not supported. */ +- if (info_ptr->bit_depth == 16) { ++ if (png_get_bit_depth(png_ptr, info_ptr) == 16) { + png_set_strip_16(png_ptr); + } + +@@ -458,7 +458,7 @@ + } + + /* check palette-based images for transparent areas and load them immediately if found */ +- if (xref && PNG_COLOR_TYPE_PALETTE & info_ptr->color_type) { ++ if (xref && PNG_COLOR_TYPE_PALETTE & png_get_color_type(png_ptr, info_ptr)) { + png_bytep trans; + int num_trans; + HPDF_Dict smask; +@@ -478,10 +478,10 @@ + smask->header.obj_class |= HPDF_OSUBCLASS_XOBJECT; + ret = HPDF_Dict_AddName (smask, "Type", "XObject"); + ret += HPDF_Dict_AddName (smask, "Subtype", "Image"); +- ret += HPDF_Dict_AddNumber (smask, "Width", (HPDF_UINT)info_ptr->width); +- ret += HPDF_Dict_AddNumber (smask, "Height", (HPDF_UINT)info_ptr->height); ++ ret += HPDF_Dict_AddNumber (smask, "Width", (HPDF_UINT)png_image_width(png_ptr, info_ptr)); ++ ret += HPDF_Dict_AddNumber (smask, "Height", (HPDF_UINT)png_image_height(png_ptr, info_ptr)); + ret += HPDF_Dict_AddName (smask, "ColorSpace", "DeviceGray"); +- ret += HPDF_Dict_AddNumber (smask, "BitsPerComponent", (HPDF_UINT)info_ptr->bit_depth); ++ ret += HPDF_Dict_AddNumber (smask, "BitsPerComponent", (HPDF_UINT)png_get_bit_depth(png_ptr, info_ptr)); + + if (ret != HPDF_OK) { + HPDF_Dict_Free(smask); +@@ -489,7 +489,7 @@ + goto Exit; + } + +- smask_data = HPDF_GetMem(image->mmgr, info_ptr->width * info_ptr->height); ++ smask_data = HPDF_GetMem(image->mmgr, png_image_width(png_ptr, info_ptr) * png_image_height(png_ptr, info_ptr)); + if (!smask_data) { + HPDF_Dict_Free(smask); + ret = HPDF_FAILD_TO_ALLOC_MEM; +@@ -503,7 +503,7 @@ + goto Exit; + } + +- if (HPDF_Stream_Write(smask->stream, smask_data, info_ptr->width * info_ptr->height) != HPDF_OK) { ++ if (HPDF_Stream_Write(smask->stream, smask_data, png_image_width(png_ptr, info_ptr) * png_image_height(png_ptr, info_ptr)) != HPDF_OK) { + HPDF_FreeMem(image->mmgr, smask_data); + HPDF_Dict_Free(smask); + ret = HPDF_FILE_IO_ERROR; +@@ -513,9 +513,9 @@ + + + ret += CreatePallet(image, png_ptr, info_ptr); +- ret += HPDF_Dict_AddNumber (image, "Width", (HPDF_UINT)info_ptr->width); +- ret += HPDF_Dict_AddNumber (image, "Height", (HPDF_UINT)info_ptr->height); +- ret += HPDF_Dict_AddNumber (image, "BitsPerComponent", (HPDF_UINT)info_ptr->bit_depth); ++ ret += HPDF_Dict_AddNumber (image, "Width", (HPDF_UINT)png_image_width(png_ptr, info_ptr)); ++ ret += HPDF_Dict_AddNumber (image, "Height", (HPDF_UINT)png_image_height(png_ptr, info_ptr)); ++ ret += HPDF_Dict_AddNumber (image, "BitsPerComponent", (HPDF_UINT)png_get_bit_depth(png_ptr, info_ptr)); + ret += HPDF_Dict_Add (image, "SMask", smask); + + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); +@@ -526,7 +526,7 @@ + + /* read images with alpha channel right away + we have to do this because image transparent mask must be added to the Xref */ +- if (xref && PNG_COLOR_MASK_ALPHA & info_ptr->color_type) { ++ if (xref && PNG_COLOR_MASK_ALPHA & png_get_color_type(png_ptr, info_ptr)) { + HPDF_Dict smask; + png_bytep smask_data; + +@@ -539,10 +539,10 @@ + smask->header.obj_class |= HPDF_OSUBCLASS_XOBJECT; + ret = HPDF_Dict_AddName (smask, "Type", "XObject"); + ret += HPDF_Dict_AddName (smask, "Subtype", "Image"); +- ret += HPDF_Dict_AddNumber (smask, "Width", (HPDF_UINT)info_ptr->width); +- ret += HPDF_Dict_AddNumber (smask, "Height", (HPDF_UINT)info_ptr->height); ++ ret += HPDF_Dict_AddNumber (smask, "Width", (HPDF_UINT)png_image_width(png_ptr, info_ptr)); ++ ret += HPDF_Dict_AddNumber (smask, "Height", (HPDF_UINT)png_image_height(png_ptr, info_ptr)); + ret += HPDF_Dict_AddName (smask, "ColorSpace", "DeviceGray"); +- ret += HPDF_Dict_AddNumber (smask, "BitsPerComponent", (HPDF_UINT)info_ptr->bit_depth); ++ ret += HPDF_Dict_AddNumber (smask, "BitsPerComponent", (HPDF_UINT)png_get_bit_depth(png_ptr, info_ptr)); + + if (ret != HPDF_OK) { + HPDF_Dict_Free(smask); +@@ -550,7 +550,7 @@ + goto Exit; + } + +- smask_data = HPDF_GetMem(image->mmgr, info_ptr->width * info_ptr->height); ++ smask_data = HPDF_GetMem(image->mmgr, png_image_width(png_ptr, info_ptr) * png_image_height(png_ptr, info_ptr)); + if (!smask_data) { + HPDF_Dict_Free(smask); + ret = HPDF_FAILD_TO_ALLOC_MEM; +@@ -564,7 +564,7 @@ + goto Exit; + } + +- if (HPDF_Stream_Write(smask->stream, smask_data, info_ptr->width * info_ptr->height) != HPDF_OK) { ++ if (HPDF_Stream_Write(smask->stream, smask_data, png_image_width(png_ptr, info_ptr) * png_image_height(png_ptr, info_ptr)) != HPDF_OK) { + HPDF_FreeMem(image->mmgr, smask_data); + HPDF_Dict_Free(smask); + ret = HPDF_FILE_IO_ERROR; +@@ -572,14 +572,14 @@ + } + HPDF_FreeMem(image->mmgr, smask_data); + +- if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) { ++ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY_ALPHA) { + ret += HPDF_Dict_AddName (image, "ColorSpace", "DeviceGray"); + } else { + ret += HPDF_Dict_AddName (image, "ColorSpace", "DeviceRGB"); + } +- ret += HPDF_Dict_AddNumber (image, "Width", (HPDF_UINT)info_ptr->width); +- ret += HPDF_Dict_AddNumber (image, "Height", (HPDF_UINT)info_ptr->height); +- ret += HPDF_Dict_AddNumber (image, "BitsPerComponent", (HPDF_UINT)info_ptr->bit_depth); ++ ret += HPDF_Dict_AddNumber (image, "Width", (HPDF_UINT)png_image_width(png_ptr, info_ptr)); ++ ret += HPDF_Dict_AddNumber (image, "Height", (HPDF_UINT)png_image_height(png_ptr, info_ptr)); ++ ret += HPDF_Dict_AddNumber (image, "BitsPerComponent", (HPDF_UINT)png_get_bit_depth(png_ptr, info_ptr)); + ret += HPDF_Dict_Add (image, "SMask", smask); + + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); +@@ -589,9 +589,9 @@ + /* if the image has color palette, copy the pallet of the image to + * create color map. + */ +- if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) ++ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_PALETTE) + ret = CreatePallet(image, png_ptr, info_ptr); +- else if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY) ++ else if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY) + ret = HPDF_Dict_AddName (image, "ColorSpace", "DeviceGray"); + else + ret = HPDF_Dict_AddName (image, "ColorSpace", "DeviceRGB"); +@@ -617,16 +617,16 @@ + } + + /* setting the info of the image. */ +- if (HPDF_Dict_AddNumber (image, "Width", (HPDF_UINT)info_ptr->width) ++ if (HPDF_Dict_AddNumber (image, "Width", (HPDF_UINT)png_image_width(png_ptr, info_ptr)) + != HPDF_OK) + goto Exit; + +- if (HPDF_Dict_AddNumber (image, "Height", (HPDF_UINT)info_ptr->height) ++ if (HPDF_Dict_AddNumber (image, "Height", (HPDF_UINT)png_image_height(png_ptr, info_ptr)) + != HPDF_OK) + goto Exit; + + if (HPDF_Dict_AddNumber (image, "BitsPerComponent", +- (HPDF_UINT)info_ptr->bit_depth) != HPDF_OK) ++ (HPDF_UINT)png_get_bit_depth(png_ptr, info_ptr)) != HPDF_OK) + goto Exit; + + /* clean up */ diff --git a/community-staging/mapnik/PKGBUILD b/community-staging/mapnik/PKGBUILD new file mode 100644 index 000000000..815ffd88f --- /dev/null +++ b/community-staging/mapnik/PKGBUILD @@ -0,0 +1,51 @@ +# $Id: PKGBUILD 62650 2012-01-23 09:28:07Z spupykin $ +# Maintainer: Sergej Pupykin +# Contributor: David Dent +# Contributor: orbisvicis + +pkgname=mapnik +pkgver=0.7.1 +pkgrel=13 +pkgdesc="Free Toolkit for developing mapping applications. Above all Mapnik is about rendering beautiful maps." +arch=('i686' 'x86_64') +url="http://mapnik.org/" +license=('LGPL') +depends=('boost-libs' 'icu' 'libpng' 'libjpeg' 'libtiff' 'freetype2' + 'libxml2' 'python2' 'proj' 'cairo' 'cairomm' 'pycairo' + 'postgresql-libs' 'postgis' 'gdal' 'curl' 'libtool') + # already in core ('zlib' 'sqlite3') +optdepends=('libxslt: Web Map Service' + 'python-lxml: Web Map Service' + 'python-imaging: Web Map Service' + 'python-nose: Web Map Service' + 'apache: Web Map Service' + 'mod_fastcgi: Web Map Service - or:' + 'mod_fcgid: Web Map Service - or:' + 'mod_wsgi: Web Map Service' + ) +makedepends=('scons' 'boost') # already in core ('pkg-config') +conflicts=('mapnik-svn') +install="mapnik.install" +source=("http://download.berlios.de/${pkgname}/${pkgname}-${pkgver}.tar.bz2") +md5sums=('8f65fda2a792518d6f6be8a85f62fc73') + +build() { + cd "$srcdir/$pkgname-$pkgver" + + #patch SConstruct so libs end up in /usr/lib not /usr/lib64 on X86_64 + sed -i -e "/LIBDIR_SCHEMA=/s/lib64/lib/" SConstruct + sed -i 's|png_ptr->io_ptr|png_get_io_ptr(png_ptr)|g' src/png_reader.cpp + sed -i 's/-ansi -Wall/-ansi -DBOOST_FILESYSTEM_VERSION=2 -Wall/' SConstruct + + scons configure \ + PREFIX="/usr" \ + INPUT_PLUGINS=all \ + DESTDIR="$pkgdir" + scons +} +package(){ + cd "$srcdir/$pkgname-$pkgver" + scons install + # fix permissions on SCons-autogenerated files + chmod 644 "${pkgdir}/usr/lib/python2.7/site-packages/mapnik/paths.py" +} diff --git a/community-staging/mapnik/mapnik.install b/community-staging/mapnik/mapnik.install new file mode 100644 index 000000000..46f265d5b --- /dev/null +++ b/community-staging/mapnik/mapnik.install @@ -0,0 +1,11 @@ +post_install() { + /sbin/ldconfig +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} diff --git a/community-staging/openmotif/PKGBUILD b/community-staging/openmotif/PKGBUILD new file mode 100644 index 000000000..d7b0f2a89 --- /dev/null +++ b/community-staging/openmotif/PKGBUILD @@ -0,0 +1,45 @@ +# $Id: PKGBUILD 62656 2012-01-23 10:44:50Z spupykin $ +# Maintainer: Sergej Pupykin +# Contributor: Enrico Morelli + +pkgname=openmotif +pkgver=2.3.3 +pkgrel=2 +pkgdesc="Open Motif" +arch=('i686' 'x86_64') +url="http://www.motifzone.org/" +license=('GPL') +depends=(libxext libxp libxft libxt libxmu libpng libjpeg) +makedepends=(xbitmaps xproto printproto xextproto automake) +conflicts=(lesstif) +options=('!libtool') +source=(http://www.motifzone.org/files/public_downloads/openmotif/2.3/$pkgver/openmotif-$pkgver.tar.gz) +md5sums=('fd27cd3369d6c7d5ef79eccba524f7be') + +build() { + _automakever=1.11 + + cd $srcdir/openmotif-$pkgver + + sed -i 's|.*demos.*||g' Makefile.in Makefile.am + sed -i 's|doc \\|doc|g' Makefile.in Makefile.am + sed -i 's#if (!png_check_sig(sig, 8))#if (png_sig_cmp(sig, 0, 8))#' lib/Xm/Png.c + + ln -s -f /usr/share/automake-${_automakever}/compile compile + ln -s -f /usr/share/libtool/config/config.guess config.guess + ln -s -f /usr/share/libtool/config/config.sub config.sub + ln -s -f /usr/share/automake-${_automakever}/depcomp depcomp + ln -s -f /usr/share/automake-${_automakever}/install-sh install-sh + ln -s -f /usr/share/automake-${_automakever}/missing missing + ln -s -f /usr/share/libtool/config/ltmain.sh ltmain.sh + touch NEWS AUTHORS + + [ $NOEXTRACT -eq 1 ] || autoreconf -i + [ $CARCH == "x86_64" ] && export CFLAGS="$CFLAGS -fPIC" + [ $NOEXTRACT -eq 1 ] || ./configure --with-x --prefix=/usr + make -j1 + + make DESTDIR=$pkgdir install + # cleanup + (cd $pkgdir/usr/share/man/man3/ && mv Shell.3 OpenMotif-Shell.3) +} diff --git a/community-staging/python2-matplotlib/PKGBUILD b/community-staging/python2-matplotlib/PKGBUILD new file mode 100644 index 000000000..2c647212e --- /dev/null +++ b/community-staging/python2-matplotlib/PKGBUILD @@ -0,0 +1,52 @@ +# $Id: PKGBUILD 62667 2012-01-24 00:10:45Z stephane $ +# Maintainer: Stéphane Gaudreault +# Contributor: Stefan Husmann +# Contributor: Angel 'angvp' Velasquez +# Contributor: Douglas Soares de Andrade + +pkgname=python2-matplotlib +pkgver=1.1.0 +pkgrel=2 +pkgdesc="A python plotting library, making publication quality plots" +arch=('i686' 'x86_64') +url="http://matplotlib.sourceforge.net/" +backup=(usr/lib/python2.7/site-packages/matplotlib/mpl-data/matplotlibrc) +depends=('python2-dateutil' 'python2-pytz' 'python2-numpy' 'python2-pyparsing' 'python2-qt') +optdepends=('pygtk: for use with the GTK or GTKAgg backend' + 'tk: used by the TkAgg backend' + 'wxpython: for use with the WXAgg backend') +makedepends=('pygtk' 'tk' 'wxpython') +provides=('matplotlib' "python-matplotlib=${pkgver}") +replaces=('python-matplotlib') +conflicts=('python-matplotlib') +source=("http://downloads.sourceforge.net/matplotlib/matplotlib-${pkgver}.tar.gz" + setup.cfg) +sha1sums=('435b4f04a7e099b79f66451d69ad0b5ce66030ae' + 'bcb5a83db9d95c96a57ca518fa6bd1897b23558f') +license=('custom') + +build() { + cd "${srcdir}/matplotlib-${pkgver}" + + cp ../setup.cfg . + + # remove internal copy of pyparsing + rm lib/matplotlib/pyparsing.py + sed -i "s/matplotlib.pyparsing/pyparsing/g" lib/matplotlib/{mathtext,fontconfig_pattern}.py + + # python2 fix + for file in $(find . -name '*.py' -print); do + sed -i -e "s|^#!.*/usr/bin/python|#!/usr/bin/python2|" \ + -e "s|^#!.*/usr/bin/env *python|#!/usr/bin/env python2|" ${file} + done + + python2 setup.py build +} + +package() { + cd "${srcdir}/matplotlib-${pkgver}" + python2 setup.py install -O1 --skip-build --root "${pkgdir}" --prefix=/usr + + install -dm755 "${pkgdir}/usr/share/licenses/${pkgname}" + install -m 644 doc/users/license.rst "${pkgdir}/usr/share/licenses/${pkgname}" +} diff --git a/community-staging/python2-matplotlib/setup.cfg b/community-staging/python2-matplotlib/setup.cfg new file mode 100644 index 000000000..4b82986e9 --- /dev/null +++ b/community-staging/python2-matplotlib/setup.cfg @@ -0,0 +1,83 @@ +# Rename this file to setup.cfg to modify matplotlib's +# build options. + +[egg_info] +tag_svn_revision = 1 + +[directories] +# Uncomment to override the default basedir in setupext.py. +# This can be a single directory or a space-delimited list of directories. +#basedirlist = /usr + +[status] +# To suppress display of the dependencies and their versions +# at the top of the build log, uncomment the following line: +#suppress = True +# +# Uncomment to insert lots of diagnostic prints in extension code +#verbose = True + +[provide_packages] +# By default, matplotlib checks for a few dependencies and +# installs them if missing. This feature can be turned off +# by uncommenting the following lines. Acceptible values are: +# True: install, overwrite an existing installation +# False: do not install +# auto: install only if the package is unavailable. This +# is the default behavior +# +## Date/timezone support: +#pytz = False +#dateutil = False + +[gui_support] +# Matplotlib supports multiple GUI toolkits, including Cocoa, +# GTK, Fltk, MacOSX, Qt, Qt4, Tk, and WX. Support for many of +# these toolkits requires AGG, the Anti-Grain Geometry library, +# which is provided by matplotlib and built by default. +# +# Some backends are written in pure Python, and others require +# extension code to be compiled. By default, matplotlib checks +# for these GUI toolkits during installation and, if present, +# compiles the required extensions to support the toolkit. GTK +# support requires the GTK runtime environment and PyGTK. Wx +# support requires wxWidgets and wxPython. Tk support requires +# Tk and Tkinter. The other GUI toolkits do not require any +# extension code, and can be used as long as the libraries are +# installed on your system. +# +# You can uncomment any the following lines if you know you do +# not want to use the GUI toolkit. Acceptible values are: +# True: build the extension. Exits with a warning if the +# required dependencies are not available +# False: do not build the extension +# auto: build if the required dependencies are available, +# otherwise skip silently. This is the default +# behavior +# +gtk = True +gtkagg = True +tkagg = True +wxagg = True +macosx = False + +[rc_options] +# User-configurable options +# +# Default backend, one of: Agg, Cairo, CocoaAgg, GTK, GTKAgg, GTKCairo, +# FltkAgg, MacOSX, Pdf, Ps, QtAgg, Qt4Agg, SVG, TkAgg, WX, WXAgg. +# +# The Agg, Ps, Pdf and SVG backends do not require external +# dependencies. Do not choose GTK, GTKAgg, GTKCairo, MacOSX, TkAgg or WXAgg +# if you have disabled the relevent extension modules. Agg will be used +# by default. +# +backend = Qt4Agg +# +# The numerix module was historically used to provide +# compatibility between the Numeric, numarray, and NumPy array +# packages. Now that NumPy has emerge as the universal array +# package for python, numerix is not really necessary and is +# maintained to provide backward compatibility. Do not change +# this unless you have a compelling reason to do so. +numerix = numpy diff --git a/community-staging/qpxtool/PKGBUILD b/community-staging/qpxtool/PKGBUILD new file mode 100644 index 000000000..47c3e14a3 --- /dev/null +++ b/community-staging/qpxtool/PKGBUILD @@ -0,0 +1,28 @@ +# $Id: PKGBUILD 62654 2012-01-23 09:59:30Z spupykin $ +# Maintainer: Sergej Pupykin +# Contributor: Krzysztof Stasiorowski + +pkgname=qpxtool +pkgver=0.7.1_002 +pkgrel=3 +pkgdesc="Allows better controll over optical drives to include QChecks and optimization settings." +arch=('i686' 'x86_64') +url="http://qpxtool.sourceforge.net/" +license=('GPL') +depends=('qt') +source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.bz2 + libpng15.patch) +md5sums=('755321a0196b16d06857550aac74ff50' + 'ab9af7610277652c77c6d114422b2266') + +build() { + cd $srcdir/$pkgname-$pkgver + # Fix strict aliasing warnings + export CFLAGS="$CFLAGS -fno-strict-aliasing" + sed -i 's|lib64|lib|' configure + patch -p1 <$srcdir/libpng15.patch + ./configure --prefix=/usr + make + mkdir -p $pkgdir/usr/bin + make DESTDIR=$pkgdir install +} diff --git a/community-staging/qpxtool/libpng15.patch b/community-staging/qpxtool/libpng15.patch new file mode 100644 index 000000000..05e6f49d2 --- /dev/null +++ b/community-staging/qpxtool/libpng15.patch @@ -0,0 +1,127 @@ +diff -wbBur qpxtool-0.7.1_002/console/f1tattoo/f1tattoo.cpp qpxtool-0.7.1_002.my/console/f1tattoo/f1tattoo.cpp +--- qpxtool-0.7.1_002/console/f1tattoo/f1tattoo.cpp 2009-11-25 10:55:44.000000000 +0300 ++++ qpxtool-0.7.1_002.my/console/f1tattoo/f1tattoo.cpp 2012-01-23 13:53:37.000000000 +0400 +@@ -129,28 +129,28 @@ + + png_read_info(png_ptr, info_ptr); + +- printf("Image size: %ld x %ld\n", info_ptr->width, info_ptr->height); ++ printf("Image size: %u x %u\n", png_get_image_width(png_ptr, info_ptr), png_get_image_height(png_ptr, info_ptr)); + +- if (info_ptr->width != 3744U || info_ptr->height != rows ) { ++ if (png_get_image_width(png_ptr, info_ptr) != 3744U || png_get_image_height(png_ptr, info_ptr) != rows ) { + printf("Image should be 3744 x %d", rows); + return 1; + } + +-// width = info_ptr->width; +-// height = info_ptr->height; +-// bit_depth = info_ptr->bit_depth; ++// width = png_get_image_width(png_ptr, info_ptr); ++// height = png_get_image_height(png_ptr, info_ptr); ++// bit_depth = png_get_bit_depth(png_ptr, info_ptr); + + number_of_passes = png_set_interlace_handling(png_ptr); + png_read_update_info(png_ptr, info_ptr); + +- printf("Color type: [%d] ", info_ptr->color_type); +- switch (info_ptr->color_type) { ++ printf("Color type: [%d] ", png_get_color_type(png_ptr, info_ptr)); ++ switch (png_get_color_type(png_ptr, info_ptr)) { + case PNG_COLOR_TYPE_GRAY: + printf("PNG_COLOR_TYPE_GRAY\n"); + break; + case PNG_COLOR_TYPE_PALETTE: + printf("PNG_COLOR_TYPE_PALETTE\n"); +- if (!(info_ptr->valid & PNG_INFO_PLTE)) { ++ if (!(png_get_valid(png_ptr, info_ptr, PNG_INFO_PLTE))) { + printf("PNG color type is indexed, but no palette found!"); + goto err_read_png; + } +@@ -168,49 +168,53 @@ + printf("unlnown PNG color type!\n"); + goto err_read_png; + } +- printf("Bit depth : %d\n", info_ptr->bit_depth); +- if (info_ptr->bit_depth != 8) { ++ printf("Bit depth : %d\n", png_get_bit_depth(png_ptr, info_ptr)); ++ if (png_get_bit_depth(png_ptr, info_ptr) != 8) { + printf("Unsupported bit depth!\n"); + goto err_read_png; + } +- if (info_ptr->valid & PNG_INFO_PLTE) { +- printf("Palette : %d colors\n", info_ptr->num_palette); ++ ++ int num_palette; ++ png_colorp plte; ++ png_get_PLTE(png_ptr, info_ptr, &plte, &num_palette); ++ ++ if (png_get_valid(png_ptr, info_ptr, PNG_INFO_PLTE)) { ++ printf("Palette : %d colors\n", num_palette); + } else { + printf("Palette : NO\n"); + } +- printf("ROW bytes : %ld\n", info_ptr->rowbytes); +- ++ printf("ROW bytes : %d\n", png_get_rowbytes(png_ptr, info_ptr)); + + raw_row_pointer = buf; +- png_row_pointer = (png_byte*) malloc(info_ptr->rowbytes); ++ png_row_pointer = (png_byte*) malloc(png_get_rowbytes(png_ptr, info_ptr)); + for (row=0; rowwidth < 3744U) ++ if (png_get_image_width(png_ptr, info_ptr) < 3744U) + memset(raw_row_pointer, 0, 3744); + +- switch (info_ptr->color_type) { ++ switch (png_get_color_type(png_ptr, info_ptr)) { + case PNG_COLOR_TYPE_GRAY: +- for (col=0; colwidth; col++) { ++ for (col=0; colwidth; col++) { ++ for (col=0; colpalette[c].red; +- g = info_ptr->palette[c].green; +- b = info_ptr->palette[c].blue; ++ r = plte[c].red; ++ g = plte[c].green; ++ b = plte[c].blue; + c = (r*11 + g*16 + b*5) / 32; + raw_row_pointer[col] = c ^ 0xFF; + } + break; + case PNG_COLOR_TYPE_RGB: +- for (col=0; colwidth; col++) { ++ for (col=0; colwidth; col++) { ++ for (col=0; colwidth; col++) { ++ for (col=0; col +# Maintainer: Daniel J Griffiths +# Contributor: Roman Kyrylych +# Contributor: cdhotfire + +pkgname=rawstudio +pkgver=2.0 +pkgrel=5 +pkgdesc="An open source raw-image converter written in GTK+" +arch=('i686' 'x86_64') +license=('GPL') +url="http://rawstudio.org/" +depends=('exiv2' 'libgphoto2' 'flickcurl' 'libjpeg' 'fftw' 'gconf' 'lensfun' + 'raptor1' 'lcms' 'gtk2') +install=${pkgname}.install +options=('!libtool') +source=(http://rawstudio.org/files/release/${pkgname}-${pkgver}.tar.gz + libpng15.patch) +md5sums=('b2f86b8ca6b83ad954e3104c4cb89e9b' + '2f8b7acbe10d8096ce613cbea7986fd3') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + patch -p1 <$srcdir/libpng15.patch + ./configure --prefix=/usr + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make prefix="${pkgdir}/usr" install + mkdir $pkgdir/usr/lib/rawstudio + mv $pkgdir/usr/share/rawstudio/plugins $pkgdir/usr/lib/rawstudio + ln -s ../../lib/rawstudio/plugins $pkgdir/usr/share/rawstudio/plugins +} diff --git a/community-staging/rawstudio/libpng15.patch b/community-staging/rawstudio/libpng15.patch new file mode 100644 index 000000000..6d3b85968 --- /dev/null +++ b/community-staging/rawstudio/libpng15.patch @@ -0,0 +1,40 @@ +diff -wbBur rawstudio-2.0/plugins/load-gdk/exiv2-colorspace.cpp rawstudio-2.0.my/plugins/load-gdk/exiv2-colorspace.cpp +--- rawstudio-2.0/plugins/load-gdk/exiv2-colorspace.cpp 2011-02-24 01:35:18.000000000 +0300 ++++ rawstudio-2.0.my/plugins/load-gdk/exiv2-colorspace.cpp 2012-01-23 15:03:22.000000000 +0400 +@@ -102,8 +102,8 @@ + { + *linear_guess = FALSE; + RSColorSpace* profile = NULL; +- const gchar *icc_profile_title; +- const gchar *icc_profile; ++ png_charp icc_profile_title; ++ png_bytep icc_profile; + guint icc_profile_size; + png_structp png_ptr = png_create_read_struct( + PNG_LIBPNG_VER_STRING, +@@ -125,11 +125,11 @@ + + int compression_type; + /* Extract embedded ICC profile */ +- if (info_ptr->valid & PNG_INFO_iCCP) ++ if (png_get_valid(png_ptr, info_ptr, PNG_INFO_iCCP)) + { + png_uint_32 retval = png_get_iCCP (png_ptr, info_ptr, +- (png_charpp) &icc_profile_title, &compression_type, +- (png_charpp) &icc_profile, (png_uint_32*) &icc_profile_size); ++ &icc_profile_title, &compression_type, ++ &icc_profile, (png_uint_32*) &icc_profile_size); + if (retval != 0) + { + RSIccProfile *icc = rs_icc_profile_new_from_memory((gchar*)icc_profile, icc_profile_size, TRUE); +diff -wbBur rawstudio-2.0/plugins/output-pngfile/output-pngfile.c rawstudio-2.0.my/plugins/output-pngfile/output-pngfile.c +--- rawstudio-2.0/plugins/output-pngfile/output-pngfile.c 2011-03-26 04:52:29.000000000 +0300 ++++ rawstudio-2.0.my/plugins/output-pngfile/output-pngfile.c 2012-01-23 15:04:59.000000000 +0400 +@@ -23,6 +23,7 @@ + #include + #include "config.h" + #include ++#include + + #define RS_TYPE_PNGFILE (rs_pngfile_type) + #define RS_PNGFILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_PNGFILE, RSPngfile)) diff --git a/community-staging/rawstudio/rawstudio.install b/community-staging/rawstudio/rawstudio.install new file mode 100644 index 000000000..261adb7b4 --- /dev/null +++ b/community-staging/rawstudio/rawstudio.install @@ -0,0 +1,11 @@ +post_install() { + update-desktop-database -q || true +} + +post_upgrade() { + update-desktop-database -q || true +} + +post_remove() { + update-desktop-database -q || true +} -- cgit v1.2.3-54-g00ecf