aboutsummaryrefslogtreecommitdiffstats
path: root/www/mod_accounting/Makefile
diff options
context:
space:
mode:
authoroliver <oliver@FreeBSD.org>2003-07-26 01:19:36 +0800
committeroliver <oliver@FreeBSD.org>2003-07-26 01:19:36 +0800
commit29fc13596f9f534ee2a3a5dc90bd04df75a4c3ff (patch)
tree3b8e9ddad1f85bc0f3a0f14d70be523c7bf7cacd /www/mod_accounting/Makefile
parent80cc3447b5ae0a1e162ed8eaf68c3433fecc795e (diff)
downloadfreebsd-ports-gnome-29fc13596f9f534ee2a3a5dc90bd04df75a4c3ff.tar.gz
freebsd-ports-gnome-29fc13596f9f534ee2a3a5dc90bd04df75a4c3ff.tar.zst
freebsd-ports-gnome-29fc13596f9f534ee2a3a5dc90bd04df75a4c3ff.zip
add support for MySQL 4.0 and 4.1
Submitted by: Jeremy Chadwick <freebsd@jdc.parodius.com>, maintainer, oliver Approved by: maintainer
Diffstat (limited to 'www/mod_accounting/Makefile')
-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>