From ab68e905166ed1c900c09042c5586e3c110b4eae Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Mon, 12 Dec 2022 11:42:45 +0100 Subject: [PATCH] Port to C99 Related to: --- perl-Inline-Python-c99.patch | 18 ++++++++++++++++++ perl-Inline-Python.spec | 7 ++++++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 perl-Inline-Python-c99.patch diff --git a/perl-Inline-Python-c99.patch b/perl-Inline-Python-c99.patch new file mode 100644 index 0000000..5019872 --- /dev/null +++ b/perl-Inline-Python-c99.patch @@ -0,0 +1,18 @@ +Add missing declaration of initperl to avoid an implicit function +declaration in Python.xs. + +Submitted upstream: + +diff --git a/perlmodule.h b/perlmodule.h +index 1d336f4fe436a1d7..8ec36c324a703387 100644 +--- a/perlmodule.h ++++ b/perlmodule.h +@@ -76,6 +76,8 @@ extern PyObject * newPerlSub_object(PyObject *, PyObject *, SV *); + extern PyObject * newPerlMethod_object(PyObject*, PyObject*, SV*); + extern PyObject * newPerlCfun_object(PyObject* (*)(PyObject *, PyObject *)); + ++extern void initperl(void); ++ + #ifdef __cplusplus + } + #endif diff --git a/perl-Inline-Python.spec b/perl-Inline-Python.spec index eebea1a..222bb97 100644 --- a/perl-Inline-Python.spec +++ b/perl-Inline-Python.spec @@ -1,6 +1,6 @@ Name: perl-Inline-Python Version: 0.57 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Write Perl subs and classes in Python License: GPL+ or Artistic URL: https://metacpan.org/release/Inline-Python @@ -8,6 +8,7 @@ Source0: https://cpan.metacpan.org/authors/id/N/NI/NINE/Inline-Python-%{v # Fix makefile logic # https://github.com/niner/inline-python-pm/pull/38 Patch0: %{name}-makefile.patch +Patch1: perl-Inline-Python-c99.patch BuildRequires: gcc BuildRequires: findutils BuildRequires: make @@ -59,6 +60,7 @@ name-space is cached, and subsequent calls use the cached version. %prep %setup -q -n Inline-Python-%{version} %patch0 -p1 +%patch1 -p1 %build INLINE_PYTHON_EXECUTABLE=/usr/bin/python3 %{__perl} Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 @@ -81,6 +83,9 @@ make test %{_mandir}/man3/* %changelog +* Mon Dec 12 2022 Florian Weimer - 0.57-2 +- Port to C99 + * Mon Oct 17 2022 Mattias Ellert - 0.57-1 - 0.57 bump