167 lines
5.7 KiB
Bash
167 lines
5.7 KiB
Bash
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
|
|
|
|
pkgbase=gettext
|
|
pkgname=('gettext' 'gettext-devel' 'libgettextpo' 'libasprintf' 'libintl')
|
|
pkgver=0.22
|
|
pkgrel=2
|
|
pkgdesc="GNU internationalization library"
|
|
arch=('i686' 'x86_64')
|
|
url="https://www.gnu.org/software/gettext/"
|
|
license=('GPL')
|
|
makedepends=('groff' 'libiconv-devel' 'autotools' 'gcc')
|
|
options=(!docs)
|
|
source=(https://ftp.gnu.org/pub/gnu/gettext/${pkgname}-${pkgver}.tar.gz{,.sig}
|
|
gettext-tools-tests-locale-ll-es.patch
|
|
gettext-0.21.1-autopoint-V.patch
|
|
gettext-0.21.1-cygwin-ftm.patch
|
|
gettext-0.22-no-woe32dll-gettext-tools-configure-ac.patch
|
|
gettext-0.22-no-woe32dll-m4-woe32-dll-m4.patch
|
|
gettext-0.22-gettext-runtime-gnulib-lib-localename-c.patch
|
|
gettext-0.22-gettext-runtime-intl-gnulib-lib-localename-c.patch
|
|
gettext-0.22-gettext-tools-gnulib-lib-localename-c.patch
|
|
gettext-0.22-disable-libtextstyle.patch
|
|
gettext-0.19.8.1-msys2.patch
|
|
gettext-0.19.7-archive.patch)
|
|
sha256sums=('49f089be11b490170bbf09ed2f51e5f5177f55be4cc66504a5861820e0fb06ab'
|
|
'SKIP'
|
|
'a83c2e89aa799232847d120ce3da856fbee2fda87245233d336c5de044465321'
|
|
'2a8ea083abf7278b3b6157e6f3eed4e6a90b803308396e30b1302085b840c8e9'
|
|
'62c0cf906df4c0196e2e3e4f79b91486f6a95d29bf9de8aed8c92b5075058497'
|
|
'71f26d49ddabf400ee14ea574495a5d3b3055957d81fecfb4cb5cb99dab3cd47'
|
|
'd5b14b03ca609764f1c646efa9e85dedafe69f967f37b8db194fcddc199f2d97'
|
|
'd618348b44a4b19466707edf195aa84ca6825d7e4b4459f4c2c64fe47388b24c'
|
|
'1e5af27a1c29e1595696c899e0cc411a54acd9b7f8aef186c1640d79434f30f7'
|
|
'42edf54a3d63a57ba80ae7e65c641dd13276141ae4657002e70da1078ade354f'
|
|
'3d15cfa0b06e882483c1b967d1240af25a6338e088a641de9582a7809e64d474'
|
|
'b28c5e2edb90bffbb4bae2b19f2677650f4cd56b061d427beb6ff50280dc835b'
|
|
'ceede59c0a5f8ad09fedcb5ad2ffb2261169d6aaaef04126f204c120512b977e')
|
|
validpgpkeys=('462225C3B46F34879FC8496CD605848ED7E69871' # Daiki Ueno
|
|
'9001B85AF9E1B83DF1BDA942F5BE8B267C6A406D') # Bruno Haible (Open Source Development)
|
|
|
|
prepare() {
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
|
|
# Cygwin patches
|
|
patch -p1 -i $srcdir/gettext-tools-tests-locale-ll-es.patch
|
|
patch -p1 -i $srcdir/gettext-0.21.1-autopoint-V.patch
|
|
patch -p1 -i $srcdir/gettext-0.21.1-cygwin-ftm.patch
|
|
patch -p1 -i $srcdir/gettext-0.22-no-woe32dll-gettext-tools-configure-ac.patch
|
|
patch -p1 -i $srcdir/gettext-0.22-no-woe32dll-m4-woe32-dll-m4.patch
|
|
patch -p1 -i $srcdir/gettext-0.22-gettext-runtime-gnulib-lib-localename-c.patch
|
|
patch -p1 -i $srcdir/gettext-0.22-gettext-runtime-intl-gnulib-lib-localename-c.patch
|
|
patch -p1 -i $srcdir/gettext-0.22-gettext-tools-gnulib-lib-localename-c.patch
|
|
patch -p1 -i $srcdir/gettext-0.22-disable-libtextstyle.patch
|
|
|
|
# MSYS2 patch
|
|
patch -p1 -i $srcdir/gettext-0.19.8.1-msys2.patch
|
|
|
|
pushd gettext-tools/misc > /dev/null
|
|
mkdir archive
|
|
tar -xvf archive.dir.tar -C archive
|
|
rm -f archive.dir.tar
|
|
pushd archive > /dev/null
|
|
patch -p1 -i ${srcdir}/gettext-0.19.7-archive.patch
|
|
tar -cvf ../archive.dir.tar *
|
|
popd > /dev/null
|
|
rm -rf archive
|
|
popd > /dev/null
|
|
|
|
libtoolize --copy --force
|
|
./autogen.sh --skip-gnulib
|
|
}
|
|
|
|
build() {
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
|
|
local CYGWIN_CHOST="$(echo "${CHOST}" | sed 's|-msys$|-cygwin|')"
|
|
|
|
./configure \
|
|
--build=${CYGWIN_CHOST} \
|
|
--host=${CYGWIN_CHOST} \
|
|
--prefix=/usr \
|
|
--with-included-libcroco \
|
|
--with-included-libunistring \
|
|
--with-included-libxml \
|
|
--with-included-glib \
|
|
--with-included-gettext \
|
|
--without-emacs \
|
|
--enable-shared \
|
|
--enable-static \
|
|
--disable-java \
|
|
--disable-native-java \
|
|
--disable-csharp \
|
|
--disable-openmp
|
|
|
|
make
|
|
|
|
make DESTDIR="${srcdir}/dest" install
|
|
rm -f ${srcdir}/dest/usr/lib/charset.alias
|
|
}
|
|
|
|
check() {
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
make check
|
|
}
|
|
|
|
package_gettext() {
|
|
depends=('libintl' 'libgettextpo' 'libasprintf')
|
|
|
|
mkdir -p ${pkgdir}/usr/{bin,lib,share}
|
|
|
|
cp -rf ${srcdir}/dest/usr/lib/gettext ${pkgdir}/usr/lib/
|
|
|
|
cp -rf ${srcdir}/dest/usr/bin ${pkgdir}/usr/
|
|
rm -rf ${pkgdir}/usr/bin/msys-asprintf-0.dll
|
|
rm -rf ${pkgdir}/usr/bin/msys-gettextpo-0.dll
|
|
rm -rf ${pkgdir}/usr/bin/msys-intl-8.dll
|
|
|
|
cp -rf ${srcdir}/dest/usr/share/aclocal ${pkgdir}/usr/share/
|
|
cp -rf ${srcdir}/dest/usr/share/doc ${pkgdir}/usr/share/
|
|
cp -rf ${srcdir}/dest/usr/share/info ${pkgdir}/usr/share/
|
|
cp -rf ${srcdir}/dest/usr/share/locale ${pkgdir}/usr/share/
|
|
cp -rf ${srcdir}/dest/usr/share/man ${pkgdir}/usr/share/
|
|
|
|
}
|
|
|
|
package_gettext-devel() {
|
|
pkgdesc="GNU Internationalization development utilities"
|
|
groups=('development')
|
|
depends=("gettext=${pkgver}" "libiconv-devel")
|
|
options=('staticlibs')
|
|
optdepends=('cvs: for autopoint tool')
|
|
|
|
mkdir -p ${pkgdir}/usr/{bin,include,lib,share}
|
|
|
|
cp -rf ${srcdir}/dest/usr/include ${pkgdir}/usr/
|
|
cp -rf ${srcdir}/dest/usr/lib ${pkgdir}/usr/
|
|
rm -rf ${pkgdir}/usr/lib/gettext
|
|
cp -rf ${srcdir}/dest/usr/share/gettext ${pkgdir}/usr/share/
|
|
}
|
|
|
|
package_libintl() {
|
|
pkgdesc="GNU Internationalization runtime library"
|
|
groups=('libraries')
|
|
depends=('gcc-libs' 'libiconv')
|
|
|
|
mkdir -p ${pkgdir}/usr/bin
|
|
cp -f ${srcdir}/dest/usr/bin/msys-intl-8.dll ${pkgdir}/usr/bin/
|
|
}
|
|
|
|
package_libgettextpo() {
|
|
pkgdesc="GNU Internationalization runtime library"
|
|
groups=('libraries')
|
|
depends=('gcc-libs')
|
|
|
|
mkdir -p ${pkgdir}/usr/bin
|
|
cp -f ${srcdir}/dest/usr/bin/msys-gettextpo-0.dll ${pkgdir}/usr/bin/
|
|
}
|
|
|
|
package_libasprintf() {
|
|
pkgdesc="C-style formatted output in C++ (runtime)"
|
|
groups=('libraries')
|
|
depends=('gcc-libs')
|
|
|
|
mkdir -p ${pkgdir}/usr/bin
|
|
cp -f ${srcdir}/dest/usr/bin/msys-asprintf-0.dll ${pkgdir}/usr/bin/
|
|
}
|