Christoph Reiter a2ee04bf00 More CPEs
2024-03-24 20:09:34 +01:00

64 lines
1.8 KiB
Bash

# Maintainer: Alexey Pavlov <alexpux@gmail.com>
pkgname=('libidn' 'libidn-devel')
pkgver=1.42
pkgrel=1
pkgdesc="Implementation of the Stringprep, Punycode and IDNA specifications"
url="https://www.gnu.org/software/libidn/"
msys2_repository_url="https://gitlab.com/libidn/libidn"
msys2_references=(
"cpe: cpe:/a:gnu:libidn"
)
arch=('i686' 'x86_64')
license=('GPL3' 'LGPL')
makedepends=('gcc' 'texinfo' 'autotools' 'gettext-devel' 'gtk-doc' 'gperf')
options=('!libtool' 'staticlibs')
source=(https://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.gz)
sha256sums=('d6c199dcd806e4fe279360cb4b08349a0d39560ed548ffd1ccadda8cdecb4723')
prepare() {
cd ${srcdir}/${pkgname}-${pkgver}
autoreconf -ivf
# autoreconf leads to an outdated wint_t.m4 being used and makes things fail
# replace the source with a newer one to fix it.. not sure what the real fix would be
cp gl/m4/wint_t.m4 lib/m4
}
build() {
[[ -d ${srcdir}/build-${CHOST} ]] && rm -rf ${srcdir}/build-${CHOST}
mkdir ${srcdir}/build-${CHOST}
cd ${srcdir}/build-${CHOST}
export MSYSTEM=CYGWIN
local CYGWIN_CHOST="${CHOST/-msys/-cygwin}"
../${pkgname}-${pkgver}/configure \
--prefix=/usr \
--build=${CYGWIN_CHOST} \
--enable-shared \
--enable-static
make
make DESTDIR=${srcdir}/dest-${CHOST} install
}
package_libidn() {
groups=('libraries')
depends=('libintl')
mkdir -p ${pkgdir}/usr/bin
cp -f ${srcdir}/dest-${CHOST}/usr/bin/*.dll ${pkgdir}/usr/bin/
cp -rf ${srcdir}/dest-${CHOST}/usr/share ${pkgdir}/usr/
}
package_libidn-devel() {
pkgdesc="Libidn headers and libraries"
groups=('development')
depends=("libidn=${pkgver}")
mkdir -p ${pkgdir}/usr/bin
cp -f ${srcdir}/dest-${CHOST}/usr/bin/*.exe ${pkgdir}/usr/bin/
cp -rf ${srcdir}/dest-${CHOST}/usr/include ${pkgdir}/usr/
cp -rf ${srcdir}/dest-${CHOST}/usr/lib ${pkgdir}/usr/
}