summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD48
-rw-r--r--mingw-w64-libgnurx-honor-destdir.patch26
3 files changed, 93 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..b5a02ce773e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = mingw-w64-libgnurx
+ pkgdesc = regex functionality from glibc (mingw-w64)
+ pkgver = 2.5.1
+ pkgrel = 5
+ url = http://mingw.sourceforge.net/
+ arch = any
+ license = GPL
+ makedepends = mingw-w64-configure
+ depends = mingw-w64-crt
+ options = !buildflags
+ options = !strip
+ options = staticlibs
+ source = http://download.sourceforge.net/mingw/Other/UserContributed/regex/mingw-regex-2.5.1/mingw-libgnurx-2.5.1-src.tar.gz
+ source = mingw-w64-libgnurx-honor-destdir.patch
+ md5sums = 35c8fed3101ca1f253e9b6b1966661f6
+ md5sums = 2d87c59177adf5ec13dbcc02acc4a450
+
+pkgname = mingw-w64-libgnurx
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..81681fff02e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,48 @@
+
+pkgname=mingw-w64-libgnurx
+pkgver=2.5.1
+pkgrel=5
+arch=(any)
+pkgdesc="regex functionality from glibc (mingw-w64)"
+depends=('mingw-w64-crt')
+makedepends=('mingw-w64-configure')
+options=('!buildflags' '!strip' 'staticlibs')
+license=('GPL')
+url="http://mingw.sourceforge.net/"
+source=("http://download.sourceforge.net/mingw/Other/UserContributed/regex/mingw-regex-${pkgver}/mingw-libgnurx-${pkgver}-src.tar.gz"
+ "mingw-w64-libgnurx-honor-destdir.patch")
+md5sums=('35c8fed3101ca1f253e9b6b1966661f6'
+ '2d87c59177adf5ec13dbcc02acc4a450')
+
+_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
+
+prepare()
+{
+ cd "$srcdir/mingw-libgnurx-${pkgver}"
+ patch -Np0 -i ../mingw-w64-libgnurx-honor-destdir.patch
+}
+
+build()
+{
+ cd "$srcdir/mingw-libgnurx-${pkgver}"
+ 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/mingw-libgnurx-${pkgver}/build-${_arch}"
+ install -d "$pkgdir"/usr/${_arch}/include
+ make install DESTDIR="$pkgdir"
+ ${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll
+ ${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a
+ rm -r "$pkgdir"/usr/${_arch}/man
+ done
+}
+
diff --git a/mingw-w64-libgnurx-honor-destdir.patch b/mingw-w64-libgnurx-honor-destdir.patch
new file mode 100644
index 00000000000..2a2e879f4a9
--- /dev/null
+++ b/mingw-w64-libgnurx-honor-destdir.patch
@@ -0,0 +1,26 @@
+--- Makefile.in.orig 2009-05-24 20:09:25.598720854 +0200
++++ Makefile.in 2009-05-24 20:10:24.541471779 +0200
+@@ -78,16 +78,16 @@
+ install: install-dll @install_dev@
+
+ install-dll:
+- mkdir -p ${bindir}
+- cp -p $(BINDIST_FILES) ${bindir}
++ mkdir -p $(DESTDIR)${bindir}
++ cp -p $(BINDIST_FILES) $(DESTDIR)${bindir}
+
+ install-dev:
+- mkdir -p ${includedir} ${libdir}
+- cp -p ${srcdir}/regex.h ${includedir}
+- cp -p $(DEVDIST_FILES) ${libdir}
++ mkdir -p ${includedir} $(DESTDIR)${libdir}
++ cp -p ${srcdir}/regex.h $(DESTDIR)${includedir}
++ cp -p $(DEVDIST_FILES) $(DESTDIR)${libdir}
+ for s in 3 7; do \
+- mkdir -p ${mandir}/man$$s; \
+- gzip -c ${srcdir}/regex.$$s > ${mandir}/man$$s/regex.$$s.gz; \
++ mkdir -p $(DESTDIR)${mandir}/man$$s; \
++ gzip -c ${srcdir}/regex.$$s > $(DESTDIR)${mandir}/man$$s/regex.$$s.gz; \
+ done
+
+ dist: bindist devdist srcdist