# Detect the distribution in use %global __despace head -n 1 | tr -d '[:space:]' | sed -e 's/[(].*[)]//g' %global __lower4 cut -c 1-4 | tr '[:upper:]' '[:lower:]' %global __distfile %([ -f /etc/SuSE-release ] && echo /etc/SuSE-release || echo /etc/redhat-release) %global __distinit %(sed -e 's/ release .*//' -e 's/\\([A-Za-z]\\)[^ ]*/\\1/g' %{__distfile} | %{__despace} | %{__lower4}) %global __distvers %(sed -e 's/.* release \\([^. ]*\\).*/\\1/' %{__distfile} | %{__despace}) # Identify Alma, CentOS, CentOS Stream and Rocky Linux as rhel %if "%{__distinit}" == "a" || "%{__distinit}" == "c" || "%{__distinit}" == "cl" || "%{__distinit}" == "cs" || "%{__distinit}" == "rl" %global __distinit rhel %endif # Dist tag for Fedora is still "fc" %if "%{__distinit}" == "f" %global __distinit fc %endif %global base_version 3.51 Name: perl-ExtUtils-ParseXS Epoch: 1 Version: 3.51 Release: 510.%{__distinit}%{__distvers} Summary: Module and a script for converting Perl XS code into C code License: GPL-1.0-or-later OR Artistic-1.0-Perl URL: https://metacpan.org/release/ExtUtils-ParseXS Source0: https://cpan.metacpan.org/modules/by-module/ExtUtils/ExtUtils-ParseXS-%{base_version}.tar.gz Patch0: ExtUtils-ParseXS-3.51-Add-perlxs-man-pages.patch BuildArch: noarch # Module Build BuildRequires: coreutils BuildRequires: findutils BuildRequires: make BuildRequires: perl-generators BuildRequires: perl-interpreter BuildRequires: perl(ExtUtils::MakeMaker) >= 6.46 # Module Runtime BuildRequires: perl(Config) BuildRequires: perl(Cwd) BuildRequires: perl(Exporter) >= 5.57 BuildRequires: perl(File::Basename) BuildRequires: perl(File::Spec) BuildRequires: perl(Getopt::Long) BuildRequires: perl(re) BuildRequires: perl(strict) BuildRequires: perl(Symbol) BuildRequires: perl(warnings) # Test Suite BuildRequires: perl-devel BuildRequires: perl(attributes) BuildRequires: perl(Carp) BuildRequires: perl(DynaLoader) BuildRequires: perl(ExtUtils::CBuilder) BuildRequires: perl(File::Temp) BuildRequires: perl(lib) BuildRequires: perl(overload) BuildRequires: perl(Test::More) # Dependencies %if 0%{?fedora} < 38 && 0%{?rhel} < 10 Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) %endif %description ExtUtils::ParseXS will compile XS code into C code by embedding the constructs necessary to let C functions manipulate Perl values and creates the glue necessary to let Perl access those functions. %prep %setup -q -n ExtUtils-ParseXS-%{base_version} # Add man page perlxs*, which are missing in tarball %patch -P 0 -p1 # Fix perl interpreter in xsubpp sed -i -e '1s|^#!perl|#!/usr/bin/perl|' lib/ExtUtils/xsubpp chmod -c +x lib/ExtUtils/xsubpp %build perl Makefile.PL INSTALLDIRS=vendor make %{?_smp_mflags} %install make pure_install DESTDIR=%{buildroot} find %{buildroot} -type f -name .packlist -delete %{_fixperms} -c %{buildroot} %check make test %files %doc Changes %{_bindir}/xsubpp %doc %{perl_vendorlib}/ExtUtils/ParseXS.pod %doc %{perl_vendorlib}/perlxs.pod %doc %{perl_vendorlib}/perlxstut.pod %doc %{perl_vendorlib}/perlxstypemap.pod %dir %{perl_vendorlib}/ExtUtils/ %{perl_vendorlib}/ExtUtils/xsubpp %{perl_vendorlib}/ExtUtils/ParseXS.pm %{perl_vendorlib}/ExtUtils/ParseXS/ %{perl_vendorlib}/ExtUtils/Typemaps.pm %{perl_vendorlib}/ExtUtils/Typemaps/ %{_mandir}/man1/xsubpp.1* %{_mandir}/man3/ExtUtils::ParseXS.3* %{_mandir}/man3/ExtUtils::ParseXS::Constants.3* %{_mandir}/man3/ExtUtils::ParseXS::Eval.3* %{_mandir}/man3/ExtUtils::ParseXS::Utilities.3* %{_mandir}/man3/ExtUtils::Typemaps.3* %{_mandir}/man3/ExtUtils::Typemaps::Cmd.3* %{_mandir}/man3/ExtUtils::Typemaps::InputMap.3* %{_mandir}/man3/ExtUtils::Typemaps::OutputMap.3* %{_mandir}/man3/ExtUtils::Typemaps::Type.3* %{_mandir}/man3/perlxs.3* %{_mandir}/man3/perlxstut.3* %{_mandir}/man3/perlxstypemap.3* %changelog * Wed Jun 12 2024 Paul Howarth - 1:3.51-510 - Add man page perlxs*, which are missing in tarball * Mon Sep 4 2023 Paul Howarth - 1:3.51-500 - Use upstream 3.51 release Changes since 3.44: - Fix OVERLOAD and FALLBACK handling (GH#19320) - Fix ExtUtils::ParseXS compatibility with perl < 5.8.8 - Handle #else and #endif without blank line prefixes - Better support for duplicate ALIASes - Allow symbolic alias of default function - Add support for elifdef and elifndef - Disable alias value collision warnings by default - Silence warnings about unreached code in generated XS code - Correct colon translation of $type in OUTPUT section - Make versions in ExtUtils-ParseXS consistent - Initialize $self correctly in EU::PXS::Utilities::death() - C++ builds: avoid generating C<< extern "C" extern "C" >> * Sun Jul 16 2023 Paul Howarth - 1:3.51-499 - Update to 3.51, unbundled from perl 5.37.12 - Use SPDX-format license tag - Drop obsoletes/provides for perl-ExtUtils-Typemaps (only needed for Fedora 17) - Drop support for old Perls prior to 5.12.4 * Fri Jan 7 2022 Paul Howarth - 1:3.44-1 - Update to 3.44 - Make generated code avoid warnings about the "items" variable being unused - Avoid some unused-variable warnings generated by XS code in the test suite - Update documentation to avoid newGVgen - Correct name of variable 'ALIAS' (not 'Alias') in documentation - Add PERL_REENTRANT for XS modules (get the reentrant versions of libc functions automatically without declaring as PERL_CORE or PERL_EXT) - Correctly check VERSIONs (Perl RT#132935) - Don't include OUTLIST parameters in the prototype (Perl RT#133654) - Use absolute paths in tests on all platforms - Use PERL_VERSION compare macro - Restore compatibility with old versions that made use of "errors" function, which was renamed to "report_error_count" - Use PERL_VERSION_LE instead of 5.33+ PERL_VERSION_LT - Fix error message bug - Always XSprePUSH when producing an output list (GH#19054) - Use more descriptive variable names - Fix plan/skip in test file 002-more.t - Switch upstream from search.cpan.org to metacpan.org * Tue Aug 1 2017 Paul Howarth - 1:3.35-1 - Update to 3.35 - Fix ExtUtils-ParseXS/t/*.t that needed '.' in @INC - Remove impediment to compiling under C++11 - Make build reproducible - Remove . from the end of @INC if complex modules are loaded (Perl RT#127834) - Replace :: with __ in THIS like it's done for parameters/return values - BR: perl-devel and perl-generators unconditionally - BR: perl-interpreter rather than perl - Drop support for EOL distributions prior to F-13 - Drop BuildRoot: and Group: tags - Drop explicit buildroot cleaning in %%install section - Drop explicit %%clean section - Drop workaround for building with ExtUtils::MakeMaker < 6.46 * Wed Aug 3 2016 Paul Howarth - 1:3.31-366 - Update to 3.31 in order to dual-live with perl 5.24 - Avoid loading optional modules from default . (CVE-2016-1238) - BR: perl-devel and perl-generators where available - Fix FTBFS when perl is not in the minimal buildroot - Drop %%defattr, redundant since rpm 4.4 - Simplify find command using -delete * Tue Sep 1 2015 Paul Howarth - 1:3.30-1 - Update to 3.30 - Support added for XS handshake API introduced in 5.21.6 - Backported S_croak_xs_usage optimized on threaded builds - Fix INCLUDE_COMMAND $^X for Perl In Space - Remove 'use lib' left over from refactoring - Document and improve ancient optimization in ParseXS - Improve RETVAL code gen - Classify buildreqs by usage * Fri Mar 7 2014 Paul Howarth - 1:3.24-1 - Update to 3.24 - Native Android build fixes - More lenient syntax for embedded TYPEMAP blocks in XS: a trailing semicolon will not be required for the block terminator - Code cleanup * Sun Sep 1 2013 Paul Howarth - 1:3.22-1 - Update to 3.22 - Fix parallel testing crashes - Explicitly require new-enough Exporter * Fri Aug 9 2013 Paul Howarth - 1:3.21-1 - Update to 3.21 - ExtUtils::Typemaps gains a clone method - ExtUtils::ParseXS no longer uses global state (if using OO interface) - New "real" OO interface - Heuristic (and flawed) type canonicalization for templated C++ types - More tests ported from core - Fix targetable size detection (and better tests) - Assorted cleanup and refactoring - Stop "sv_2mortal(&PL_sv_yes)" and "(void)sv_newmortal()" for immortal typemap entries (Perl RT#116152) - Deterministic C output (fix for hash randomization in 5.18) * Thu Feb 7 2013 Paul Howarth - 1:3.18-4 - Obsolete perl-ExtUtils-Typemaps (#891952) * Mon Nov 19 2012 Paul Howarth - 1:3.18-1 - Update to 3.18 - Restore portability to Perl 5.6, which was lost at EU-PXS 3.00 - Avoid warning on an initialized non-parameter (Perl RT#112776) - Only increment PL_amagic_generation before 5.9 - Update patch for building with ExtUtils::MakeMaker < 6.46 * Fri Jun 8 2012 Paul Howarth - 1:3.15-2 - BR: perl(lib) - Don't need to remove empty directories from the buildroot - Drop support for old distributions prior to FC-3: - Don't need to define %%{perl_vendorlib} - Use DESTDIR rather than PERL_INSTALL_ROOT - Use %%{_fixperms} macro rather than our own chmod incantation * Thu Feb 2 2012 Paul Howarth - 1:3.15-1 - Update to 3.15 (fix version for PAUSE indexer) * Wed Feb 1 2012 Paul Howarth - 1:3.14-1 - Update to 3.14 - ExtUtils::Typemaps: - Embedded typemap dumping: a method that will produce the verbatim string for inclusion in XS - Introducing ExtUtils::Typemaps::Cmd, a helper module that can produce embedded typemap strings via simple one-liners - useful for including typemaps from other modules in XS code with INCLUDE_COMMAND - ExtUtils::ParseXS: - Bugfix: used to have parsing problems with embedded typemaps occasionally - Better error messages on typemap-related issues: if no typemap was found for a given C type, list all mapped C types so that the user hopefully spots his mistake easily - Proper repository and bugtracker info in META.json - Add patch to support building with ExtUtils::MakeMaker < 6.46 - Add perl core buildreqs, which might be dual-lived * Thu Dec 29 2011 Paul Howarth - 1:3.11-1 - Update to 3.11 - Version/distribution fixes * Wed Dec 28 2011 Paul Howarth - 1:3.09-1 - Update to 3.09 - Escape double quotes of file names/commands in #line directives * Tue Dec 20 2011 Paul Howarth - 1:3.08-1 - Update to 3.08 - Silence undefined-value-in-addition warning * Wed Dec 7 2011 Paul Howarth - 1:3.07-1 - Update to 3.07 - Fix inconsistent versioning in 3.06 * Wed Dec 7 2011 Paul Howarth - 1:3.06-1 - Update to 3.06 - Fix Cygwin issues and avoid conflicting static/dllexport on legacy perls too (CPAN RT#71964, CPAN RT#72313) - Convert ` to ' - Avoid some test-time warnings * Fri Nov 25 2011 Paul Howarth - 1:3.05-3 - Drop F-14 exception as xsubpp is fixed in perl-5.12.4-148.fc14 (#728393) * Thu Oct 6 2011 Paul Howarth - 1:3.05-2 - F-14 has been updated to perl 5.12.4 so explicitly exclude that distro from having xsubpp in %%{_bindir} (#728393) * Wed Oct 5 2011 Paul Howarth - 1:3.05-1 - Update to 3.05 - The XSUB.h changes to make XS(name) use XS_INTERNAL(name) by default (which were in the 5.15.2 dev release of perl) have been reverted since too many CPAN modules expect to be able to refer to XSUBs declared with XS(name); instead, ExtUtils::ParseXS will define a copy of the XS_INTERNAL/XS_EXTERNAL macros as necessary going back to perl 5.10.0. - By default, ExtUtils::ParseXS will use XS_INTERNAL(name) instead of XS(name) - Don't put null characters into the generated source file when -except is used; write the '\0' escape sequence properly instead - By #defining PERL_EUPXS_ALWAYS_EXPORT or PERL_EUPXS_NEVER_EXPORT early in your XS code, you can force ExtUtils::ParseXS to always or never export XSUB symbols; this has no effect on boot_* symbols since those must be exported - Simplify generated XS code by emitting a compatibility version of dVAR - Fixed "INCLUDE: $cmd |" (CPAN RT#70213) - BR: perl(Cwd) * Thu Aug 25 2011 Paul Howarth - 1:3.04-1 - Update to 3.04 - Properly strip trailing semicolons from inputmaps, which could trigger warnings (errors in strict C89 compilers) due to additional semicolons being interpreted as empty statements - Now detects and throws a warning if there is a CODE section using RETVAL, but no OUTPUT section (CPAN RT#69536) - Uses the explicit XS_EXTERNAL macro (from perl 5.15.2 and newer) for XSUBs that need to be exported; defines XS_EXTERNAL to fall back to XS where that is not available - Introduces new EXPORT_XSUB_SYMBOLS XS keyword that forces exported XSUB symbols; it's a no-op on perls before 5.15.2 - Try to fix regression for input-typemap override in XS argument list (CPAN RT#70448) - Explicit versions in submodules to fail early if something goes wrong * Thu Aug 11 2011 Paul Howarth - 1:3.03-1 - Update to 3.03 - Test fix: Try all @INC-derived typemap locations (CPAN RT#70047) - Reinstate %%{_bindir}/xsubpp and its manpage if we have perl 5.12.4 or later, as per F-15 onwards (#728393 fixed in perl-5.12.4-160) * Fri Aug 5 2011 Paul Howarth - 1:3.02-2 - Update to 3.02 - Test fix: Use File::Spec->catfile instead of catdir where appropriate - Exclude %%{_bindir}/xsubpp and its manpage for now to avoid conflicts with the main perl package or its subpackages (#728393); note that prior to F-4/RHEL-5, the xsubpp that comes with the main perl package will be executed rather than the new one in this package - Mark %%{perl_vendorlib}/ExtUtils/ParseXS.pod as %%doc * Thu Aug 4 2011 Paul Howarth - 1:3.01-1 - Update to 3.01 - Major refactoring of the whole code base; it finally runs under 'use strict' for the first time! - Typemaps can now be embedded into XS code using a here-doc like syntax and the new "TYPEMAP:" XS keyword - Move typemap handling code to ExtUtils::Typemaps with full object-oriented goodness - Check API compatibility when loading XS modules using the XS_APIVERSION_BOOTCHECK macro if on a new-enough perl - Fixed compiler warnings in XS - Spell-check - Define PERL_UNUSED_ARG for pre-3.8.9 perls, which should fix the tests - Add a check to Makefile.PL that scans @INC to determine whether the new xsubpp will be shadowed by another, existing xsubpp and warn the user vehemently - Add some diagnostics when xsubpp fails to load a current-enough version of ExtUtils::ParseXS - Patches from CPAN RT#53938, #61908, attempts to fix win32 problems - Require perl 5.8.1 - This release by SMUELLER -> update source URL - The xsubpp script now lives in %%{_bindir} - Package additional manpages for submodules and ExtUtils::Typemaps::* - Don't use %%{_fixperms} macro since we now ship a script in %%{_bindir} - BR: perl ≥ 3:5.8.1 * Fri Jun 24 2011 Paul Howarth - 1:2.22-10 - Rebuild for perl 5.14.1 in Rawhide - Nobody else likes macros for commands - Fix dist tag for CentOS 6 and Scientific Linux * Mon Jul 5 2010 Paul Howarth - 1:2.22-9 - Update to 2.2206 - Make xsubpp accept the _ prototype (CPAN RT#57157) - INCLUDE_COMMAND portability fixes for VMS (CPAN RT#58181) - INCLUDE_COMMAND fixes to detect non-zero exit codes (CPAN RT#52873) * Wed Jun 23 2010 Paul Howarth - 1:2.22-8 - Rebuild for perl 5.12.1 in Rawhide * Mon Jun 7 2010 Paul Howarth - 1:2.22-7 - Fix dist tag for RHEL-6 Beta * Thu Mar 11 2010 Paul Howarth - 1:2.22-6 - Update to 2.2205 (don't ship with Build.PL, avoiding circular dependency) * Wed Mar 10 2010 Paul Howarth - 1:2.22-5 - Update to 2.2204 (downgraded warnings on using INCLUDE with a command from "deprecated" to "discouraged" and limited it to the case where the command includes "perl") * Fri Feb 12 2010 Paul Howarth - 1:2.22-4 - Update to 2.2203 (Build.PL wasn't including ExtUtils/xsubpp for installation) * Thu Jan 28 2010 Paul Howarth - 1:2.22-3 - Update to 2.2202 (previous fix to IN/OUT/OUTLIST was itself broken) - Use %%{_fixperms} rather than our own %%{__chmod} incantation * Tue Jan 26 2010 Paul Howarth - 1:2.22-2 - Update to 2.2201 (IN/OUT/OUTLIST, etc. were broken due to a bad regexp) * Tue Jan 12 2010 Paul Howarth - 1:2.22-1 - Update to 2.22 - new 'INCLUDE_COMMAND' directive - workaround for empty newXS macro found in P5NCI - Dist tag for Rawhide no longer needs special-casing * Tue Oct 6 2009 Paul Howarth - 1:2.21-1 - Update to 2.21 (see Changes for details) * Fri Oct 2 2009 Paul Howarth - 1:2.20-4 - Update to 2.200403 (RPM version unchanged due to rpm/perl versioning issues) - remove PERL_CORE specific @INC manipulation (no longer needed) - change hard-coded $^H manipulation in favor of "use re 'eval'" - UNITCHECK subroutines were not being called * Tue Sep 15 2009 Paul Howarth - 1:2.20-3 - Update to 2.200401 (RPM version unchanged due to rpm/perl versioning issues) - change install_dirs to 'core' for 5.8.9 as well (RT#48474) - remove t/bugs.t until there is better C++ support in ExtUtils::CBuilder - update repository URL in META file - fix "const char *" errors for 5.8.8 (and older) (RT#48104) - add newline before a preprocessor directive (RT#30673) * Mon Jul 27 2009 Paul Howarth - 1:2.20-2 - Update to 2.2002 (RPM version unchanged due to rpm/perl versioning issues) - fix Makefile.PL installdirs for older perls - fix XSUsage prototypes for testing * Thu Jul 2 2009 Paul Howarth - 1:2.20-1 - Update to 2.20 - New upstream maintainer -> new source URL - Buildreq perl(Test::More) * Tue May 5 2009 Paul Howarth - 1:2.19-1 - Bump epoch to 1 as per Fedora version - Update to SLES-compatible dist tag macros * Thu Nov 13 2008 Paul Howarth - 2.19-2 - Tweak dist tag macros to work on current Rawhide with three-part releasenum - Change perl interpreter for xsubpp from "\./miniperl" to %%{__perl} * Mon Feb 18 2008 Paul Howarth - 2.19-1 - Update to 2.19 - Clarify license as GPL version 1 or later, or Artistic (i.e. same as perl) * Mon Apr 30 2007 Paul Howarth - 2.18-2 - Import from Fedora Extras - Use search.cpan.org download URL - Add buildreq perl(EXtUtils::MakeMaker) - Remove compiler optimization flag settings, redundant for noarch package - Macro-ize commands where possible, hardcode paths elsewhere * Tue Jan 30 2007 Jose Pedro Oliveira - 2.18-1 - Update to 2.18 * Wed Nov 22 2006 Jose Pedro Oliveira - 2.17-1 - Update to 2.17 * Sat Sep 16 2006 Jose Pedro Oliveira - 2.16-1 - Update to 2.16 * Thu Sep 7 2006 Jose Pedro Oliveira - 2.15-3 - Rebuild for FC6 * Wed Feb 15 2006 Jose Pedro Oliveira - 2.15-2 - Rebuild for FC5 (perl 5.8.8) * Tue Oct 11 2005 Jose Pedro Oliveira - 2.15-1 - Update to 2.15 * Fri Oct 7 2005 Jose Pedro Oliveira - 2.13-1 - Update to 2.13 * Thu Aug 25 2005 Jose Pedro Oliveira - 2.12-1 - Update to 2.12 * Tue Jun 14 2005 Jose Pedro Oliveira - 2.11-1 - Update to 2.11 * Tue Jun 7 2005 Jose Pedro Oliveira - 2.10-1 - Update to 2.10 - Add dist tag * Wed Apr 6 2005 Michael Schwendt - 2.09-2 - Rebuilt * Tue Mar 29 2005 Jose Pedro Oliveira - 2.09-1 - Update to 2.09 * Sat May 15 2004 Jose Pedro Oliveira - 0:2.08-0.fdr.2 - Avoid creation of the perllocal.pod file (make pure_install) * Sun Apr 25 2004 Ville Skyttä - 0:2.08-0.fdr.1 - Update to 2.08 - Require perl(:MODULE_COMPAT_*) * Mon Jan 26 2004 Ville Skyttä - 0:2.07-0.fdr.1 - Update to 2.07 * Sat Dec 27 2003 Ville Skyttä - 0:2.06-0.fdr.1 - Update to 2.06 * Tue Sep 30 2003 Ville Skyttä - 0:2.05-0.fdr.1 - Update to 2.05 * Thu Sep 4 2003 Ville Skyttä - 0:2.04-0.fdr.1 - Update to 2.04 * Thu Sep 4 2003 Ville Skyttä - 0:2.03-0.fdr.1 - First build