Sync from SUSE:SLFO:Main perl-ExtUtils-MakeMaker revision ce9d148c4cc157a4912df1b26eaf747a

This commit is contained in:
Adrian Schröter 2024-05-03 18:13:28 +02:00
commit ea2458684a
6 changed files with 1771 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

View File

@ -0,0 +1,145 @@
From 4361bd6fb0717f99f6b21ed053542e01c5093af2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Thu, 12 Jan 2012 17:05:19 +0100
Subject: [PATCH] Do not set RPATH by default
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Former behavior can be forced by setting USE_MM_LD_RUN_PATH
environment variable to 1.
This is copy from `perl' package.
See <https://bugzilla.redhat.com/show_bug.cgi?id=773622>.
Signed-off-by: Petr Písař <ppisar@redhat.com>
[ddiss@suse.de: also handle LD_RUN_PATH set in MM_Any.pm]
---
lib/ExtUtils/Liblist.pm | 5 ++++
lib/ExtUtils/MM_Any.pm | 1
lib/ExtUtils/MM_Unix.pm | 2 -
lib/ExtUtils/MakeMaker.pm | 56 +++++++++++++++++++++++++++++++++++++++++++++-
4 files changed, 62 insertions(+), 2 deletions(-)
Index: ExtUtils-MakeMaker-7.36/lib/ExtUtils/Liblist.pm
===================================================================
--- ExtUtils-MakeMaker-7.36.orig/lib/ExtUtils/Liblist.pm
+++ ExtUtils-MakeMaker-7.36/lib/ExtUtils/Liblist.pm
@@ -89,6 +89,11 @@ libraries. LD_RUN_PATH is a colon separ
in LDLOADLIBS. It is passed as an environment variable to the process
that links the shared library.
+Fedora extension: This generation of LD_RUN_PATH is disabled by default.
+To use the generated LD_RUN_PATH for all links, set the USE_MM_LD_RUN_PATH
+MakeMaker object attribute / argument, (or set the $USE_MM_LD_RUN_PATH
+environment variable).
+
=head2 BSLOADLIBS
List of those libraries that are needed but can be linked in
Index: ExtUtils-MakeMaker-7.36/lib/ExtUtils/MM_Unix.pm
===================================================================
--- ExtUtils-MakeMaker-7.36.orig/lib/ExtUtils/MM_Unix.pm
+++ ExtUtils-MakeMaker-7.36/lib/ExtUtils/MM_Unix.pm
@@ -1074,7 +1074,7 @@ sub xs_make_dynamic_lib {
}
my $ld_run_path_shell = "";
- if ($self->{LD_RUN_PATH} ne "") {
+ if (($self->{LD_RUN_PATH} ne "") && ($self->{USE_MM_LD_RUN_PATH})) {
$ld_run_path_shell = 'LD_RUN_PATH="$(LD_RUN_PATH)" ';
}
Index: ExtUtils-MakeMaker-7.36/lib/ExtUtils/MakeMaker.pm
===================================================================
--- ExtUtils-MakeMaker-7.36.orig/lib/ExtUtils/MakeMaker.pm
+++ ExtUtils-MakeMaker-7.36/lib/ExtUtils/MakeMaker.pm
@@ -317,7 +317,7 @@ sub full_setup {
PERM_DIR PERM_RW PERM_RWX MAGICXS
PL_FILES PM PM_FILTER PMLIBDIRS PMLIBPARENTDIRS POLLUTE
PREREQ_FATAL PREREQ_PM PREREQ_PRINT PRINT_PREREQ PUREPERL_ONLY
- SIGN SKIP TEST_REQUIRES TYPEMAPS UNINST VERSION VERSION_FROM XS
+ SIGN SKIP TEST_REQUIRES TYPEMAPS UNINST USE_MM_LD_RUN_PATH VERSION VERSION_FROM XS
XSBUILD XSMULTI XSOPT XSPROTOARG XS_VERSION
clean depend dist dynamic_lib linkext macro realclean tool_autosplit
@@ -503,6 +503,26 @@ sub new {
$self->_PRINT_PREREQ;
}
+ # USE_MM_LD_RUN_PATH - another RedHatism to disable automatic RPATH generation
+ if ( ( ! $self->{USE_MM_LD_RUN_PATH} )
+ &&( ("@ARGV" =~ /\bUSE_MM_LD_RUN_PATH(=([01]))?\b/)
+ ||( exists( $ENV{USE_MM_LD_RUN_PATH} )
+ &&( $ENV{USE_MM_LD_RUN_PATH} =~ /([01])?$/ )
+ )
+ )
+ )
+ {
+ my $v = $1;
+ if( $v )
+ {
+ $v = ($v=~/=([01])$/)[0];
+ }else
+ {
+ $v = 1;
+ };
+ $self->{USE_MM_LD_RUN_PATH}=$v;
+ };
+
print "MakeMaker (v$VERSION)\n" if $Verbose;
if (-f "MANIFEST" && ! -f "Makefile" && ! $UNDER_CORE){
check_manifest();
@@ -2837,6 +2857,40 @@ precedence. A typemap in the current di
precedence, even if it isn't listed in TYPEMAPS. The default system
typemap has lowest precedence.
+=item USE_MM_LD_RUN_PATH
+
+boolean
+The Fedora perl MakeMaker distribution differs from the standard
+upstream release in that it disables use of the MakeMaker generated
+LD_RUN_PATH by default, UNLESS this attribute is specified , or the
+USE_MM_LD_RUN_PATH environment variable is set during the MakeMaker run.
+
+The upstream MakeMaker will set the ld(1) environment variable LD_RUN_PATH
+to the concatenation of every -L ld(1) option directory in which a -l ld(1)
+option library is found, which is used as the ld(1) -rpath option if none
+is specified. This means that, if your application builds shared libraries
+and your MakeMaker application links to them, that the absolute paths of the
+libraries in the build tree will be inserted into the RPATH header of all
+MakeMaker generated binaries, and that such binaries will be unable to link
+to these libraries if they do not still reside in the build tree directories
+(unlikely) or in the system library directories (/lib or /usr/lib), regardless
+of any LD_LIBRARY_PATH setting. So if you specified -L../mylib -lmylib , and
+ your 'libmylib.so' gets installed into /some_directory_other_than_usr_lib,
+ your MakeMaker application will be unable to link to it, even if LD_LIBRARY_PATH
+is set to include /some_directory_other_than_usr_lib, because RPATH overrides
+LD_LIBRARY_PATH.
+
+So for Fedora MakeMaker builds LD_RUN_PATH is NOT generated by default for
+every link. You can still use explicit -rpath ld options or the LD_RUN_PATH
+environment variable during the build to generate an RPATH for the binaries.
+
+You can set the USE_MM_LD_RUN_PATH attribute to 1 on the MakeMaker command
+line or in the WriteMakefile arguments to enable generation of LD_RUN_PATH
+for every link command.
+
+USE_MM_LD_RUN_PATH will default to 1 (LD_RUN_PATH will be used) IF the
+$USE_MM_LD_RUN_PATH environment variable is set during a MakeMaker run.
+
=item VENDORPREFIX
Like PERLPREFIX, but only for the vendor install locations.
Index: ExtUtils-MakeMaker-7.36/lib/ExtUtils/MM_Any.pm
===================================================================
--- ExtUtils-MakeMaker-7.36.orig/lib/ExtUtils/MM_Any.pm
+++ ExtUtils-MakeMaker-7.36/lib/ExtUtils/MM_Any.pm
@@ -2437,6 +2437,7 @@ sub init_others {
# LD_RUN_PATH now computed by ExtUtils::Liblist
($self->{EXTRALIBS}, $self->{BSLOADLIBS},
$self->{LDLOADLIBS}, $self->{LD_RUN_PATH}) = @libs;
+ $self->{LD_RUN_PATH} = "" unless $self->{USE_MM_LD_RUN_PATH};
last;
}
}

BIN
ExtUtils-MakeMaker-7.70.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

31
cpanspec.yml Normal file
View File

@ -0,0 +1,31 @@
---
#description_paragraphs: 3
#description: |-
# override description from CPAN
#summary: override summary from CPAN
#no_testing: broken upstream
#sources:
# - source1
# - source2
patches:
Do_not_set_RPATH_by_default.patch: -p1
#preamble: |-
# BuildRequires: gcc-c++
#post_prep: |-
# hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s, *,,g'`
# sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL
post_build: |-
# rm unused.files
post_install: |-
rm $RPM_BUILD_ROOT/usr/bin/instmodsh
rm $RPM_BUILD_ROOT/usr/share/man/man1/instmodsh.1
#license: SUSE-NonFree
#skip_noarch: 1
custom_build: |-
export BUILDING_AS_PACKAGE=1
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{__make} %{?_smp_mflags}
#custom_test: |-
#startserver && make test
#ignore_requires: Bizarre::Module

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,90 @@
#
# spec file for package perl-ExtUtils-MakeMaker
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define cpan_name ExtUtils-MakeMaker
Name: perl-ExtUtils-MakeMaker
Version: 7.70
Release: 0
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: Create a module Makefile
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/B/BI/BINGOS/%{cpan_name}-%{version}.tar.gz
Source1: cpanspec.yml
Patch0: Do_not_set_RPATH_by_default.patch
BuildArch: noarch
BuildRequires: perl
BuildRequires: perl-macros
%{perl_requires}
%description
This utility is designed to write a Makefile for an extension module from a
Makefile.PL. It is based on the Makefile.SH model provided by Andy
Dougherty and the perl5-porters.
It splits the task of generating the Makefile into several subroutines that
can be individually overridden. Each subroutine returns the text it wishes
to have written to the Makefile.
As there are various Make programs with incompatible syntax, which use
operating system shells, again with incompatible syntax, it is important
for users of this module to know which flavour of Make a Makefile has been
written for so they'll use the correct one and won't have to face the
possibly bewildering errors resulting from using the wrong one.
On POSIX systems, that program will likely be GNU Make; on Microsoft
Windows, it will be either Microsoft NMake, DMake or GNU Make. See the
section on the L</"MAKE"> parameter for details.
ExtUtils::MakeMaker (EUMM) is object oriented. Each directory below the
current directory that contains a Makefile.PL is treated as a separate
object. This makes it possible to write an unlimited number of Makefiles
with a single invocation of WriteMakefile().
All inputs to WriteMakefile are Unicode characters, not just octets. EUMM
seeks to handle all of these correctly. It is currently still not possible
to portably use Unicode characters in module names, because this requires
Perl to handle Unicode filenames, which is not yet the case on Windows.
See L<ExtUtils::MakeMaker::FAQ> for details of the design and usage.
%prep
%autosetup -n %{cpan_name}-%{version} -p1
find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -name "configure" -print0 | xargs -0 chmod 644
%build
export BUILDING_AS_PACKAGE=1
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{__make} %{?_smp_mflags}
%check
make test
%install
%perl_make_install
%perl_process_packlist
# MANUAL BEGIN
rm $RPM_BUILD_ROOT/usr/bin/instmodsh
rm $RPM_BUILD_ROOT/usr/share/man/man1/instmodsh.1
# MANUAL END
%perl_gen_filelist
%files -f %{name}.files
%doc Changes CONTRIBUTING README README.packaging
%changelog