imlib2 stable port information

Package: imlib2
Version: 1.4.2
Revision: 5
Description: Image handling library for X11
License: BSD
Maintainer: Benjamin Reed

Depends: <<
%N-shlibs (= %v-%r),
freetype219-shlibs (>= 2.3.12-1),
giflib-shlibs
<<
BuildDepends: <<
autoconf2.6,
automake1.11,
bzip2-dev,
fink (>= 0.28-1),
fink-package-precedence,
freetype219 (>= 2.3.12-1),
giflib,
libid3tag,
libjpeg8,
libpng15,
libtiff,
libtool2,
pkgconfig (>= 0.23),
x11-dev
<<
Replaces: %N-shlibs (<< 1.1.0-14)
BuildDependsOnly: true

Source: mirror:sourceforge:enlightenment/%n-%v.tar.bz2
Source-MD5: 9f15568e76ebda9092c571e0df261f54
PatchFile: %n.patch
PatchFile-MD5: 7770e67c4fb265f8db89c3688a04844d
PatchScript: <<
%{default_script}
perl -pi -e 's/(LDFLAGS.*=.*-module)/\1 -no-undefined/' src/modules/{filters,loaders}/Makefile.am
<<

UseMaxBuildJobs: false
ConfigureParams: --enable-visibility-hiding --enable-dependency-tracking --disable-static --disable-amd64

CompileScript: <<
#!/bin/sh -ev
autoreconf -fi
./configure %c
make
fink-package-precedence --prohibit-bdep=%n .
<<
InstallScript: make install DESTDIR=%d
DocFiles: AUTHORS COPYING ChangeLog README TODO doc/*.html doc/*.gif
SplitOff: <<
Package: %N-shlibs
Depends: <<
bzip2-shlibs,
freetype219-shlibs (>= 2.3.12-1),
giflib-shlibs,
libid3tag-shlibs,
libjpeg8-shlibs,
libpng15-shlibs,
libtiff-shlibs,
x11
<<
DocFiles: COPYING
Files: lib/libImlib2.*.dylib lib/imlib2
Shlibs: %p/lib/libImlib2.1.dylib 6.0.0 %n (>= 1.4.0-1)
<<

Homepage: http://enlightenment.sourceforge.net/Libraries/Imlib2/
DescDetail: <<
Imlib2 is the successor to Imlib. It is not just a newer version, it is a
completely new library. Imlib2 can be installed alongside Imlib 1.x
without any problems since they are effectively different libraries, but
they have very similar functionality.
<<
DescPackaging: <<
Fix -I ordering (local before global)

Upstream-mailing-list patch for libpng15 support. See:
http://sourceforge.net/mailarchive/message.php?msg_id=26896648
<<

imlib2 stable port .patch

diff -Nurd -x'*~' imlib2-1.4.2.orig/src/lib/Makefile.am imlib2-1.4.2/src/lib/Makefile.am
--- imlib2-1.4.2.orig/src/lib/Makefile.am 2008-08-17 05:39:13.000000000 -0400
+++ imlib2-1.4.2/src/lib/Makefile.am 2011-09-23 17:58:44.000000000 -0400
@@ -1,6 +1,6 @@
AUTOMAKE_OPTIONS = 1.4 foreign
MAINTAINERCLEANFILES = Makefile.in
-INCLUDES = @my_includes@ -I. -I$(top_srcdir) -I$(top_builddir) -DPACKAGE_LIB_DIR=\"$(libdir)\"
+INCLUDES = -I. -I$(top_srcdir) -I$(top_builddir) @my_includes@ -DPACKAGE_LIB_DIR=\"$(libdir)\"

lib_LTLIBRARIES = libImlib2.la
include_HEADERS = Imlib2.h
@@ -98,5 +98,5 @@
libImlib2_la_DEPENDENCIES = $(top_builddir)/config.h
endif
endif
-libImlib2_la_LDFLAGS = -version-info @lt_version@
+libImlib2_la_LDFLAGS = -version-info @lt_version@ -no-undefined

diff -Nurd -x'*~' imlib2-1.4.2.orig/src/modules/loaders/loader_png.c imlib2-1.4.2/src/modules/loaders/loader_png.c
--- imlib2-1.4.2.orig/src/modules/loaders/loader_png.c 2008-08-17 05:39:13.000000000 -0400
+++ imlib2-1.4.2/src/modules/loaders/loader_png.c 2011-09-23 16:26:31.000000000 -0400
@@ -58,7 +58,7 @@
fclose(f);
return 0;
}
- if (setjmp(png_ptr->jmpbuf))
+ if (setjmp(png_jmpbuf(png_ptr)))
{
png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
fclose(f);
@@ -238,7 +238,7 @@
png_structp png_ptr;
png_infop info_ptr;
DATA32 *ptr;
- int x, y, j;
+ int x, y, j, interlace;
png_bytep row_ptr, data = NULL;
png_color_8 sig_bit;
int pl = 0;
@@ -265,7 +265,7 @@
png_destroy_write_struct(&png_ptr, (png_infopp) NULL);
return 0;
}
- if (setjmp(png_ptr->jmpbuf))
+ if (setjmp(png_jmpbuf(png_ptr)))
{
fclose(f);
png_destroy_write_struct(&png_ptr, (png_infopp) & info_ptr);
@@ -274,11 +274,11 @@
}

/* check whether we should use interlacing */
+ interlace = PNG_INTERLACE_NONE;
if ((tag = __imlib_GetTag(im, "interlacing")) && tag->val)
{
#ifdef PNG_WRITE_INTERLACING_SUPPORTED
- png_ptr->interlaced = PNG_INTERLACE_ADAM7;
- num_passes = png_set_interlace_handling(png_ptr);
+ interlace = PNG_INTERLACE_ADAM7;
#endif
}

@@ -286,7 +286,7 @@
if (im->flags & F_HAS_ALPHA)
{
png_set_IHDR(png_ptr, info_ptr, im->w, im->h, 8,
- PNG_COLOR_TYPE_RGB_ALPHA, png_ptr->interlaced,
+ PNG_COLOR_TYPE_RGB_ALPHA, interlace,
PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
#ifdef WORDS_BIGENDIAN
png_set_swap_alpha(png_ptr);
@@ -297,7 +297,7 @@
else
{
png_set_IHDR(png_ptr, info_ptr, im->w, im->h, 8, PNG_COLOR_TYPE_RGB,
- png_ptr->interlaced, PNG_COMPRESSION_TYPE_BASE,
+ interlace, PNG_COMPRESSION_TYPE_BASE,
PNG_FILTER_TYPE_BASE);
data = malloc(im->w * 3 * sizeof(char));
}
@@ -344,6 +344,10 @@
png_set_shift(png_ptr, &sig_bit);
png_set_packing(png_ptr);

+#ifdef PNG_WRITE_INTERLACING_SUPPORTED
+ num_passes = png_set_interlace_handling(png_ptr);
+#endif
+
for (pass = 0; pass < num_passes; pass++)
{
ptr = im->data;

imlib2 _unstable_ port .patch