summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--www/mod_auth_mysql_another/Makefile11
-rw-r--r--www/mod_auth_mysql_another/files/patch-Makefile4
2 files changed, 10 insertions, 5 deletions
diff --git a/www/mod_auth_mysql_another/Makefile b/www/mod_auth_mysql_another/Makefile
index 40488a0..831c359 100644
--- a/www/mod_auth_mysql_another/Makefile
+++ b/www/mod_auth_mysql_another/Makefile
@@ -13,13 +13,13 @@ EXTRACT_SUFX= .c.gz
MAINTAINER= mbr@FreeBSD.org
-BUILD_DEPENDS= ${LOCALBASE}/sbin/apxs:${PORTSDIR}/www/${AP_PORT}
+BUILD_DEPENDS= ${PREFIX}/sbin/apxs:${PORTSDIR}/www/${AP_PORT}
LIB_DEPENDS= mysqlclient.10:${PORTSDIR}/databases/mysql323-client
-RUN_DEPENDS= ${LOCALBASE}/sbin/${AP_TARGET}:${PORTSDIR}/www/${AP_PORT}
+RUN_DEPENDS= ${PREFIX}/sbin/${AP_TARGET}:${PORTSDIR}/www/${AP_PORT}
.include <bsd.port.pre.mk>
-APXS= ${LOCALBASE}/sbin/apxs
+APXS= ${PREFIX}/sbin/apxs
AP_PORT?= apache13
.if exists(${APXS})
@@ -57,6 +57,11 @@ do-extract:
fi
.endif
+post-patch:
+ @${CP} ${WRKDIR}/mod_auth_mysql/Makefile ${WRKDIR}/mod_auth_mysql/Makefile.new
+ @${SED} -e 's|%%PREFIX%%|${PREFIX}|g' < ${WRKDIR}/mod_auth_mysql/Makefile.new \
+ > ${WRKDIR}/mod_auth_mysql/Makefile
+
post-install:
.if !defined(NOPORTDOCS)
@${MKDIR} ${PREFIX}/share/doc/${AUTH_MYSQL_DOCS}
diff --git a/www/mod_auth_mysql_another/files/patch-Makefile b/www/mod_auth_mysql_another/files/patch-Makefile
index c1eed73..7f797af 100644
--- a/www/mod_auth_mysql_another/files/patch-Makefile
+++ b/www/mod_auth_mysql_another/files/patch-Makefile
@@ -5,12 +5,12 @@
+APXSFLAGS =
+DSO = mod_auth_mysql.so
+SRCS = mod_auth_mysql.c
-+OPTS = -I/usr/local/include -L/usr/local/lib/mysql -lmysqlclient
++OPTS = -I%%PREFIX%%/include -L%%PREFIX%%/lib/mysql -lmysqlclient
+
+all: $(DSO)
+
+$(DSO): $(SRCS)
-+ $(APXS) $(APXSFLAGS) -o $(DSO) $(OPTS) -c $(SRCS)
++ $(APXS) $(APXSFLAGS) -o $(DSO) $(OPTS) -c $(SRCS) -rpath %%PREFIX%%/lib/mysql
+
+install: $(DSO)
+ $(APXS) $(APXSFLAGS) $(NAME) -i -A $(DSO)
OpenPOWER on IntegriCloud