From 03385fb151cfadd6e2a30d2c4ceb7227a4910101 Mon Sep 17 00:00:00 2001 From: Alexpux Date: Wed, 27 Nov 2013 11:53:19 +0400 Subject: [PATCH] Add libgnurx package --- mingw-w64-libgnurx/PKGBUILD | 57 +++++++++++++++++++ .../mingw-w64-libgnurx-honor-destdir.patch | 26 +++++++++ .../mingw32-libgnurx-Makefile.am | 8 +++ .../mingw32-libgnurx-configure.ac | 12 ++++ 4 files changed, 103 insertions(+) create mode 100644 mingw-w64-libgnurx/PKGBUILD create mode 100644 mingw-w64-libgnurx/mingw-w64-libgnurx-honor-destdir.patch create mode 100644 mingw-w64-libgnurx/mingw32-libgnurx-Makefile.am create mode 100644 mingw-w64-libgnurx/mingw32-libgnurx-configure.ac diff --git a/mingw-w64-libgnurx/PKGBUILD b/mingw-w64-libgnurx/PKGBUILD new file mode 100644 index 0000000000..0cceacf22e --- /dev/null +++ b/mingw-w64-libgnurx/PKGBUILD @@ -0,0 +1,57 @@ +# Maintainer: Alexey Pavlov + +_realname=libgnurx +_mingw_suff=mingw-w64-${CARCH} +pkgname="${_mingw_suff}-${_realname}" +pkgver=2.5.1 +pkgrel=1 +arch=('any') +pkgdesc="libgnurx (mingw-w64)" +depends=("${_mingw_suff}-crt") +makedepends=("${_mingw_suff}-gcc") +options=('staticlibs') +license=('LGPL') +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" + "mingw32-libgnurx-Makefile.am" + "mingw32-libgnurx-configure.ac") +md5sums=('35c8fed3101ca1f253e9b6b1966661f6' + '2d87c59177adf5ec13dbcc02acc4a450' + 'fb5cd6f2441d127b654d2e4cd1e0a11f' + '63f3ec2dc36d1d1b8450e61dcb6e09fc') + +prepare() { + cd "$srcdir/mingw-libgnurx-${pkgver}" + patch -Np0 -i $srcdir/mingw-w64-libgnurx-honor-destdir.patch + + cp $srcdir/mingw32-libgnurx-configure.ac configure.ac + cp $srcdir/mingw32-libgnurx-Makefile.am Makefile.am + touch NEWS + touch AUTHORS + libtoolize --copy + aclocal + autoconf + automake --add-missing +} + +build() +{ + mkdir -p $srcdir/build-${CARCH} && cd $srcdir/build-${CARCH} + ../mingw-libgnurx-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --host=${MINGW_CHOST} + make +} + +package() +{ + cd "$srcdir/build-${CARCH}" + mkdir -p "${pkgdir}${MINGW_PREFIX}"/include + make install DESTDIR="$pkgdir" + cp -f ${pkgdir}${MINGW_PREFIX}/lib/libgnurx.dll.a ${pkgdir}${MINGW_PREFIX}/lib/libregex.dll.a + cp -f ${pkgdir}${MINGW_PREFIX}/lib/libgnurx.a ${pkgdir}${MINGW_PREFIX}/lib/libregex.a + #strip --strip-unneeded "${pkgdir}${MINGW_PREFIX}"/bin/*.dll + #strip -g "$pkgdir"/usr/${_arch}/lib/*.a +} + diff --git a/mingw-w64-libgnurx/mingw-w64-libgnurx-honor-destdir.patch b/mingw-w64-libgnurx/mingw-w64-libgnurx-honor-destdir.patch new file mode 100644 index 0000000000..2a2e879f4a --- /dev/null +++ b/mingw-w64-libgnurx/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 diff --git a/mingw-w64-libgnurx/mingw32-libgnurx-Makefile.am b/mingw-w64-libgnurx/mingw32-libgnurx-Makefile.am new file mode 100644 index 0000000000..30afd112cd --- /dev/null +++ b/mingw-w64-libgnurx/mingw32-libgnurx-Makefile.am @@ -0,0 +1,8 @@ +lib_LTLIBRARIES = libgnurx.la + +libgnurx_la_SOURCES = regex.c +libgnurx_la_includedir = $(includedir) +libgnurx_la_include_HEADERS = regex.h +libgnurx_la_CFLAGS = -I$(top_srcdir) +libgnurx_la_LDFLAGS = -no-undefined -version-info 0:0:0 -export-dynamic + diff --git a/mingw-w64-libgnurx/mingw32-libgnurx-configure.ac b/mingw-w64-libgnurx/mingw32-libgnurx-configure.ac new file mode 100644 index 0000000000..9a642e8402 --- /dev/null +++ b/mingw-w64-libgnurx/mingw32-libgnurx-configure.ac @@ -0,0 +1,12 @@ +# configure.ac -*- Autoconf -*- +# Process this file with autoconf, to generate a configure script. + +AC_INIT(libgnurx, 2.5.1) +AM_INIT_AUTOMAKE +AC_PROG_INSTALL +AC_LIBTOOL_DLOPEN +AC_LIBTOOL_WIN32_DLL +AC_PROG_LIBTOOL + +AC_OUTPUT([Makefile]) +