summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSchala2015-07-17 20:07:06 -0700
committerSchala2015-07-17 20:07:06 -0700
commit49d268f340b5f883d33afcb3b4246086c67f3494 (patch)
tree34403582afb4cbed49a28c673b937fe4e3d13d49
downloadaur-49d268f340b5f883d33afcb3b4246086c67f3494.tar.gz
init
-rw-r--r--.SRCINFO25
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD53
-rw-r--r--libmng-1.0.10-mingw.patch45
-rw-r--r--libmng-1.0.9-dont-leak-zlib-streams.diff14
-rw-r--r--no-undefined.patch24
6 files changed, 165 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..4195487fdbc4
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,25 @@
+pkgbase = mingw-w64-libmng
+ pkgdesc = A collection of routines used to create and manipulate MNG format graphics files (mingw-w64)
+ pkgver = 2.0.3
+ pkgrel = 1
+ url = http://www.libmng.com/
+ arch = any
+ license = custom
+ makedepends = mingw-w64-configure
+ depends = mingw-w64-lcms2
+ options = staticlibs
+ options = !buildflags
+ options = !strip
+ source = http://downloads.sourceforge.net/sourceforge/libmng/libmng-2.0.3.tar.xz
+ source = http://downloads.sourceforge.net/sourceforge/libmng/libmng-2.0.3.tar.xz.asc
+ source = libmng-1.0.9-dont-leak-zlib-streams.diff
+ source = libmng-1.0.10-mingw.patch
+ source = no-undefined.patch
+ sha1sums = 0f141482ffcef6f8cd4413f945a59310ac2e49af
+ sha1sums = SKIP
+ sha1sums = d6f2a94cf77cecb4dcca3ee3029016d921608ad7
+ sha1sums = 1cb7bbeb2cc7ab0c4ba2730510cb91b9fc189d29
+ sha1sums = 29ceb317cb9ffce4a36f7662131feb70502231be
+
+pkgname = mingw-w64-libmng
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..9d2e54b21908
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+pkg/
+src/
+*.asc
+*.xz
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..ceba12fa7ebc
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,53 @@
+pkgname=mingw-w64-libmng
+pkgver=2.0.3
+pkgrel=1
+pkgdesc="A collection of routines used to create and manipulate MNG format graphics files (mingw-w64)"
+arch=(any)
+depends=(mingw-w64-lcms2)
+makedepends=(mingw-w64-configure)
+options=(staticlibs !buildflags !strip)
+license=("custom")
+url="http://www.libmng.com/"
+source=("http://downloads.sourceforge.net/sourceforge/libmng/libmng-${pkgver}.tar.xz"{,.asc}
+"libmng-1.0.9-dont-leak-zlib-streams.diff"
+"libmng-1.0.10-mingw.patch"
+"no-undefined.patch")
+sha1sums=('0f141482ffcef6f8cd4413f945a59310ac2e49af'
+ 'SKIP'
+ 'd6f2a94cf77cecb4dcca3ee3029016d921608ad7'
+ '1cb7bbeb2cc7ab0c4ba2730510cb91b9fc189d29'
+ '29ceb317cb9ffce4a36f7662131feb70502231be')
+validpgpkeys=('8048643BA2C840F4F92A195FF54984BFA16C640F')
+
+_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
+
+prepare() {
+ cd "${srcdir}/libmng-${pkgver}"
+ patch -p0 -i "$srcdir"/libmng-1.0.9-dont-leak-zlib-streams.diff
+ patch -p1 -i "$srcdir"/libmng-1.0.10-mingw.patch
+ patch -p1 -i "$srcdir"/no-undefined.patch
+ make distclean
+}
+
+build() {
+ cd "${srcdir}/libmng-${pkgver}"
+ unset LDFLAGS
+ for _arch in ${_architectures}; do
+ mkdir -p build-${_arch} && pushd build-${_arch}
+ ${_arch}-configure
+ make
+ popd
+ done
+}
+
+package() {
+ for _arch in ${_architectures}; do
+ cd "${srcdir}/libmng-${pkgver}/build-${_arch}"
+ make DESTDIR="${pkgdir}" install
+ rm -rf "$pkgdir/usr/${_arch}/share"
+ find "$pkgdir/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \;
+ find "$pkgdir/usr/${_arch}" -name '*.a' -o -name '*.dll' | xargs ${_arch}-strip -g
+ done
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/libmng-1.0.10-mingw.patch b/libmng-1.0.10-mingw.patch
new file mode 100644
index 000000000000..bc5b18d84066
--- /dev/null
+++ b/libmng-1.0.10-mingw.patch
@@ -0,0 +1,45 @@
+diff -u -r libmng-1.0.10/makefiles/makefile.mingwdll libmng-1.0.10/makefiles/makefile.mingwdll
+--- libmng-1.0.10/makefiles/makefile.mingwdll 2005-01-30 11:28:00.000000000 +0100
++++ libmng-1.0.10/makefiles/makefile.mingwdll 2009-12-08 09:35:23.000000000 +0100
+@@ -10,8 +10,8 @@
+ #
+
+ # outputs
+-LIBMNG_A = libmng.a
+-LIBMNG_DLL = libmng.1.dll
++LIBMNG_A = libmng.dll.a
++LIBMNG_DLL = libmng-1.dll
+ INSTALL_PREFIX = C:/MinGW/
+ # maybe you sould replace with anti-slashes
+
+@@ -51,7 +51,7 @@
+ # for i386:
+ #ALIGN=-malign-loops=2 -malign-functions=2
+
+-CFLAGS=$(ZLIBINC) $(JPEGINC) $(LCMSINC) -Wall -O3 -funroll-loops $(OPTIONS) $(ALIGN) -s
++CFLAGS+=$(ZLIBINC) $(JPEGINC) $(OPTIONS) $(ALIGN) -s
+ LDFLAGS=-L. -lmng $(ZLIBLIB) $(JPEGLIB) $(LCMSLIB) -lm -s
+
+ INCPATH=$(prefix)/include
+@@ -88,9 +88,11 @@
+ $(LIBMNG_A): $(LIBMNG_DLL)
+
+ $(LIBMNG_DLL) : $(OBJS)
+- dllwrap --implib=$(LIBMNG_A) --dllname=$(LIBMNG_DLL) $(OBJS) $(LDFLAGS)
++ $(CC) --shared -o $(LIBMNG_DLL) $(OBJS) -Wl,--out-implib,$(LIBMNG_A) -Wl,--kill-at $(JPEGLIB) $(ZLIBLIB)
+
+ install : $(LIBMNG_A)
++ $(MKDIR) $(INSTALL_PREFIX)bin
++ $(COPY) $(LIBMNG_DLL) $(INSTALL_PREFIX)bin
+ $(MKDIR) $(INSTALL_PREFIX)include
+ $(COPY) libmng.h $(INSTALL_PREFIX)include
+ $(COPY) libmng_conf.h $(INSTALL_PREFIX)include
+@@ -99,7 +101,7 @@
+ $(COPY) $(LIBMNG_A) $(INSTALL_PREFIX)lib
+
+ clean:
+- $(RM) *.o
++ $(RM) *.o $(LIBMNG_DLL) $(LIBMNG_A)
+
+ # DO NOT DELETE THIS LINE -- make depend depends on it.
+
diff --git a/libmng-1.0.9-dont-leak-zlib-streams.diff b/libmng-1.0.9-dont-leak-zlib-streams.diff
new file mode 100644
index 000000000000..9ac03d65270b
--- /dev/null
+++ b/libmng-1.0.9-dont-leak-zlib-streams.diff
@@ -0,0 +1,14 @@
+diff -ur libmng-orig/libmng_zlib.c libmng-1.0.10/libmng_zlib.c
+--- libmng_zlib.c 2005-12-15 00:53:13.000000000 +0100
++++ libmng_zlib.c 2007-07-19 13:17:44.000000000 +0200
+@@ -162,6 +162,9 @@
+ #ifdef MNG_SUPPORT_TRACE
+ MNG_TRACE (pData, MNG_FN_ZLIB_INFLATEINIT, MNG_LC_START);
+ #endif
++
++ if (pData->bInflating) /* free the old zlib structures */
++ inflateEnd(&pData->sZlib);
+ /* initialize zlib structures and such */
+ iZrslt = inflateInit (&pData->sZlib);
+
+
diff --git a/no-undefined.patch b/no-undefined.patch
new file mode 100644
index 000000000000..6c96336c1dd2
--- /dev/null
+++ b/no-undefined.patch
@@ -0,0 +1,24 @@
+diff -Naur a/Makefile.am b/Makefile.am
+--- a/Makefile.am 2013-03-05 15:59:27.000000000 +0400
++++ b/Makefile.am 2013-12-24 08:37:17.617200000 +0400
+@@ -9,7 +9,7 @@
+
+ # libmng release @VERSION@
+ libmng_la_LDFLAGS = \
+- -version-number @MNG_MAJOR_NR@:@MNG_MINOR_NR@:@MNG_RELEASE_NR@
++ -no-undefined -version-number @MNG_MAJOR_NR@:@MNG_MINOR_NR@:@MNG_RELEASE_NR@
+
+ lib_LTLIBRARIES = libmng.la
+
+diff -Naur a/Makefile.in b/Makefile.in
+--- a/Makefile.in 2013-03-05 16:13:02.000000000 +0400
++++ b/Makefile.in 2013-12-24 08:37:44.340000000 +0400
+@@ -329,7 +329,7 @@
+
+ # libmng release @VERSION@
+ libmng_la_LDFLAGS = \
+- -version-number @MNG_MAJOR_NR@:@MNG_MINOR_NR@:@MNG_RELEASE_NR@
++ -no-undefined -version-number @MNG_MAJOR_NR@:@MNG_MINOR_NR@:@MNG_RELEASE_NR@
+
+ lib_LTLIBRARIES = libmng.la
+ include_HEADERS = libmng.h libmng_conf.h libmng_types.h