jbig2dec: Update to 0.20

This commit is contained in:
Christoph Reiter
2023-09-27 08:57:33 +02:00
parent 423dda4d15
commit 360bbf91ae
2 changed files with 34 additions and 6 deletions

View File

@@ -0,0 +1,24 @@
--- jbig2dec-0.20/getopt.h.orig 2023-09-27 09:07:07.056641700 +0200
+++ jbig2dec-0.20/getopt.h 2023-09-27 09:07:24.616292300 +0200
@@ -141,17 +141,17 @@
/* Many other libraries have conflicting prototypes for getopt, with
differences in the consts, in stdlib.h. To avoid compilation
errors, only prototype getopt for the GNU C library. */
-extern int getopt(int __argc, char *const *__argv, const char *__shortopts);
+extern int getopt(int argc, char *const *argv, const char *__shortopts);
# else /* not __GNU_LIBRARY__ */
extern int getopt();
# endif /* __GNU_LIBRARY__ */
# ifndef __need_getopt
-extern int getopt_long(int __argc, char *const *__argv, const char *__shortopts, const struct option *__longopts, int *__longind);
-extern int getopt_long_only(int __argc, char *const *__argv, const char *__shortopts, const struct option *__longopts, int *__longind);
+extern int getopt_long(int argc, char *const *argv, const char *__shortopts, const struct option *__longopts, int *__longind);
+extern int getopt_long_only(int argc, char *const *argv, const char *__shortopts, const struct option *__longopts, int *__longind);
/* Internal only. Users should not call this directly. */
-extern int _getopt_internal(int __argc, char *const *__argv, const char *__shortopts, const struct option *__longopts, int *__longind, int __long_only);
+extern int _getopt_internal(int argc, char *const *argv, const char *__shortopts, const struct option *__longopts, int *__longind, int __long_only);
# endif
#else /* not __STDC__ */
extern int getopt();

View File

@@ -3,26 +3,31 @@
_realname=jbig2dec
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=0.19
pkgver=0.20
pkgrel=1
pkgdesc='Decoder implementation of the JBIG2 image compression format (mingw-w64)'
url='https://jbig2dec.com/'
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
license=('AGPL')
license=('spdx:AGPL-3.0-or-later')
depends=("${MINGW_PACKAGE_PREFIX}-libpng")
makedepends=("${MINGW_PACKAGE_PREFIX}-autotools" "${MINGW_PACKAGE_PREFIX}-cc")
source=("${_realname}-${pkgver}.tar.gz"::https://github.com/ArtifexSoftware/jbig2dec/archive/${pkgver}.tar.gz
01-dont-run-configure-from-autogen.patch
02-mingw-no-inlines.patch)
sha256sums=('e81b787ad0b147a437a52d9ce7de1a8f429655e8aa030383b6b2dd8919373717'
02-mingw-no-inlines.patch
03-avoid-mingw-macro-name-conflict.patch)
sha256sums=('a9705369a6633aba532693450ec802c562397e1b824662de809ede92f67aff21'
'8715e0b3dfd738f9db57c656859897a41bc43d308ba86318ced625736784b54b'
'18731257e8bddcf76663c0734ba3711b2e5c7c13f0841b6833ec17f90aa23186')
'18731257e8bddcf76663c0734ba3711b2e5c7c13f0841b6833ec17f90aa23186'
'7e4090fe884384b6e1c4f2c35b6127661a0ebbd75f3e9830425fa425c8d475a0')
prepare() {
cd "${srcdir}/${_realname}-${pkgver}"
patch -p1 -i ${srcdir}/01-dont-run-configure-from-autogen.patch
patch -p1 -i ${srcdir}/02-mingw-no-inlines.patch
# mingw-w64 defines __argc and __argv as macros, which leads to wrong types there
patch -p1 -i ${srcdir}/03-avoid-mingw-macro-name-conflict.patch
./autogen.sh
}
@@ -30,7 +35,6 @@ build() {
cd "${srcdir}/${_realname}-${pkgver}"
[[ -d "${srcdir}"/build-${CARCH} ]] && rm -rf "${srcdir}"/build-${CARCH}
mkdir -p "${srcdir}"/build-${CARCH} && cd "${srcdir}"/build-${CARCH}
#cp -r ${_realname}-${pkgver} "${srcdir}"/build-${CARCH} && cd "${srcdir}"/build-${CARCH}
export lt_cv_deplibs_check_method='pass_all'
../${_realname}-${pkgver}/configure \