From 6d96e1c5361114f604cdb891ed1745862b545cc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Sat, 18 Jul 2020 10:36:35 +0700 Subject: [PATCH] gmime3: update to 3.2.7. --- srcpkgs/gmime3/files/iconv-detect.h | 1 + srcpkgs/gmime3/files/musl-iconv-detect.h | 6 ++++ srcpkgs/gmime3/template | 43 +++++++++++++++++------- 3 files changed, 37 insertions(+), 13 deletions(-) create mode 100644 srcpkgs/gmime3/files/musl-iconv-detect.h diff --git a/srcpkgs/gmime3/files/iconv-detect.h b/srcpkgs/gmime3/files/iconv-detect.h index 714cb5aa9d..6d9dd05b59 100644 --- a/srcpkgs/gmime3/files/iconv-detect.h +++ b/srcpkgs/gmime3/files/iconv-detect.h @@ -2,4 +2,5 @@ #define ICONV_ISO_INT_FORMAT "iso-%u-%u" #define ICONV_ISO_STR_FORMAT "iso-%u-%s" +#define ICONV_SHIFT_JIS "shift-jis" #define ICONV_10646 "iso-10646" diff --git a/srcpkgs/gmime3/files/musl-iconv-detect.h b/srcpkgs/gmime3/files/musl-iconv-detect.h new file mode 100644 index 0000000000..569da106b9 --- /dev/null +++ b/srcpkgs/gmime3/files/musl-iconv-detect.h @@ -0,0 +1,6 @@ +/* This is an auto-generated header, DO NOT EDIT! */ + +#define ICONV_ISO_INT_FORMAT "iso-%u-%u" +#define ICONV_ISO_STR_FORMAT "iso-%u-%s" +#define ICONV_SHIFT_JIS "shift-jis" +#define ICONV_10646 "UCS-4BE" diff --git a/srcpkgs/gmime3/template b/srcpkgs/gmime3/template index a6a34d2306..43e04197d5 100644 --- a/srcpkgs/gmime3/template +++ b/srcpkgs/gmime3/template @@ -1,6 +1,6 @@ # Template file for 'gmime3' pkgname=gmime3 -version=3.2.4 +version=3.2.7 revision=1 wrksrc="gmime-${version}" build_style=gnu-configure @@ -16,22 +16,39 @@ maintainer="Enno Boland " license="LGPL-2.1-or-later" homepage="https://github.com/jstedfast/gmime" distfiles="${GNOME_SITE}/gmime/${version%.*}/gmime-${version}.tar.xz" -checksum=249ea7c0e080b067aa9669162c36b181b402f6cf6cebc4999d838c6f1e81d024 +checksum=2aea96647a468ba2160a64e17c6dc6afe674ed9ac86070624a3f584c10737d44 -# Package build options build_options="gir vala" build_options_default="gir vala" -case "$XBPS_TARGET_MACHINE" in - i686|x86_64|armv?l*|aarch64*|ppc|ppc-musl) - configure_args+=" am_cv_func_iconv=yes am_cv_func_iconv_works=yes" - configure_args+=" am_cv_lib_iconv=no ac_cv_have_iconv_detect_h=yes" - configure_args+=" am_cv_proto_iconv_arg1=" - pre_build() { - cp ${FILESDIR}/*.h ${wrksrc} - } - ;; -esac +pre_configure() { + [ -z "$CROSS_BUILD" ] && return 0 + + configure_args+=" ac_cv_have_iconv_detect_h=yes" + + if [ "$XBPS_TARGET_LIBC" = musl ]; then + cp ${FILESDIR}/musl-iconv-detect.h ${wrksrc}/iconv-detect.h + else + cp ${FILESDIR}/iconv-detect.h ${wrksrc}/iconv-detect.h + fi +} + +do_check() { + if [ "$XBPS_TARGET_LIBC" = musl ]; then + make check VERBOSITY=-vv | + awk ' + 1 + # utf-8 to iso-2022-jp is stateless + /GMimeFilterCharset.*utf-8.*iso-2022-jp/ { next } + # euc-kr has not been supported + /euc-kr to UTF-8/ { next } + $NF == "FAILED" { e = 1 } + END { exit e } + ' + else + make check + fi +} gmime3-devel_package() { depends="libglib-devel zlib-devel ${sourcepkg}>=${version}_${revision}"