commit:     41a142b4a90546124996e732aa305b3984b6189b
Author:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 12 20:59:25 2021 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Tue Oct 12 20:59:41 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=41a142b4

www-apache/mod_jk: fix linker

Build systems passes CFLAGS to linker and prefixes them all with '-Wl,'
which will always cause the linker to fail with unknown options.

Closes: https://bugs.gentoo.org/817896
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 www-apache/mod_jk/mod_jk-1.2.48.ebuild | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/www-apache/mod_jk/mod_jk-1.2.48.ebuild 
b/www-apache/mod_jk/mod_jk-1.2.48.ebuild
index f84c81d573c..f731284a89e 100644
--- a/www-apache/mod_jk/mod_jk-1.2.48.ebuild
+++ b/www-apache/mod_jk/mod_jk-1.2.48.ebuild
@@ -5,7 +5,7 @@ EAPI=7
 
 MY_P="tomcat-connectors-${PV#-*}-src"
 
-inherit apache-module
+inherit apache-module autotools
 
 DESCRIPTION="Provides an AJP Apache2-JK-connector for the Tomcat servlet 
engine"
 HOMEPAGE="https://tomcat.apache.org/connectors-doc/";
@@ -36,6 +36,10 @@ pkg_setup() {
 src_prepare() {
        default
 
+       # Don't add '-Wl,' as prefix for CFLAGS, as linker will fail
+       sed -e '/JK_PREFIX_IF_MISSING/d' -i configure.ac || die
+       eautoreconf
+
        # Adjust confpath and logpath for Gentoo
        local logs_path="/var/log/apache2"
        sed -e "s|conf|${APACHE_CONFDIR}|g" -e "s|logs|${logs_path}|g" -i 
../conf/httpd-jk.conf || die

Reply via email to