From 59f2ce2f08b3b7c00a88925a0a45251b1bc1a896 Mon Sep 17 00:00:00 2001 From: Mehdi Chinoune Date: Thu, 22 Sep 2022 17:22:46 +0000 Subject: [PATCH] python-reportlab: update to 3.6.11 --- ...case-quote-LIBART_VERSION-on-Windows.patch | 14 -------- .../001-fix-finding-freetype.patch | 20 +++++++++++ mingw-w64-python-reportlab/PKGBUILD | 35 +++++++++---------- 3 files changed, 36 insertions(+), 33 deletions(-) delete mode 100644 mingw-w64-python-reportlab/0001-Do-not-specialcase-quote-LIBART_VERSION-on-Windows.patch create mode 100644 mingw-w64-python-reportlab/001-fix-finding-freetype.patch diff --git a/mingw-w64-python-reportlab/0001-Do-not-specialcase-quote-LIBART_VERSION-on-Windows.patch b/mingw-w64-python-reportlab/0001-Do-not-specialcase-quote-LIBART_VERSION-on-Windows.patch deleted file mode 100644 index 65b7529d1c..0000000000 --- a/mingw-w64-python-reportlab/0001-Do-not-specialcase-quote-LIBART_VERSION-on-Windows.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -urN reportlab-3.4.0.orig/setup.py reportlab-3.4.0/setup.py ---- reportlab-3.4.0.orig/setup.py 2017-06-21 05:59:58.000000000 -0500 -+++ reportlab-3.4.0/setup.py 2017-06-21 06:00:17.000000000 -0500 -@@ -404,7 +404,7 @@ - if len(l)>1 and l[0].strip() in K: - D[l[0].strip()] = l[1].strip() - if len(D)==3: break -- return (sys.platform == 'win32' and '\\"%s\\"' or '"%s"') % '.'.join(map(lambda k,D=D: D.get(k,'?'),K)) -+ return (sys.platform == 'win32' and '"%s"' or '"%s"') % '.'.join(map(lambda k,D=D: D.get(k,'?'),K)) - LIBART_VERSION = libart_version() - infoline('will use package libart %s' % LIBART_VERSION.replace('"','')) - -('"','')) - diff --git a/mingw-w64-python-reportlab/001-fix-finding-freetype.patch b/mingw-w64-python-reportlab/001-fix-finding-freetype.patch new file mode 100644 index 0000000000..179108c969 --- /dev/null +++ b/mingw-w64-python-reportlab/001-fix-finding-freetype.patch @@ -0,0 +1,20 @@ +--- a/setup.py ++++ b/setup.py +@@ -287,7 +287,7 @@ + aDir(L, "/usr/lib/x86_64-linux-gnu") + else: + aDir(L, "/usr/lib/lib32") +- prefix = sysconfig.get_config_var("prefix") ++ prefix = sysconfig.get_config_var("installed_base") + if prefix: + aDir(L, pjoin(prefix, "lib")) + aDir(I, pjoin(prefix, "include")) +@@ -739,7 +739,7 @@ + pjoin(GT1_DIR,'gt1-region.c'), + ]+LIBART_SOURCES + +- if platform=='win32': ++ if platform=='win32' and 'MSC' in sys.version: + target = ensureResourceStuff() + FT_LIB = pjoin(target,'libs','amd64' if addrSize==64 else 'x86','freetype.lib') + if not isfile(FT_LIB): diff --git a/mingw-w64-python-reportlab/PKGBUILD b/mingw-w64-python-reportlab/PKGBUILD index 837f1ab3a6..a68132af5c 100644 --- a/mingw-w64-python-reportlab/PKGBUILD +++ b/mingw-w64-python-reportlab/PKGBUILD @@ -4,8 +4,8 @@ _realname=reportlab pkgbase=mingw-w64-python-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}") -pkgver=3.5.42 -pkgrel=3 +pkgver=3.6.11 +pkgrel=1 provides=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}=${pkgver}") conflicts=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") replaces=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") @@ -15,41 +15,38 @@ mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32') license=('custom') url="https://bitbucket.org/rptlab/reportlab" depends=("${MINGW_PACKAGE_PREFIX}-freetype" - "${MINGW_PACKAGE_PREFIX}-python-pip" + "${MINGW_PACKAGE_PREFIX}-python" "${MINGW_PACKAGE_PREFIX}-python-pillow") makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools" "${MINGW_PACKAGE_PREFIX}-cc") source=(https://files.pythonhosted.org/packages/source/${_realname::1}/${_realname}/${_realname}-${pkgver}.tar.gz - "0001-Do-not-specialcase-quote-LIBART_VERSION-on-Windows.patch") -sha256sums=('9c21f202697a6cea57b9d716288fc919d99cbabeb30222eebfc7ff77eac32744' - '084b3574f7cb83dc7c9412b9976d672fda0f5f20cef6c6f6b66a6cefc31220ef') + 001-fix-finding-freetype.patch) +sha256sums=('04fc4420f0548815d0623e031c86a1f7f3f3003e699d9af7148742e2d72b024a' + 'b2415159c2fc21af71d27a214a2cbe3e72450063af46cacfc59deff6e2a09e5d') prepare() { - pushd ${_realname}-${pkgver} - patch -p1 < ${srcdir}/0001-Do-not-specialcase-quote-LIBART_VERSION-on-Windows.patch - popd + cd ${_realname}-${pkgver} + patch -p1 -i "${srcdir}"/001-fix-finding-freetype.patch - rm -rf python-build-${CARCH} | true - cp -r "${_realname}-${pkgver}" "python-build-${CARCH}" + cd "${srcdir}" + rm -rf python-build-${MSYSTEM} | true + cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}" } build() { - export FT_LIB=${MINGW_PREFIX}/lib/libfreetype.a - export FT_INC=${MINGW_PREFIX}/include/freetype2 - - msg "Python build for ${CARCH}" - cd "${srcdir}/python-build-${CARCH}" + msg "Python build for ${MSYSTEM}" + cd "${srcdir}/python-build-${MSYSTEM}" ${MINGW_PREFIX}/bin/python setup.py build } check() { - msg "Python test for ${CARCH}" - # cd "${srcdir}/python-build-${CARCH}" + msg "Python test for ${MSYSTEM}" + # cd "${srcdir}/python-build-${MSYSTEM}" # ${MINGW_PREFIX}/bin/python setup.py tests } package() { - cd "${srcdir}/python-build-${CARCH}" + cd "${srcdir}/python-build-${MSYSTEM}" MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python setup.py install --prefix=${MINGW_PREFIX#\/} --root="${pkgdir}" --optimize=1 --skip-build