www/mod_maxminddb: Fix dynamic link error with libmaxminddb.so

The module wasn't linked correctly with libmaxminddb.so when
using `AP_FAST_BUILD`, because of not having correct ld-flags.
Switch to default build (with a patch) solves the problem.

Reported by:	ler
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Mahdi Mokhtari 2019-02-09 13:36:06 +00:00
parent aa5cd733db
commit a484edaf33
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=492497
3 changed files with 14 additions and 6 deletions

View file

@ -2,6 +2,7 @@
PORTNAME= mod_maxminddb
PORTVERSION= 1.1.0
PORTREVISION= 1
CATEGORIES= www
PKGNAMEPREFIX= ${APACHE_PKGNAMEPREFIX}
@ -18,8 +19,10 @@ GNU_CONFIGURE= yes
USE_GITHUB= yes
GH_ACCOUNT= maxmind
AP_FAST_BUILD= yes
AP_GENPLIST= yes
SRC_FILE= src/${PORTNAME}.c
post-patch:
@${REINPLACE_CMD} -e 's|%%LIBEXECDEST%%|${STAGEDIR}${PREFIX}/${APACHEMODDIR}|g' ${WRKSRC}/src/Makefile.am
pre-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/${APACHEMODDIR}
.include <bsd.port.mk>

View file

@ -1,6 +1,6 @@
--- src/Makefile.am.orig 2019-01-19 16:36:41 UTC
--- src/Makefile.am.orig 2016-10-19 20:07:32 UTC
+++ src/Makefile.am
@@ -1,12 +1,13 @@
@@ -1,15 +1,16 @@
AUTOMAKE_OPTIONS = foreign
WC=-Wc,"$(CFLAGS)"
+WL=-Wl,"$(LDFLAGS)"
@ -14,4 +14,8 @@
+ $(APXS) -c $(WL) $(LIBMAXMINDDB_LDFLAGS) $(LIBS) $(WC) $(APXS_LDFLAGS) mod_maxminddb.c
install-exec-local: module
$(APXS) -i -a -n maxminddb .libs/mod_maxminddb.so
- $(APXS) -i -a -n maxminddb .libs/mod_maxminddb.so
+ $(APXS) -S LIBEXECDIR=%%LIBEXECDEST%% -i -a -n maxminddb mod_maxminddb.la ### maxminddb .libs/mod_maxminddb.so
CLEANFILES= *.la *.lo *.o *.so *.slo .libs/*

View file

@ -0,0 +1 @@
%%APACHEMODDIR%%/%%AP_MODULE%%