aboutsummaryrefslogtreecommitdiffstats
path: root/www/apache2
diff options
context:
space:
mode:
authorclement <clement@FreeBSD.org>2004-07-11 17:43:17 +0800
committerclement <clement@FreeBSD.org>2004-07-11 17:43:17 +0800
commit29d08fe63964f76ba0aa6bcc6370342f0efb1a1c (patch)
treecf3bf4fd923822ab161a212d8ed0a8444047ded6 /www/apache2
parentc8e2732353ce4be15d9e5d9a241eac38884442d8 (diff)
downloadfreebsd-ports-gnome-29d08fe63964f76ba0aa6bcc6370342f0efb1a1c.tar.gz
freebsd-ports-gnome-29d08fe63964f76ba0aa6bcc6370342f0efb1a1c.tar.zst
freebsd-ports-gnome-29d08fe63964f76ba0aa6bcc6370342f0efb1a1c.zip
- Improve plist generation.
It fixes problems when you deinstall a port with $PREFIX != $(apxs -q prefix). Now plist is aware of real location of apache module.
Diffstat (limited to 'www/apache2')
-rw-r--r--www/apache2/Makefile.modules.3rd13
1 files changed, 12 insertions, 1 deletions
diff --git a/www/apache2/Makefile.modules.3rd b/www/apache2/Makefile.modules.3rd
index 9e3a5700c2e5..b73c7018e9b3 100644
--- a/www/apache2/Makefile.modules.3rd
+++ b/www/apache2/Makefile.modules.3rd
@@ -79,17 +79,28 @@ AP_EXTRAS+= -I ${AP_INC}
AP_EXTRAS+= -L ${AP_LIB}
.endif
+.if exists(${APXS})
+APXS_PREFIX!= ${APXS} -q prefix
+.else
+APXS_PREFIX= ${APXS:S/\/sbin\/apxs//}
+.endif
+
.if defined(AP_FAST_BUILD)
ap-gen-plist:
.if defined(AP_GENPLIST)
+. if !exists(${PLIST})
@${ECHO} "===> Generating apache plist"
- @${ECHO} "@unexec %D/sbin/apxs -e -A -n %%AP_NAME%% %D/%%APACHEMODDIR%%/%%AP_MODULE%%" > ${PLIST}
+ @${ECHO} "@cwd ${APXS_PREFIX}" > ${PLIST}
+ @${ECHO} "@unexec %D/sbin/apxs -e -A -n %%AP_NAME%% %D/%%APACHEMODDIR%%/%%AP_MODULE%%" >> ${PLIST}
@${ECHO} "%%APACHEMODDIR%%/%%AP_MODULE%%" >> ${PLIST}
@${ECHO} "@exec %D/sbin/apxs -e -A -n %%AP_NAME%% %D/%F" >> ${PLIST}
+ @${ECHO} "@cwd ${PREFIX}" >> ${PLIST}
+. endif
.else
@${DO_NADA}
.endif
+
do-build: ap-gen-plist
@cd ${WRKSRC} && ${APXS} -c ${AP_EXTRAS} -o ${MODULENAME}.${AP_BUILDEXT} ${SRC_FILE}