From 61b6b9ae9c6058236bf522f5b13fea4ceb0dbb53 Mon Sep 17 00:00:00 2001 From: Juergen Buchmueller Date: Fri, 28 Oct 2016 21:00:43 +0200 Subject: [PATCH] jasper: fix sys/types.h issues with macros The types uchar, ushort, uint, ulong, longlong and ulonglong are always defined for glibc and musl libc through sys/types.h --- srcpkgs/jasper/patches/fix-utypes.patch | 52 +++++++++++++++++++++++++ srcpkgs/jasper/template | 7 +++- 2 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/jasper/patches/fix-utypes.patch diff --git a/srcpkgs/jasper/patches/fix-utypes.patch b/srcpkgs/jasper/patches/fix-utypes.patch new file mode 100644 index 00000000000..21c42b6530f --- /dev/null +++ b/srcpkgs/jasper/patches/fix-utypes.patch @@ -0,0 +1,52 @@ +Remove problematic (read: non-working) checks for several +types which are definitely defined in sys/types.h + +--- configure.ac 2016-10-23 13:00:07.000000000 +0200 ++++ configure.ac 2016-10-28 20:50:56.881735445 +0200 +@@ -274,12 +274,6 @@ + AC_C_CONST + AC_C_INLINE + AC_TYPE_SIZE_T +-AC_CHECK_TYPE(uchar, unsigned char) +-AC_CHECK_TYPE(ushort, unsigned short) +-AC_CHECK_TYPE(uint, unsigned int) +-AC_CHECK_TYPE(ulong, unsigned long) +-AC_CHECK_TYPE(longlong, long long) +-AC_CHECK_TYPE(ulonglong, unsigned long long) + AC_CHECK_TYPE(ssize_t, int) + AC_CHECK_FUNCS(gettimeofday) + AC_CHECK_FUNCS(getrusage) +--- src/libjasper/include/jasper/jas_config.h.in 2016-10-23 13:00:59.000000000 +0200 ++++ src/libjasper/include/jasper/jas_config.h.in 2016-10-28 20:56:18.232991601 +0200 +@@ -139,31 +139,6 @@ + #undef inline + #endif + +-/* Define to `long long' if does not define. */ +-#undef longlong +- +-/* Define to `unsigned int' if does not define. */ +-#undef size_t +- +-/* Define to `int' if does not define. */ +-#undef ssize_t +- +-/* Define to `unsigned char' if does not define. */ +-#undef uchar +- +-/* Define to `unsigned int' if does not define. */ +-#undef uint +- +-/* Define to `unsigned long' if does not define. */ +-#undef ulong +- +-/* Define to `unsigned long long' if does not define. */ +-#undef ulonglong +- +-/* Define to `unsigned short' if does not define. */ +-#undef ushort +- +- + #else + /* A configure-based build is not being used. */ + #include diff --git a/srcpkgs/jasper/template b/srcpkgs/jasper/template index b2f55d06a63..951c8565213 100644 --- a/srcpkgs/jasper/template +++ b/srcpkgs/jasper/template @@ -1,10 +1,10 @@ # Template build file for 'jasper'. pkgname=jasper version=1.900.13 -revision=1 +revision=2 build_style=gnu-configure configure_args="--enable-shared --disable-static --without-x --disable-opengl" -hostmakedepends="unzip" +hostmakedepends="automake libtool unzip" makedepends="libjpeg-turbo-devel" short_desc="Software-based reference implementation of the JPEG-2000 codec" maintainer="Juan RP " @@ -15,6 +15,9 @@ checksum=292837068c01d87d75642eb74dbc1c151cbcb576602892f42920ab878828be5a CFLAGS="-std=c99" +pre_configure() { + autoreconf -fi +} post_install() { vlicense LICENSE }