summaryrefslogtreecommitdiff
path: root/www/mod_accounting
diff options
context:
space:
mode:
authorOliver Lehmann <oliver@FreeBSD.org>2003-07-25 17:19:36 +0000
committerOliver Lehmann <oliver@FreeBSD.org>2003-07-25 17:19:36 +0000
commit1fe14e49778b56222ceeff223e9b603e4e4634da (patch)
treee55a445edf91761805e233503876a16682b4185d /www/mod_accounting
parent- fix for CURRENT (diff)
add support for MySQL 4.0 and 4.1
Submitted by: Jeremy Chadwick <freebsd@jdc.parodius.com>, maintainer, oliver Approved by: maintainer
Notes
Notes: svn path=/head/; revision=85586
Diffstat (limited to 'www/mod_accounting')
-rw-r--r--www/mod_accounting/Makefile42
1 files changed, 33 insertions, 9 deletions
diff --git a/www/mod_accounting/Makefile b/www/mod_accounting/Makefile
index f15ddf6da446..b26599f5ed64 100644
--- a/www/mod_accounting/Makefile
+++ b/www/mod_accounting/Makefile
@@ -19,6 +19,26 @@ BUILD_DEPENDS+= ${LOCALBASE}/sbin/apxs:${PORTSDIR}/www/apache13
MAKE_ARGS+= APXS="${APXS}"
APXS?= ${LOCALBASE}/sbin/apxs
+# MySQL deps hack
+MYSQL323_LIBVER=10
+MYSQL40_LIBVER= 12
+MYSQL41_LIBVER= 14
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_MYSQL_VER)
+MYSQL_VER= ${WITH_MYSQL_VER}
+.elif exists(${LOCALBASE}/lib/mysql/libmysqlclient.so.${MYSQL_323_LIBVER})
+MYSQL_VER= 323
+.elif exists(${LOCALBASE}/lib/mysql/libmysqlclient.so.${MYSQL40_LIBVER})
+MYSQL_VER= 40
+.elif exists(${LOCALBASE}/lib/mysql/libmysqlclient.so.${MYSQL41_LIBVER})
+MYSQL_VER= 41
+.else
+MYSQL_VER= 323
+.endif
+
+
.if defined(WITHOUT_PGSQL)
MAKE_ARGS+= WITHOUT_PGSQL=YES
.else
@@ -28,16 +48,20 @@ LIB_DEPENDS+= pq.3:${PORTSDIR}/databases/postgresql7
.if defined(WITHOUT_MYSQL)
MAKE_ARGS+= WITHOUT_MYSQL=YES
.else
-LIB_DEPENDS+= mysqlclient.10:${PORTSDIR}/databases/mysql323-client
+LIB_DEPENDS+= mysqlclient.${MYSQL${MYSQL_VER}_LIBVER}:${PORTSDIR}/databases/mysql${MYSQL_VER}-client
.endif
-pre-everything:
- @${ECHO} "*-----------------------------------------*"
- @${ECHO} "To disable MySQL support just define :"
- @${ECHO} " WITHOUT_MYSQL=YES"
- @${ECHO} "To disable PostgreSQL support just define :"
- @${ECHO} " WITHOUT_PGSQL=YES"
- @${ECHO} "*-----------------------------------------*"
+pre-everything::
+ @${ECHO} ""
+ @${ECHO} "You may use the following build options:"
+ @${ECHO} ""
+ @${ECHO} " WITH_MYSQL_VER=323 Enable MySQL 3.23 support (default)"
+ @${ECHO} " WITH_MYSQL_VER=40 Enable MySQL 4.0 support"
+ @${ECHO} " WITH_MYSQL_VER=41 Enable MySQL 4.1 support"
+ @${ECHO} ""
+ @${ECHO} " WITHOUT_MYSQL Disable MySQL support"
+ @${ECHO} " WITHOUT_PGSQL Disable PostgreSQL support"
+ @${ECHO} ""
post-install:
@${MKDIR} ${PREFIX}/share/${PORTNAME}
@@ -50,4 +74,4 @@ post-install:
.endif
@${CAT} ${PKGMESSAGE}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>