diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-09-23 01:25:12 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-09-23 01:25:12 +0100 |
commit | de59eb4554f5fe0d506a66bb96630a35f99c09f7 (patch) | |
tree | 93910196831fcf1967ee9af465900caa7d70fa5b /dev-lang/swig | |
parent | 1802160f23e91c618b3c7379fd99127682cfce19 (diff) |
gentoo auto-resync : 23:09:2024 - 01:25:12
Diffstat (limited to 'dev-lang/swig')
-rw-r--r-- | dev-lang/swig/Manifest | 3 | ||||
-rw-r--r-- | dev-lang/swig/files/swig-4.2.1-tests-fpic.patch | 115 | ||||
-rw-r--r-- | dev-lang/swig/swig-4.2.1.ebuild | 13 |
3 files changed, 129 insertions, 2 deletions
diff --git a/dev-lang/swig/Manifest b/dev-lang/swig/Manifest index 1a8cd4ef1dd1..e1a9190f118d 100644 --- a/dev-lang/swig/Manifest +++ b/dev-lang/swig/Manifest @@ -1,8 +1,9 @@ AUX swig-4.1.1-ccache-configure-clang16.patch 1162 BLAKE2B 28889128bfd9a6cd883d575f1cae8dd0f3e02b7ebfc8818b761154a60a79757d2f13c26f43119a0288c9731c56c5bbacfb1606222d5697e0fc04e6b3e2ebf265 SHA512 aa7fc3bc4da18dcdfa2c6dec55c6c80174878ee05883ed4eab6bf35c75c88edd165977cc1ea4e1d503f40f99bd7b40688357ec7283c20542e87c961efcd71526 +AUX swig-4.2.1-tests-fpic.patch 4653 BLAKE2B e8bb2867005693cb4254194535451f49192db1c6a01bd9df1dd0d0cd04e366424bf39494ba9681406d27de5cb6ed9cbe02ba11591fcd7f2c0e82b8d6f34eed8d SHA512 5d0ef7725c898a9ab4162871577653acf5d2e5f375c16c4f0695960c2dd4e7c4767411de343f278290981cdc0dc6612af032d62e8b4f20f43bfdb42880e9023a DIST swig-4.1.1.tar.gz 8600805 BLAKE2B 898d3405f20c3e49626fb808b568e77c69b81ec2401c0a0c406f9e7a3d7d218353dc8b8ae88a3d485ddfc3be659971b961ee2c89d5b0c75aed0688e0952fd208 SHA512 1cea1918455a75ebc9b2653dd1715bd5dcd974554955f324295c6a6f14c0a715651b221b85fad4a8af5197e0c75bfe7b590bc6ba7178c26245fbbd9a7e110100 DIST swig-4.2.0.tar.gz 8339586 BLAKE2B 4f1c3c7d4b1e218b67a2d796d2171df73971036a433e5fb80233b3050f022d578efdff28fc44d98a6d176ec6270b4942f5f56e9a74bbd8b30d6836c76c620a04 SHA512 b7f508b25bc6e882ed6123f6c7ad12b02a7b74de09ac6e5789968e9c2f51407d1e3dafd5ea495087b4fb0f447ecce17e6070471479c67c4265166d8342a10862 DIST swig-4.2.1.tar.gz 8364050 BLAKE2B 0acffd4794d09f2347d669d1460a794c03f136ab3ddc6623741e182ff52b6bf5f639c736e38540918ebb1abbe36c2ce1957aef8a429f1a716d9c5361175569bf SHA512 019dee5a46d57e1030eef47cd5d007ccaadbdcd4e53cd30d7c795f0118ecf4406a78185534502c81c5f6d7bac0713256e7e19b20b5a2d14e2c552219edbaf5cf EBUILD swig-4.1.1-r1.ebuild 1292 BLAKE2B 603fef592558fff9c76f4d17608ebcbedf2e6b1c0c42470ae4e8cf288074c124a6a941fb9e33729d4ca40793c5f2130c2f2ab1a15a39eec6be69f37db705741f SHA512 f473e31803d2a1e9cec9319fb18a7d32c7a9e176c41ce4efdba56bfc195a62da6978a563ec3db2786efcc053d4135848c8d2df3d4e115a1a3f94ff4afad8b7af EBUILD swig-4.2.0.ebuild 1084 BLAKE2B 964b843af3a661f59840043b67c3153a2c7c5f6021a44e9f8c302249bc60d02ddb7bbd92fdaad50d0d8a59fbc3e956322744db1fccbdd42e6b970b615568f012 SHA512 af5771e09b5a819611729b93ed66e5eb6ad3c59824185650265510451e913334134e293df01610fb952bb0de2a91a27c1487faf104be6dff1fa2e3d8ea10ceaa -EBUILD swig-4.2.1.ebuild 1236 BLAKE2B 3e127de8b21822ee73a346234c31d4ca50fa66f6aa12beef84565611890cd82c6b230eaa960cd45db3f319ca8e0bec851e124eb24f899815c18f5e802ae8ab99 SHA512 be1a5b9f10f54f0b25626ae5d3897728be0e4bb1acfb2ef175fa68a704ae2c709af5818972ef3c0448c07fc3dd1ef103db85c8e767d8c03331bf11c3d93eef7b +EBUILD swig-4.2.1.ebuild 1418 BLAKE2B 88776b6b292a273c0db74514572399fcdbcafe17a5a7da05e15b5c52700052538cd06274c7fd7794fd0ebbfe99fcccaf4d0b0c376f43d4df49a767366bcd7908 SHA512 4ebc5afc7688cdf902926a485f5591551c869cd94ff09bcd93dcf659d6efe706584fa4eacf7722ba7d1be216869d97128f85ea04a058ab16cbd54e2d763c7f0a MISC metadata.xml 1019 BLAKE2B 1f6a79945d3bb92bd9b5c06f7b4e96c8c9f8f6e68d5c13890247d2c08adf46409a194e3198fb3df19f699a176fe92bebc1e7ba6eb0944a0db12c5e3271043552 SHA512 5ba26e3670ba852648a243f14efe096e52781418eb4d07cabc1bcf46efcd098d099ecbb3d504862540db796279fd855a581d60dd3b1de2f60e9d542e3ccb9b00 diff --git a/dev-lang/swig/files/swig-4.2.1-tests-fpic.patch b/dev-lang/swig/files/swig-4.2.1-tests-fpic.patch new file mode 100644 index 000000000000..8f873937bd99 --- /dev/null +++ b/dev-lang/swig/files/swig-4.2.1-tests-fpic.patch @@ -0,0 +1,115 @@ +From e89960a53f6e10550f86588be705b3c6eb09d159 Mon Sep 17 00:00:00 2001 +From: matoro <matoro@users.noreply.github.com> +Date: Mon, 22 Jul 2024 17:40:20 -0400 +Subject: [PATCH 1/2] Use -fPIC on Linux instead of -fpic + +On most platforms, these are identical. However, on a small list of +platforms, the small -fpic will enforce a limit on GOT size. However, +if -fPIC is used instead, then the GOT on these platforms will have no +limits. The affected platforms and the respective GOT limits with -fpic +are: 8k on sparc, 28k on aarch64, and 32k on m68k and powerpc. + +See: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#index-fpic +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 25cdee1457..8561d27b35 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -230,7 +230,7 @@ then + fi;; + s390x*-*-*) CCSHARED="-fpic" ;; + s390*-*-*) CCSHARED="-fPIC" ;; +- *-*-linux*) CCSHARED="-fpic";; ++ *-*-linux*) CCSHARED="-fPIC";; + *-*-freebsd* | *-*-openbsd*) CCSHARED="-fpic";; + *-*-netbsd*) CCSHARED="-fPIC";; + *-sco-sysv*) CCSHARED="-KPIC -dy -Bdynamic";; + +From 16129d98041586af75f4c4cb71758e0eb3b49e6a Mon Sep 17 00:00:00 2001 +From: matoro <matoro@users.noreply.github.com> +Date: Mon, 22 Jul 2024 17:46:29 -0400 +Subject: [PATCH 2/2] Update examples to recommend compiling with -fPIC instead + of -fpic + +To reflect previous change to swig defaults. +--- + Examples/go/simple/index.html | 6 +++--- + Examples/perl5/index.html | 2 +- + Examples/python/index.html | 2 +- + Examples/ruby/index.html | 2 +- + Examples/tcl/index.html | 2 +- + 5 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/Examples/go/simple/index.html b/Examples/go/simple/index.html +index 21dfc239ed..45ec980cda 100644 +--- a/Examples/go/simple/index.html ++++ b/Examples/go/simple/index.html +@@ -72,10 +72,10 @@ <h2>Compilation</h2> + named <tt>example.a</tt>; e.g., <tt>gopack grc example.a example.6 + example_gc.6</tt>. + <li>Compile the <tt><a href="example_wrap.c">example_wrap.c</a></tt> +- file using your standard C compiler with the <tt>-fpic</tt> option; +- e.g., <tt>gcc -c -O -fpic example_wrap.c</tt>. ++ file using your standard C compiler with the <tt>-fPIC</tt> option; ++ e.g., <tt>gcc -c -O -fPIC example_wrap.c</tt>. + <li>Also compile the actual code, not generated by SWIG; e.g., <tt>gcc +- -c -O -fpic example.c</tt>. ++ -c -O -fPIC example.c</tt>. + <li>Put the gcc compiled object files into a shared library; + e.g., <tt>gcc -shared -o example.so example_wrap.o example.o</tt>. + <li>Compile the program which demonstrates how to use the library; +diff --git a/Examples/perl5/index.html b/Examples/perl5/index.html +index 2daabaaf9c..122923bdc9 100644 +--- a/Examples/perl5/index.html ++++ b/Examples/perl5/index.html +@@ -42,7 +42,7 @@ <h2>Compilation Issues</h2> + <blockquote> + <pre> + % swig -perl5 interface.i +-% gcc -fpic -c -Dbool=char -I/usr/lib/perl5/5.00503/i386-linux/CORE interface_wrap.c ++% gcc -fPIC -c -Dbool=char -I/usr/lib/perl5/5.00503/i386-linux/CORE interface_wrap.c + % gcc -shared interface_wrap.o $(OBJS) -o interface.so + % perl + use interface; +diff --git a/Examples/python/index.html b/Examples/python/index.html +index fcb7eace8b..97c2036330 100644 +--- a/Examples/python/index.html ++++ b/Examples/python/index.html +@@ -44,7 +44,7 @@ <h2>Compilation Issues</h2> + <blockquote> + <pre> + % swig -python interface.i +-% gcc -fpic -c interface_wrap.c -I/usr/local/include/python1.5 ++% gcc -fPIC -c interface_wrap.c -I/usr/local/include/python1.5 + % gcc -shared interface_wrap.o $(OBJS) -o interfacemodule.so + % python + Python 1.5.2 (#3, Oct 9 1999, 22:09:34) [GCC 2.95.1 19990816 (release)] on linux2 +diff --git a/Examples/ruby/index.html b/Examples/ruby/index.html +index ceb6c925d4..dee00c1d14 100644 +--- a/Examples/ruby/index.html ++++ b/Examples/ruby/index.html +@@ -45,7 +45,7 @@ <h2>Compilation Issues</h2> + <blockquote> + <pre> + % swig -ruby interface.i +-% gcc -fpic -c interface_wrap.c -I/usr/local/lib/ruby/1.4/i686-linux ++% gcc -fPIC -c interface_wrap.c -I/usr/local/lib/ruby/1.4/i686-linux + % gcc -shared interface_wrap.o $(OBJS) -o interface.so + % ruby + require 'interface' +diff --git a/Examples/tcl/index.html b/Examples/tcl/index.html +index acd90029f3..5048186c67 100644 +--- a/Examples/tcl/index.html ++++ b/Examples/tcl/index.html +@@ -44,7 +44,7 @@ <h2>Compilation Issues</h2> + <blockquote> + <pre> + unix % swig -tcl interface.i +-unix % gcc -fpic -c interface_wrap.c -I/usr/local/include ++unix % gcc -fPIC -c interface_wrap.c -I/usr/local/include + unix % gcc -shared interface_wrap.o $(OBJS) -o interface.so + unix % tclsh8.3 + % load ./interface.so diff --git a/dev-lang/swig/swig-4.2.1.ebuild b/dev-lang/swig/swig-4.2.1.ebuild index 1375557b544c..c6599cf0d3b2 100644 --- a/dev-lang/swig/swig-4.2.1.ebuild +++ b/dev-lang/swig/swig-4.2.1.ebuild @@ -11,7 +11,7 @@ SRC_URI="https://downloads.sourceforge.net/${PN}/${P}.tar.gz" LICENSE="GPL-3+ BSD BSD-2" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" IUSE="ccache doc pcre test" RESTRICT="!test? ( test )" @@ -27,6 +27,17 @@ BDEPEND="virtual/pkgconfig" DOCS=( ANNOUNCE CHANGES CHANGES.current README TODO ) +PATCHES=( + "${FILESDIR}"/${P}-tests-fpic.patch +) + +src_prepare() { + default + + # Delete after 4.2.1 (bug #900769, bug #935318) + sed -i -e 's:fpic:fPIC:' configure.ac configure || die +} + src_configure() { # TODO: add USE for various langs? (https://bugs.gentoo.org/921504#c3) econf \ |