From ea6863cd87fe01392aff73f95e5baddec16dd1ce Mon Sep 17 00:00:00 2001 From: Mehdi Chinoune Date: Sun, 31 Jul 2022 05:28:11 +0000 Subject: [PATCH] python-winkerberos: update to 0.9.0 --- .../0001-fix-mingw-build.patch | 64 ------------------- mingw-w64-python-winkerberos/PKGBUILD | 20 ++---- 2 files changed, 4 insertions(+), 80 deletions(-) delete mode 100644 mingw-w64-python-winkerberos/0001-fix-mingw-build.patch diff --git a/mingw-w64-python-winkerberos/0001-fix-mingw-build.patch b/mingw-w64-python-winkerberos/0001-fix-mingw-build.patch deleted file mode 100644 index e7690d15ee..0000000000 --- a/mingw-w64-python-winkerberos/0001-fix-mingw-build.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 536113b7f45f9caeefa3a65ca669e16e6101c4d3 Mon Sep 17 00:00:00 2001 -From: Biswapriyo Nath -Date: Sun, 6 Feb 2022 08:35:44 +0530 -Subject: [PATCH 1/3] setup: Fix build in mingw - -MINGW_CHOST is specific to msys2 build and packaging environment. -Instead, check sys.version which is available in any python env. -Also remove SecPkgContext_Bindings definition which has been added -in mingw-w64 headers. ---- - setup.py | 17 +++++++---------- - src/kerberos_sspi.h | 7 ------- - 2 files changed, 7 insertions(+), 17 deletions(-) - -diff --git a/setup.py b/setup.py -index a595c4b..e912bf9 100644 ---- a/setup.py -+++ b/setup.py -@@ -89,20 +89,17 @@ def run(self): - - tests_require = ["pymongo >= 2.9"] - --chost = os.environ.get("MINGW_CHOST") #ie: i686-w64-mingw32 --if chost: -- #mingw build -- libpath = os.environ.get("MINGW_PREFIX", "/mingw32")+"/"+chost+"/lib" -- extra_link_args = ["-lssl", "-lcrypto", "-fPIC", -- "%s/libcrypt32.a" % libpath, -- "%s/libsecur32.a" % libpath, -- "%s/libshlwapi.a" % libpath, -- ] --else: -+if 'MSC' in sys.version: - #msvc: - extra_link_args = ['crypt32.lib', 'secur32.lib', 'Shlwapi.lib', - '/NXCOMPAT', '/DYNAMICBASE', - ] -+else: -+ #mingw: -+ extra_link_args = ['-lcrypt32', -+ '-lsecur32', -+ '-lshlwapi'] -+ - setup( - name="winkerberos", - version="0.8.0", -diff --git a/src/kerberos_sspi.h b/src/kerberos_sspi.h -index ab89f50..96d94ec 100644 ---- a/src/kerberos_sspi.h -+++ b/src/kerberos_sspi.h -@@ -21,13 +21,6 @@ - #include - #include - --#ifdef __MINGW32__ --typedef struct _SecPkgContext_Bindings { -- unsigned long BindingsLength; -- SEC_CHANNEL_BINDINGS *Bindings; --} SecPkgContext_Bindings, *PSecPkgContext_Bindings; --#endif -- - #define AUTH_GSS_ERROR -1 - #define AUTH_GSS_COMPLETE 1 - #define AUTH_GSS_CONTINUE 0 diff --git a/mingw-w64-python-winkerberos/PKGBUILD b/mingw-w64-python-winkerberos/PKGBUILD index 92edba1f8f..96a0b3345b 100644 --- a/mingw-w64-python-winkerberos/PKGBUILD +++ b/mingw-w64-python-winkerberos/PKGBUILD @@ -6,8 +6,8 @@ pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}") provides=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") replaces=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") -pkgver=0.8.0 -pkgrel=2 +pkgver=0.9.0 +pkgrel=1 pkgdesc="High level interface to SSPI for Kerberos client auth (mingw-w64)" arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64') @@ -19,10 +19,8 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-python-sphinx" "${MINGW_PACKAGE_PREFIX}-cc") #checkdepends=("${MINGW_PACKAGE_PREFIX}-python-pymongo") options=('staticlibs' 'strip' '!debug') -source=("https://files.pythonhosted.org/packages/source/${_realname:0:1}/${_realname}/${_realname}-${pkgver}.zip" - 0001-fix-mingw-build.patch) -sha256sums=('2af9776b27dfdfe0bfdce1960c81078302588067112c32c663dc3a01412e04da' - '0aee80625a2a2ab58062dfd17960c12db12518fc85c5b4001442ed4dd4bad9a6') +source=("https://files.pythonhosted.org/packages/source/${_realname:0:1}/${_realname}/${_realname}-${pkgver}.zip") +sha256sums=('be14d27ce7a3b29775dd1018b0ae06f29a4025070839ffb1465ab120e287c479') # Helper macros to help make tasks easier # apply_patch_with_msg() { @@ -33,16 +31,6 @@ apply_patch_with_msg() { done } -prepare() { - cd "${srcdir}/${_realname}-${pkgver}" - - # https://github.com/mongodb/winkerberos/pull/44 - apply_patch_with_msg 0001-fix-mingw-build.patch - - # Set version for setuptools_scm - export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver -} - build() { cd "${srcdir}/${_realname}-${pkgver}" ${MINGW_PREFIX}/bin/python setup.py build