diff options
author | kfg | 2015-06-10 18:41:34 +0200 |
---|---|---|
committer | kfg | 2015-06-10 18:41:34 +0200 |
commit | 8c0060a3f4774ca26e6ea2e31541fbb217a31ae7 (patch) | |
tree | ad54c7050d76eb7fd93bbc1a07fd17381b4baeae | |
download | aur-8c0060a3f4774ca26e6ea2e31541fbb217a31ae7.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | PKGBUILD | 59 | ||||
-rw-r--r-- | configure.patch | 52 | ||||
-rw-r--r-- | tools.patch | 16 |
4 files changed, 148 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..65fa9f8c4355 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,21 @@ +pkgbase = mingw-w64-enca + pkgdesc = Charset analyser and converter (mingw-w64) + pkgver = 1.16 + pkgrel = 1 + url = http://cihar.com/software/enca/ + arch = any + license = GPL + makedepends = mingw-w64-gcc + makedepends = wine + depends = mingw-w64-crt + depends = mingw-w64-recode + options = !strip !buildflags staticlibs + source = http://dl.cihar.com/enca/enca-1.16.tar.xz + source = configure.patch + source = tools.patch + md5sums = 0a1483530b1fdb9e2a54786489ee0b69 + md5sums = efb65212b3dffbd29eb253ec07f2db63 + md5sums = e62da0e6fd31affa1f3e15171dbc95c6 + +pkgname = mingw-w64-enca + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..236e173ff12b --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,59 @@ +# $Id$ +# Maintainer: Giovanni Scafora <giovanni@archlinux.org> +# Contributor: Filip Dvorak <fila@pruda.com> + +pkgname=mingw-w64-enca +pkgver=1.16 +pkgrel=1 +pkgdesc="Charset analyser and converter (mingw-w64)" +arch=('any') +url="http://cihar.com/software/enca/" +options=('!strip !buildflags staticlibs') +license=('GPL') +depends=('mingw-w64-crt' 'mingw-w64-recode') +makedepends=('mingw-w64-gcc' 'wine') +source=("http://dl.cihar.com/enca/enca-${pkgver}.tar.xz" + 'configure.patch' + 'tools.patch') +md5sums=('0a1483530b1fdb9e2a54786489ee0b69' + 'efb65212b3dffbd29eb253ec07f2db63' + 'e62da0e6fd31affa1f3e15171dbc95c6') +_architectures="i686-w64-mingw32 x86_64-w64-mingw32" + +prepare() { + cd "${srcdir}/enca-${pkgver}" + + patch -Np1 -i "${srcdir}/configure.patch" + patch -Np1 -i "${srcdir}/tools.patch" + ./autogen.sh + make distclean +} + +build() { + for _arch in ${_architectures}; do + mkdir -p ${srcdir}/build-${_arch} && cd ${srcdir}/build-${_arch} + + ${srcdir}/enca-${pkgver}/configure --host=${_arch} \ + --prefix=/usr/${_arch} \ + --libexecdir=/usr/${_arch}/lib \ + --mandir=/usr/${_arch}/share/man \ + --with-librecode=/usr/${_arch} \ + --enable-external + make + done +} + +package() { + for _arch in ${_architectures}; do + cd ${srcdir}/build-${_arch} + + make DESTDIR="${pkgdir}" install + + rm "${pkgdir}/usr/${_arch}"/bin/*.exe + rm -r "${pkgdir}/usr/${_arch}/share" + rm -r "${pkgdir}/usr/${_arch}/lib/enca" + + ${_arch}-strip -x -g "${pkgdir}/usr/${_arch}"/bin/*.dll + ${_arch}-strip -g "${pkgdir}/usr/${_arch}"/lib/*.a + done +} diff --git a/configure.patch b/configure.patch new file mode 100644 index 000000000000..b33fd9cb7009 --- /dev/null +++ b/configure.patch @@ -0,0 +1,52 @@ +diff -ru enca-1.15/configure.ac patched/configure.ac +--- enca-1.15/configure.ac 2013-09-30 09:48:22.000000000 +0200 ++++ patched/configure.ac 2014-03-30 14:34:59.632070945 +0200 +@@ -39,13 +39,15 @@ + AC_GNU_SOURCE + AC_AIX + AC_ISC_POSIX +-AC_PROG_LIBTOOL ++#AC_PROG_LIBTOOL + AC_PROG_CC + AM_PROG_CC_C_O + AC_PROG_INSTALL + AC_PROG_LN_S + AC_PATH_PROG(MKTEMP_PROG, mktemp) + ++LT_INIT ++ + dnl With GCC, be paranoiac. It should compile really cleanly. + dnl Except -Wno-sign-compare, but older gcc's don't know it. + if test "$GCC" = yes; then +@@ -97,8 +99,17 @@ + dnl And for gtk-doc + gtk_CHECK_GTK_DOC + +-dnl Check for good random number sources +-AC_CHECK_FILES(/dev/random /dev/urandom /dev/srandom /dev/arandom) ++LIBENCA_LDFLAGS="" ++case "$host_os" in ++ mingw*) ++ echo "no random number sources when cross-compiling" ++ LIBENCA_LDFLAGS="-no-undefined ${wl}-no-undefined ${wl}-export-all-symbols" ;; ++ *) ++ dnl Check for good random number sources ++ AC_CHECK_FILES(/dev/random /dev/urandom /dev/srandom /dev/arandom) ;; ++esac ++AC_MSG_RESULT([$LIBENCA_LDFLAGS]) ++AC_SUBST([LIBENCA_LDFLAGS]) + + dnl Dirty path hack. Helps some people with badly set up search paths. + if test "$prefix" = "NONE"; then +diff -ru enca-1.15/lib/Makefile.am patched/lib/Makefile.am +--- enca-1.15/lib/Makefile.am 2013-09-30 09:48:22.000000000 +0200 ++++ patched/lib/Makefile.am 2014-03-30 14:33:54.664402842 +0200 +@@ -7,7 +7,7 @@ + # Any iface change C++: 0: A + # Adding ifaces C: R: A++ + # Changing ifaces C: R: 0 +-libenca_la_LDFLAGS = -version-info 5:1:5 ++libenca_la_LDFLAGS = @LIBENCA_LDFLAGS@ -version-info 5:1:5 + libenca_la_SOURCES = \ + common.c \ + ctype.c \ diff --git a/tools.patch b/tools.patch new file mode 100644 index 000000000000..04ba596d3d40 --- /dev/null +++ b/tools.patch @@ -0,0 +1,16 @@ +--- enca-1.14/tools/Makefile.am 2009-08-25 10:33:34.000000000 +0200 ++++ patched/tools/Makefile.am 2014-01-01 15:50:09.180753219 +0100 +@@ -31,7 +31,12 @@ + sed -e 's/^#define \([A-Z0-9_]*\) \(.*\)/@\1@ \2/' -e 's/"//g' -e 's/NULL$$//' -e 's/ /\//' -e 's/^\(.*\)$$/s\/\1\//' $(top_builddir)/iconvenc.h >encodings.sed + + encodings.h: encodings.sed $(srcdir)/encodings.dat make_hash +- sed -f encodings.sed $(srcdir)/encodings.dat | ./make_hash >encodings.h ++ @if test "$(EXEEXT)" == ".exe"; then \ ++ mv make_hash make_hash.exe; \ ++ sed -f encodings.sed $(srcdir)/encodings.dat | wine make_hash.exe >encodings.h; \ ++ else \ ++ sed -f encodings.sed $(srcdir)/encodings.dat | ./make_hash >encodings.h; \ ++ fi + + # Normally there's no need to regenerate tables, they are copy-and-pasted + # into the C source manually, but the rules are here. Run `make tables' |