diff options
author | Erich Eckner <git@eckner.net> | 2023-01-15 20:48:57 +0100 |
---|---|---|
committer | Erich Eckner <erich.eckner.ext@bestsecret.com> | 2023-01-18 10:15:05 +0100 |
commit | a7ef143368e91000c88b50c632e330888008da89 (patch) | |
tree | a79863cf46dc525a6968eb91752f0118beab8b3d | |
parent | b9fb8d546b9b8805faec0175341c0ac9158e309f (diff) | |
download | archlinuxewe-a7ef143368e91000c88b50c632e330888008da89.tar.xz |
sip4 new
-rw-r--r-- | sip4/PKGBUILD | 54 | ||||
-rw-r--r-- | sip4/patch | 133 |
2 files changed, 187 insertions, 0 deletions
diff --git a/sip4/PKGBUILD b/sip4/PKGBUILD new file mode 100644 index 000000000..4c8f1f622 --- /dev/null +++ b/sip4/PKGBUILD @@ -0,0 +1,54 @@ +# Maintainer: Erich Eckner <arch at eckner dot net> +# Contributor: Antonio Rojas <arojas@archlinux.org> +# Contributor: Felix Yan <felixonmars@archlinux.org> +# Contributor: Andrea Scarpino <andrea@archlinux.org> +# Contributor: Douglas Soares de Andrade <douglas@archlinux.org> +# Contributor: riai <riai@bigfoot.com>, Ben <ben@benmazer.net> + +pkgbase=sip4 +pkgname=(sip4 python-sip4) +pkgver=4.19.25 +pkgrel=3 +arch=(x86_64) +url='https://www.riverbankcomputing.com/software/sip/intro' +license=('custom:"sip"') +makedepends=(python) +source=("https://www.riverbankcomputing.com/static/Downloads/sip/$pkgver/sip-$pkgver.tar.gz") +sha256sums=('b39d93e937647807bac23579edbff25fe46d16213f708370072574ab1f1b4211') + +prepare() { + mkdir -p build +} + +build() { + cd build + python ../sip-$pkgver/configure.py CFLAGS="$CFLAGS" LFLAGS="$LDFLAGS" + make +} + +package_sip4() { + pkgdesc="A tool that makes it easy to create Python bindings for C and C++ libraries" + depends=(glibc) + replaces=('sip<5') + + cd build + make DESTDIR="$pkgdir" install -C sipgen +# move sip.h to /usr/include + mv "$pkgdir"/usr/include/{python*/sip.h,} + rm -r "$pkgdir"/usr/include/python* + + install -Dm644 ../sip-$pkgver/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE +} + +package_python-sip4() { + pkgdesc="Python SIP4 bindings for C and C++ libraries" + depends=(python) + provides=(python-sip) + replaces=(python-sip) + + cd build + make DESTDIR="$pkgdir" install + rm -r "$pkgdir"/usr/{bin,include} # conflicts with sip + + install -Dm644 ../sip-$pkgver/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE +} diff --git a/sip4/patch b/sip4/patch new file mode 100644 index 000000000..abe2055c6 --- /dev/null +++ b/sip4/patch @@ -0,0 +1,133 @@ +diff -r c0426a6b39a0 sipgen/metasrc/lexer.l +--- a/sipgen/metasrc/lexer.l Fri Feb 26 15:26:24 2021 +0000 ++++ b/sipgen/metasrc/lexer.l Mon Dec 06 12:26:46 2021 +0100 +@@ -179,6 +179,7 @@ + <directive>call_super_init {return TK_CALLSUPERINIT;} + <directive>default_VirtualErrorHandler {return TK_DEFERRORHANDLER;} + <directive>version {return TK_VERSION;} ++<directive>py_ssize_t_clean {return;} + + <directive>True {return TK_TRUE_VALUE;} + <directive>False {return TK_FALSE_VALUE;} +diff -r c0426a6b39a0 sipgen/metasrc/parser.y +--- a/sipgen/metasrc/parser.y Fri Feb 26 15:26:24 2021 +0000 ++++ b/sipgen/metasrc/parser.y Mon Dec 06 12:26:46 2021 +0100 +@@ -1908,7 +1908,7 @@ + if (notSkipping()) + currentModule = configureModule(currentSpec, currentModule, + currentContext.filename, $2.name, $2.c_module, +- $2.kwargs, $2.use_arg_names, $2.use_limited_api, ++ $2.kwargs, $2.use_arg_names, $2.use_limited_api, $2.py_ssize_t_clean, + $2.call_super_init, $2.all_raise_py_exc, + $2.def_error_handler, $3.docstring); + } +@@ -1930,6 +1930,7 @@ + $$.kwargs = defaultKwArgs; + $$.name = $1; + $$.use_arg_names = FALSE; ++ $$.py_ssize_t_clean = FALSE; + $$.use_limited_api = FALSE; + $$.all_raise_py_exc = FALSE; + $$.call_super_init = -1; +@@ -1950,6 +1951,7 @@ + case TK_LANGUAGE: $$.c_module = $3.c_module; break; + case TK_NAME: $$.name = $3.name; break; + case TK_USEARGNAMES: $$.use_arg_names = $3.use_arg_names; break; ++ case TK_PYSSIZETCLEAN: $$.py_ssize_t_clean = $3.py_ssize_t_clean; break; + case TK_USELIMITEDAPI: $$.use_limited_api = $3.use_limited_api; break; + case TK_ALLRAISEPYEXC: $$.all_raise_py_exc = $3.all_raise_py_exc; break; + case TK_CALLSUPERINIT: $$.call_super_init = $3.call_super_init; break; +@@ -1965,7 +1967,9 @@ + $$.kwargs = convertKwArgs($3); + $$.name = NULL; + $$.use_arg_names = FALSE; ++ $$.py_ssize_t_clean = FALSE; + $$.use_limited_api = FALSE; ++ $$.py_ssize_t_clean = FALSE; + $$.all_raise_py_exc = FALSE; + $$.call_super_init = -1; + $$.def_error_handler = NULL; +@@ -1983,6 +1987,7 @@ + $$.kwargs = defaultKwArgs; + $$.name = NULL; + $$.use_arg_names = FALSE; ++ $$.py_ssize_t_clean = FALSE; + $$.use_limited_api = FALSE; + $$.all_raise_py_exc = FALSE; + $$.call_super_init = -1; +@@ -1995,6 +2000,7 @@ + $$.kwargs = defaultKwArgs; + $$.name = $3; + $$.use_arg_names = FALSE; ++ $$.py_ssize_t_clean = FALSE; + $$.use_limited_api = FALSE; + $$.all_raise_py_exc = FALSE; + $$.call_super_init = -1; +@@ -2007,6 +2013,7 @@ + $$.kwargs = defaultKwArgs; + $$.name = NULL; + $$.use_arg_names = $3; ++ $$.py_ssize_t_clean = FALSE; + $$.use_limited_api = FALSE; + $$.all_raise_py_exc = FALSE; + $$.call_super_init = -1; +@@ -2019,6 +2026,7 @@ + $$.kwargs = defaultKwArgs; + $$.name = NULL; + $$.use_arg_names = FALSE; ++ $$.py_ssize_t_clean = FALSE; + $$.use_limited_api = $3; + $$.all_raise_py_exc = FALSE; + $$.call_super_init = -1; +@@ -2031,6 +2039,7 @@ + $$.kwargs = defaultKwArgs; + $$.name = NULL; + $$.use_arg_names = FALSE; ++ $$.py_ssize_t_clean = FALSE; + $$.use_limited_api = FALSE; + $$.all_raise_py_exc = $3; + $$.call_super_init = -1; +@@ -2043,6 +2052,7 @@ + $$.kwargs = defaultKwArgs; + $$.name = NULL; + $$.use_arg_names = FALSE; ++ $$.py_ssize_t_clean = FALSE; + $$.use_limited_api = FALSE; + $$.all_raise_py_exc = FALSE; + $$.call_super_init = $3; +@@ -2055,6 +2065,7 @@ + $$.kwargs = defaultKwArgs; + $$.name = NULL; + $$.use_arg_names = FALSE; ++ $$.py_ssize_t_clean = FALSE; + $$.use_limited_api = FALSE; + $$.all_raise_py_exc = FALSE; + $$.call_super_init = -1; +@@ -2072,6 +2083,7 @@ + $$.kwargs = defaultKwArgs; + $$.name = NULL; + $$.use_arg_names = FALSE; ++ $$.py_ssize_t_clean = FALSE; + $$.use_limited_api = FALSE; + $$.all_raise_py_exc = FALSE; + $$.call_super_init = -1; +@@ -9513,7 +9525,7 @@ + */ + static moduleDef *configureModule(sipSpec *pt, moduleDef *module, + const char *filename, const char *name, int c_module, KwArgs kwargs, +- int use_arg_names, int use_limited_api, int call_super_init, ++ int use_arg_names, int py_ssize_t_clean, int use_limited_api, int call_super_init, + int all_raise_py_exc, const char *def_error_handler, + docstringDef *docstring) + { +diff -r c0426a6b39a0 sipgen/sip.h.in +--- a/sipgen/sip.h Fri Feb 26 15:26:24 2021 +0000 ++++ b/sipgen/sip.h Mon Dec 06 12:26:46 2021 +0100 +@@ -1631,6 +1631,7 @@ + const char *name; + int use_arg_names; + int use_limited_api; ++ int py_ssize_t_clean; + int all_raise_py_exc; + int call_super_init; + const char *def_error_handler; |