diff --git a/dev-lang/swig/Manifest b/dev-lang/swig/Manifest index 49b8925910f76..2f152fc3060b8 100644 --- a/dev-lang/swig/Manifest +++ b/dev-lang/swig/Manifest @@ -2,3 +2,4 @@ DIST swig-4.1.1.tar.gz 8600805 BLAKE2B 898d3405f20c3e49626fb808b568e77c69b81ec24 DIST swig-4.2.1.tar.gz 8364050 BLAKE2B 0acffd4794d09f2347d669d1460a794c03f136ab3ddc6623741e182ff52b6bf5f639c736e38540918ebb1abbe36c2ce1957aef8a429f1a716d9c5361175569bf SHA512 019dee5a46d57e1030eef47cd5d007ccaadbdcd4e53cd30d7c795f0118ecf4406a78185534502c81c5f6d7bac0713256e7e19b20b5a2d14e2c552219edbaf5cf DIST swig-4.3.1.tar.gz 8620774 BLAKE2B cd47eb3f9bf7c7e2f1583a58c4416275720b55754abd05c61636e68ac36e6b5899b293e55cf680071257017b53b95e7a2fd8983ca4effc7e98bb7af4dac5e026 SHA512 8958f7bc3345549a9bc4e00aa8d40a99f6c4bb92b95d627c8796cf8f8d1ba0041a89cab542f171778c2b26aa2a877767181ae9bd2c05fd055f373a32a463399c DIST swig-4.4.1.tar.gz 8658358 BLAKE2B 06fdcda2de0b0acf341949e0d60e284b5cd326a1f0f1d0985e387c936ef8d87fb98ea14a260ca22c19634f297f7331ed44989da07a47ee9333630397846e4db1 SHA512 103ddb4a5914f28e6739a006d35042c701e55ba05066acff3f3609befb5f43f253ea717fc41d06c93d8fb187ded4399c12c94665b93dc06d0fb835069391c7c7 +DIST swig-4.5.1.tar.gz 9191718 BLAKE2B 371086611526fc7ac437d09c6f12c4077c31b4d3b7d89facfc67363114a42202c5a715e61822b64015c1fa2e1f8c3222566dfe1482ba927a71fbfc2c4439643b SHA512 bf89652ddcfac38e42a52224ff79c5717e973779d174b822a03ad48866303779cadf9d5181bbceed4d5dd4a0ff5ed5dea4a0c7cf10c5bc4a59310cdba64f47dd diff --git a/dev-lang/swig/metadata.xml b/dev-lang/swig/metadata.xml index 9643318f6cf34..7490c7d8f9120 100644 --- a/dev-lang/swig/metadata.xml +++ b/dev-lang/swig/metadata.xml @@ -16,6 +16,7 @@ build ccache-swig(a fast compiler cache) + Test against more languages swig/swig diff --git a/dev-lang/swig/swig-4.5.1.ebuild b/dev-lang/swig/swig-4.5.1.ebuild new file mode 100644 index 0000000000000..a48b9ffc39fe3 --- /dev/null +++ b/dev-lang/swig/swig-4.5.1.ebuild @@ -0,0 +1,117 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{12..15} ) +inherit flag-o-matic python-any-r1 toolchain-funcs + +DESCRIPTION="Simplified Wrapper and Interface Generator" +HOMEPAGE="https://www.swig.org/ https://github.com/swig/swig" +SRC_URI="https://downloads.sourceforge.net/project/swig/swig/${P}/${P}.tar.gz" + +LICENSE="GPL-3+ BSD BSD-2" +SLOT="0" +# Temporarily unkeyworded due to breakage in reverse dependencies, bug #983043 +#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos ~x64-solaris" +IUSE="ccache doc pcre test test-full" +RESTRICT="!test? ( test )" + +RDEPEND=" + pcre? ( dev-libs/libpcre2:= ) + ccache? ( virtual/zlib:= ) +" +DEPEND=" + ${RDEPEND} + test? ( dev-libs/boost ) +" +BDEPEND=" + virtual/pkgconfig + test? ( + ${PYTHON_DEPS} + test-full? ( + dev-lang/mono + >=dev-lang/go-1.20 + virtual/jdk + >=dev-lang/lua-5.1:* + dev-lang/ocaml + dev-lang/perl:* + || ( + dev-lang/php:8.3 + dev-lang/php:8.2 + ) + dev-lang/R + dev-lang/tcl + ) + ) +" + +DOCS=( ANNOUNCE CHANGES CHANGES.current README TODO ) + +pkg_setup() { + use test && python-any-r1_pkg_setup +} + +src_configure() { + # strict aliasing violations in test code + filter-lto + append-flags -fno-strict-aliasing + + local myconf=( + PKGCONFIG="$(tc-getPKG_CONFIG)" + --without-maximum-compile-warnings + $(use_enable ccache) + $(use_with pcre) + --without-clang-format + + # tests are automagic for many languages otherwise and may be quite brittle + --without-alllang + --with-python # installed by default due to portage, significant portion of revdeps use swig for python bindings + ) + if use test-full; then + myconf+=( + --with-csharp + #--with-d # doesn't accept gcc[d]? + --with-go + #--with-guile would need guile-any type support + --with-java + #--with-javascript # broken build + --with-lua + --with-ocaml + #--with-octave # broken build + --with-perl + --with-perl5="${EPREFIX}/usr/bin/perl" + --with-php + --with-r + #--with-ruby # broken build + #--with-scilab # not packaged? + --with-tcl + ) + fi + econf "${myconf[@]}" +} + +src_compile() { + # Override these variables per Makefile.in to get verbose logs + emake FLAGS="-k" RUNPIPE="" +} + +src_test() { + # The tests won't get run w/o an explicit call, broken Makefiles? + # *-sections for bug #935318 + emake check \ + FLAGS="-k" \ + RUNPIPE="" \ + CFLAGS="${CFLAGS} -ffunction-sections -fdata-sections" \ + CXXFLAGS="${CXXFLAGS} -ffunction-sections -fdata-sections" \ + LDFLAGS="${LDFLAGS}" +} + +src_install() { + default + + if use doc; then + docinto html + dodoc -r Doc/{Devel,Manual} + fi +}