From efdfc61e5d6ee9a39d546a7fb838123705eb11d4 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Aug 14 2023 09:51:52 +0000 Subject: Remove patches accepted by upstream --- diff --git a/0001-if_python3.c-Fix-building-dynamic-Python3-interprete.patch b/0001-if_python3.c-Fix-building-dynamic-Python3-interprete.patch deleted file mode 100644 index 6b06a3f..0000000 --- a/0001-if_python3.c-Fix-building-dynamic-Python3-interprete.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 939e0db21a5145d6a84eb8922ba3dc3a14fb4572 Mon Sep 17 00:00:00 2001 -From: Zdenek Dohnal -Date: Wed, 12 Jul 2023 13:13:38 +0200 -Subject: [PATCH] if_python3.c: Fix building dynamic Python3 interpreter - -There are new extern global variables defined in python3 development -files, which types are within python3 library, so they break dynamic -python3 interpret Vim plugin. - -Since the variables are used in macro `Py_SIZE` which is used in other -python3 headers, the dummy variables have to defined before including -Python.h. ---- - src/if_python3.c | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - -diff --git a/src/if_python3.c b/src/if_python3.c -index 240b88fac..f6704a31e 100644 ---- a/src/if_python3.c -+++ b/src/if_python3.c -@@ -68,6 +68,8 @@ - #endif - - #define PY_SSIZE_T_CLEAN -+#define PyLong_Type (*py3_PyLong_Type) -+#define PyBool_Type (*py3_PyBool_Type) - - #include - -@@ -270,7 +272,6 @@ static HINSTANCE hinstPy3 = 0; // Instance of python.dll - # define PyFloat_Type (*py3_PyFloat_Type) - # define PyNumber_Check (*py3_PyNumber_Check) - # define PyNumber_Long (*py3_PyNumber_Long) --# define PyBool_Type (*py3_PyBool_Type) - # define PyErr_NewException py3_PyErr_NewException - # ifdef Py_DEBUG - # define _Py_NegativeRefcount py3__Py_NegativeRefcount -@@ -448,7 +449,10 @@ static PyTypeObject* py3_PyType_Type; - static PyTypeObject* py3_PyStdPrinter_Type; - static PyTypeObject* py3_PySlice_Type; - static PyTypeObject* py3_PyFloat_Type; --static PyTypeObject* py3_PyBool_Type; -+PyTypeObject* py3_PyBool_Type; -+# if PY_VERSION_HEX >= 0x030c00b0 -+PyTypeObject* py3_PyLong_Type; -+# endif - static int (*py3_PyNumber_Check)(PyObject *); - static PyObject* (*py3_PyNumber_Long)(PyObject *); - static PyObject* (*py3_PyErr_NewException)(char *name, PyObject *base, PyObject *dict); -@@ -624,6 +628,9 @@ static struct - {"PySlice_Type", (PYTHON_PROC*)&py3_PySlice_Type}, - {"PyFloat_Type", (PYTHON_PROC*)&py3_PyFloat_Type}, - {"PyBool_Type", (PYTHON_PROC*)&py3_PyBool_Type}, -+# if PY_VERSION_HEX >= 0x030c00b0 -+ {"PyLong_Type", (PYTHON_PROC*)&py3_PyLong_Type}, -+# endif - {"PyNumber_Check", (PYTHON_PROC*)&py3_PyNumber_Check}, - {"PyNumber_Long", (PYTHON_PROC*)&py3_PyNumber_Long}, - {"PyErr_NewException", (PYTHON_PROC*)&py3_PyErr_NewException}, --- -2.41.0 - diff --git a/perl538.patch b/perl538.patch deleted file mode 100644 index ea93574..0000000 --- a/perl538.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff --git a/src/if_perl.xs b/src/if_perl.xs -index c69ed9ef1..2cf78b901 100644 ---- a/src/if_perl.xs -+++ b/src/if_perl.xs -@@ -40,7 +40,7 @@ - /* Work around for perl-5.18. - * Don't include "perl\lib\CORE\inline.h" for now, - * include it after Perl_sv_free2 is defined. */ --#ifdef DYNAMIC_PERL -+#if (PERL_REVISION == 5) && (PERL_VERSION >= 18) - # define PERL_NO_INLINE_FUNCTIONS - #endif - -@@ -402,14 +402,14 @@ static bool (*Perl_sv_2bool)(pTHX_ SV*); - static IV (*Perl_sv_2iv)(pTHX_ SV*); - static SV* (*Perl_sv_2mortal)(pTHX_ SV*); - # if (PERL_REVISION == 5) && (PERL_VERSION >= 8) --static char* (*Perl_sv_2pv_flags)(pTHX_ SV*, STRLEN*, I32); -+static char* (*Perl_sv_2pv_flags)(pTHX_ SV*, STRLEN* const, const U32); - static char* (*Perl_sv_2pv_nolen)(pTHX_ SV*); - # else - static char* (*Perl_sv_2pv)(pTHX_ SV*, STRLEN*); - # endif - static char* (*Perl_sv_2pvbyte)(pTHX_ SV*, STRLEN*); - # if (PERL_REVISION == 5) && (PERL_VERSION >= 32) --static char* (*Perl_sv_2pvbyte_flags)(pTHX_ SV*, STRLEN*, I32); -+static char* (*Perl_sv_2pvbyte_flags)(pTHX_ SV*, STRLEN* const, const U32); - # endif - static SV* (*Perl_sv_bless)(pTHX_ SV*, HV*); - # if (PERL_REVISION == 5) && (PERL_VERSION >= 8) -@@ -710,7 +710,7 @@ S_POPMARK(pTHX) - # endif - - /* perl-5.34 needs Perl_SvTRUE_common; used in SvTRUE_nomg_NN */ --# if (PERL_REVISION == 5) && (PERL_VERSION >= 34) -+# if (PERL_REVISION == 5) && (PERL_VERSION == 34) - PERL_STATIC_INLINE bool - Perl_SvTRUE_common(pTHX_ SV * sv, const bool sv_2bool_is_fallback) - { -@@ -737,7 +737,7 @@ Perl_SvTRUE_common(pTHX_ SV * sv, const bool sv_2bool_is_fallback) - # endif - - /* perl-5.32 needs Perl_SvTRUE */ --# if (PERL_REVISION == 5) && (PERL_VERSION >= 32) -+# if (PERL_REVISION == 5) && (PERL_VERSION == 32) - PERL_STATIC_INLINE bool - Perl_SvTRUE(pTHX_ SV *sv) { - if (!LIKELY(sv)) diff --git a/vim-pysyntaxwarn.patch b/vim-pysyntaxwarn.patch deleted file mode 100644 index 514a787..0000000 --- a/vim-pysyntaxwarn.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/src/testdir/test_python3.vim b/src/testdir/test_python3.vim -index b7140ee..e975cb6 100644 ---- a/src/testdir/test_python3.vim -+++ b/src/testdir/test_python3.vim -@@ -22,10 +22,10 @@ func Test_AAA_python3_setup() - import sys - import re - -- py33_type_error_pattern = re.compile('^__call__\(\) takes (\d+) positional argument but (\d+) were given$') -+ py33_type_error_pattern = re.compile(r'^__call__\(\) takes (\d+) positional argument but (\d+) were given$') - py37_exception_repr = re.compile(r'([^\(\),])(\)+)$') -- py39_type_error_pattern = re.compile('\w+\.([^(]+\(\) takes)') -- py310_type_error_pattern = re.compile('takes (\d+) positional argument but (\d+) were given') -+ py39_type_error_pattern = re.compile(r'\w+\.([^(]+\(\) takes)') -+ py310_type_error_pattern = re.compile(r'takes (\d+) positional argument but (\d+) were given') - - def emsg(ei): - return ei[0].__name__ + ':' + repr(ei[1].args) diff --git a/vim.spec b/vim.spec index 42e551f..d636b65 100644 --- a/vim.spec +++ b/vim.spec @@ -98,13 +98,6 @@ Patch3003: vim-python3-tests.patch Patch3004: vim-crypto-warning.patch # don't ever set mouse (Fedora downstream patch) Patch3005: vim-8.0-copy-paste.patch -# https://github.com/vim/vim/pull/12660 -Patch3006: 0001-if_python3.c-Fix-building-dynamic-Python3-interprete.patch -# https://github.com/vim/vim/pull/12575 + https://github.com/vim/vim/pull/12575#issuecomment-1634226250 -Patch3007: perl538.patch -# fix python syntax warnings which make test suite fail -# reported upstream https://github.com/vim/vim/pull/12765 -Patch3008: vim-pysyntaxwarn.patch # uses autoconf in spec file @@ -415,9 +408,6 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk %patch -P 3003 -p1 -b .python-tests %patch -P 3004 -p1 -b .fips-warning %patch -P 3005 -p1 -b .copypaste -%patch -P 3006 -p1 -b .python312 -%patch -P 3007 -p1 -b .perl538 -%patch -P 3008 -p1 -b .pysyntaxwarn %build cd src