From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: www-apache/mod_perl/files/, www-apache/mod_perl/
Date: Mon, 30 Jun 2025 12:25:31 +0000 (UTC) [thread overview]
Message-ID: <1751286185.2a7a49ce39447bf4a7effed3d38ec525f8d7cc4d.sam@gentoo> (raw)
commit: 2a7a49ce39447bf4a7effed3d38ec525f8d7cc4d
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 30 12:23:05 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jun 30 12:23:05 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2a7a49ce
www-apache/mod_perl: fix modern C issue
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../mod_perl/files/mod_perl-2.0.13-c99.patch | 43 ++++++
www-apache/mod_perl/mod_perl-2.0.13-r2.ebuild | 144 +++++++++++++++++++++
2 files changed, 187 insertions(+)
diff --git a/www-apache/mod_perl/files/mod_perl-2.0.13-c99.patch b/www-apache/mod_perl/files/mod_perl-2.0.13-c99.patch
new file mode 100644
index 000000000000..f0ef4cba0c52
--- /dev/null
+++ b/www-apache/mod_perl/files/mod_perl-2.0.13-c99.patch
@@ -0,0 +1,43 @@
+https://github.com/apache/mod_perl/commit/ead5012b9f8bca08415f39e15226dbc6112a9538
+
+From ead5012b9f8bca08415f39e15226dbc6112a9538 Mon Sep 17 00:00:00 2001
+From: Joe Orton <jorton@apache.org>
+Date: Tue, 6 Feb 2024 08:33:52 +0000
+Subject: [PATCH] * src/modules/perl/modperl_common_util.c
+ (modperl_table_magic_copy): Use I32 rather than int for 'namelen' argument,
+ fixing an incompatible function pointer error/warning in a 32-bit build:
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+modperl_common_util.c:57:53: error: initialization of ‘int (*)(PerlInterpreter *, SV *, MAGIC *, SV *, const char *, I32)’ {aka ‘int (*)(struct interpreter *, struct sv *, struct magic *, struct sv *, const char *, long int)’} from incompatible pointer type ‘int (*)(PerlInterpreter *, SV *, MAGIC *, SV *, const char *, int)’ {aka ‘int (*)(struct interpreter *, struct sv *, struct magic *, struct sv *, const char *, int)’} [-Wincompatible-pointer-types]
+ 57 | modperl_table_magic_copy};
+ | ^~~~~~~~~~~~~~~~~~~~~~~~
+
+Checked back to Perl 5.14.x which has I32 (a typedef of long int on
+i686) rather than int in the prototype for the svt_copy function
+pointer in MGVTBL, so I32 appears to have been always correct here:
+
+int (*svt_copy)(SV *sv, MAGIC* mg, SV *nsv, const char *name, I32 namlen);
+
+per https://perldoc.perl.org/5.14.0/perlguts
+
+
+git-svn-id: https://svn.apache.org/repos/asf/perl/modperl/trunk@1915593 13f79535-47bb-0310-9956-ffa450edef68
+---
+ src/modules/perl/modperl_common_util.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/modules/perl/modperl_common_util.c b/src/modules/perl/modperl_common_util.c
+index c5f285f9d..461750f2f 100644
+--- a/src/modules/perl/modperl_common_util.c
++++ b/src/modules/perl/modperl_common_util.c
+@@ -41,7 +41,7 @@
+
+ MP_INLINE static
+ int modperl_table_magic_copy(pTHX_ SV *sv, MAGIC *mg, SV *nsv,
+- const char *name, int namelen)
++ const char *name, I32 namelen)
+ {
+ /* prefetch the value whenever we're iterating over the keys */
+ MAGIC *tie_magic = mg_find(nsv, PERL_MAGIC_tiedelem);
diff --git a/www-apache/mod_perl/mod_perl-2.0.13-r2.ebuild b/www-apache/mod_perl/mod_perl-2.0.13-r2.ebuild
new file mode 100644
index 000000000000..d8210716297d
--- /dev/null
+++ b/www-apache/mod_perl/mod_perl-2.0.13-r2.ebuild
@@ -0,0 +1,144 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DIST_TEST=do
+inherit depend.apache apache-module perl-module
+
+DESCRIPTION="An embedded Perl interpreter for Apache2"
+HOMEPAGE="https://perl.apache.org/ https://projects.apache.org/project.html?perl-mod_perl"
+SRC_URI="mirror://apache/perl/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="1"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~riscv ~x86"
+IUSE="debug perl_features_ithreads test"
+RESTRICT="!test? ( test )"
+
+# Apache::Reload, Apache::SizeLimit, and Apache::Test are force-unbundled.
+# The minimum versions requested here are the bundled versions.
+
+# The test dependencies are from CPAN (Bundle::Apache2).
+
+# When all MPMs are disabled via useflags, the apache ebuild selects a
+# default one, which will likely need threading.
+
+RDEPEND="
+ perl_features_ithreads? ( || ( >=dev-lang/perl-5.38.2-r3[perl_features_ithreads] <dev-lang/perl-5.38.2-r3[ithreads] ) )
+ !perl_features_ithreads? ( || ( >=dev-lang/perl-5.38.2-r3[-perl_features_ithreads] <dev-lang/perl-5.38.2-r3[-ithreads] ) )
+ >=dev-perl/Apache-Test-1.420.0
+ >=www-servers/apache-2.0.47
+ >=dev-libs/apr-util-1.4
+ !perl_features_ithreads? ( www-servers/apache[-apache2_mpms_event,-apache2_mpms_worker,apache2_mpms_prefork] )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ dev-perl/Module-Build
+ test? (
+ >=dev-perl/CGI-3.110.0
+ dev-perl/Chatbot-Eliza
+ dev-perl/Devel-Symdump
+ dev-perl/HTML-Parser
+ dev-perl/IPC-Run3
+ dev-perl/libwww-perl
+ www-servers/apache[apache2_modules_version,-apache2_modules_unique_id]
+ !www-apache/mpm_itk
+ )
+"
+PDEPEND="
+ >=dev-perl/Apache-Reload-0.130.0
+ >=dev-perl/Apache-SizeLimit-0.970.0
+"
+
+APACHE2_MOD_FILE="${S}/src/modules/perl/mod_perl.so"
+APACHE2_MOD_CONF="2.0.3/75_${PN}"
+APACHE2_MOD_DEFINE="PERL"
+
+need_apache2
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.0.1-sneak-tmpdir.patch # seems to fix the make test problem
+ "${FILESDIR}"/${PN}-2.0.4-inline.patch # 550244
+ "${FILESDIR}"/${PN}-2.0.10_rc1-bundled-Apache-Test.patch # 352724
+ "${FILESDIR}"/${PN}-2.0.10_rc1-Gentoo-not-Unix.patch
+ "${FILESDIR}"/${PN}-2.0.11-ranlib.patch # 728554
+ "${FILESDIR}"/${PN}-2.0.13-c99.patch
+)
+
+src_prepare() {
+ perl-module_src_prepare
+
+ # chainsaw unbundling
+ rm -rf Apache-{Test,Reload,SizeLimit}/ lib/Bundle/ || die
+}
+
+src_configure() {
+ _init_apache2_late
+
+ local debug=$(usex debug 1 0)
+ local nothreads=$(usex perl_features_ithreads 0 1)
+ myconf=(
+ MP_USE_DSO=1
+ MP_APXS=${APXS}
+ MP_APR_CONFIG=/usr/bin/apr-1-config
+ MP_TRACE=${debug}
+ MP_DEBUG=${debug}
+ MP_NO_THREADS=${nothreads}
+ )
+
+ perl-module_src_configure
+}
+
+src_test() {
+ # make test notes whether it is running as root, and drops
+ # privileges all the way to "nobody" if so, so we must adjust
+ # write permissions accordingly in this case.
+
+ # IF YOU SUDO TO EMERGE AND HAVE !env_reset set testing will fail!
+ if [[ "$(id -u)" == "0" ]]; then
+ chown nobody:nobody "${WORKDIR}" "${T}" || die
+ fi
+
+ # We force verbose tests for now to get meaningful bug reports.
+ MAKEOPTS+=" -j1"
+ TMPDIR="${T}" HOME="${T}/" TEST_VERBOSE=1 LC_TIME=C perl-module_src_test
+}
+
+src_install() {
+ apache-module_src_install
+
+ default
+
+ perl_delete_localpod
+ perl_fix_packlist
+ perl_delete_emptybsdir
+
+ insinto "${APACHE_MODULES_CONFDIR}"
+ doins "${FILESDIR}"/2.0.3/apache2-mod_perl-startup.pl
+
+ # this is an attempt to get @INC in line with /usr/bin/perl.
+ # there is blib garbage in the mainstream one that can only be
+ # useful during internal testing, so we wait until here and then
+ # just go with a clean slate. should be much easier to see what's
+ # happening and revert if problematic.
+
+ perl_set_version
+ sed -i \
+ -e "s,-I${S}/[^[:space:]\"\']\+[[:space:]]\?,,g" \
+ -e "s,-typemap[[:space:]]${S}/[^[:space:]\"\']\+[[:space:]]\?,,g" \
+ -e "s,${S}\(/[^[:space:]\"\']\+\)\?,/,g" \
+ "${D}/${VENDOR_ARCH}/Apache2/BuildConfig.pm" || die
+
+ local fname
+ for fname in $(find "${D}" -type f -not -name '*.so'); do
+ grep -q "\(${D}\|${S}\)" "${fname}" && ewarn "QA: File contains a temporary path ${fname}"
+ sed -i -e "s:\(${D}\|${S}\):/:g" ${fname} || die
+ done
+
+ perl_remove_temppath
+}
+
+pkg_postinst() {
+ apache-module_pkg_postinst
+}
next reply other threads:[~2025-06-30 12:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-30 12:25 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-03-15 14:58 [gentoo-commits] repo/gentoo:master commit in: www-apache/mod_perl/files/, www-apache/mod_perl/ Matt Turner
2021-05-08 13:03 Andreas K. Hüttel
2020-05-12 18:02 Kent Fredric
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1751286185.2a7a49ce39447bf4a7effed3d38ec525f8d7cc4d.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox