aboutsummaryrefslogtreecommitdiffstats
path: root/databases
diff options
context:
space:
mode:
authorjgh <jgh@FreeBSD.org>2012-08-03 13:08:00 +0800
committerjgh <jgh@FreeBSD.org>2012-08-03 13:08:00 +0800
commit31889d55a60ae0c9e6a6d557fa797f0c912a655d (patch)
tree0280d180f936cb5d5ca4e564e4c970469793e522 /databases
parenteab5af75b725f5df5ee119bde1cebb5628c26efb (diff)
downloadfreebsd-ports-gnome-31889d55a60ae0c9e6a6d557fa797f0c912a655d.tar.gz
freebsd-ports-gnome-31889d55a60ae0c9e6a6d557fa797f0c912a655d.tar.zst
freebsd-ports-gnome-31889d55a60ae0c9e6a6d557fa797f0c912a655d.zip
- adopt optionsNG
- pet portlint
Diffstat (limited to 'databases')
-rw-r--r--databases/jasperserver/Makefile50
1 files changed, 17 insertions, 33 deletions
diff --git a/databases/jasperserver/Makefile b/databases/jasperserver/Makefile
index 9204ef2d7ec7..c2270dd872d9 100644
--- a/databases/jasperserver/Makefile
+++ b/databases/jasperserver/Makefile
@@ -42,13 +42,12 @@ USE_ZIP= yes
# use own DOS2UNIX in pre-patch, not the one from bsd.port.mk!
DOS2UNIX_REGEX= .*(css|dtd|java|js|txt|wsdd|xml|xsl)$$
-OPTIONS= TOMCAT5 "Enable Tomcat 5.x support" off \
- TOMCAT6 "Enable Tomcat 6.x support" on \
- TOMCAT7 "Enable Tomcat 7.x support" off \
- MYSQL "Enable Mysql 5.x support" off \
- POSTGRESQL "Enable PostgreSQL 9.x support" on \
- XLS "Alternative Patches for XLS Spreadsheets" off
-
+OPTIONS_DEFINE= XLS
+XLS_DESC= Alternative Patches for XLS Spreadsheets
+OPTIONS_SINGLE= AS DB
+OPTIONS_SINGLE_AS= TOMCAT5 TOMCAT6 TOMCAT7
+OPTIONS_SINGLE_DB= MYSQL PGSQL
+OPTIONS_DEFAULT= TOMCAT6 PGSQL
REPLACE_FILES= ${JS}/jasperserver-war/src/main/webappAdditions/WEB-INF/web.xml
REPLACE_LIST_TEMP= ${SUB_LIST:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/}
@@ -72,18 +71,18 @@ PLIST_SUB= DATABASE=${DATABASE} \
.include <bsd.port.options.mk>
-.if defined(WITH_MYSQL)
+.if ${PORT_OPTIONS:MMYSQL}
WANT_MYSQL_VER= 55
DBUSER?= root
DBPASS?=
DATABASE= mysql
RUN_DEPENDS+= ${JAVAJARDIR}/mysql-connector-java.jar:${PORTSDIR}/databases/mysql-connector-java
-BUILD_DEPENDS+= ${JAVAJARDIR}/mysql-connector-java.jar:${PORTSDIR}/databases/mysql-connector-java
+BUILD_DEPENDS+= ${JAVAJARDIR}/mysql-connector-java.jar:${PORTSDIR}/databases/mysql-connector-java
PLIST_SUB+= JDBC="mysql-connector-java.jar"
.endif
#use version 90, application is certified w/ pg90
-.if defined(WITH_POSTGRESQL)
+.if ${PORT_OPTIONS:MPGSQL}
WANT_PGSQL_VER= 90
JDBC= postgresql-9.0-802.jdbc4.jar
DISTFILES+= postgresql-9.0-802.jdbc4.jar:source2
@@ -95,7 +94,7 @@ PLIST_SUB+= JDBC=${JDBC}
MASTER_SITES+= http://jdbc.postgresql.org/download/:source2
.endif
-.if defined(WITH_TOMCAT5)
+.if ${PORT_OPTIONS:MTOMCAT5}
APPHOME?= ${LOCALBASE}/tomcat5.5
BUILD_DEPENDS+= ${APPHOME}/bin/bootstrap.jar:${PORTSDIR}/www/tomcat55
RUN_DEPENDS+= ${APPHOME}/bin/bootstrap.jar:${PORTSDIR}/www/tomcat55
@@ -104,7 +103,7 @@ PLIST_SUB+= APP_VERSION="tomcat5.5"
JDBCLOC= common/lib
.endif
-.if defined(WITH_TOMCAT6)
+.if ${PORT_OPTIONS:MTOMCAT6}
APPHOME?= ${LOCALBASE}/apache-tomcat-6.0
BUILD_DEPENDS+= ${APPHOME}/bin/bootstrap.jar:${PORTSDIR}/www/tomcat6
RUN_DEPENDS+= ${APPHOME}/bin/bootstrap.jar:${PORTSDIR}/www/tomcat6
@@ -113,7 +112,7 @@ PLIST_SUB+= APP_VERSION="apache-tomcat-6.0"
JDBCLOC= lib
.endif
-.if defined(WITH_TOMCAT7)
+.if ${PORT_OPTIONS:MTOMCAT7}
APPHOME?= ${LOCALBASE}/apache-tomcat-7.0
BUILD_DEPENDS+= ${APPHOME}/bin/bootstrap.jar:${PORTSDIR}/www/tomcat7
RUN_DEPENDS+= ${APPHOME}/bin/bootstrap.jar:${PORTSDIR}/www/tomcat7
@@ -139,21 +138,6 @@ JSMAILPROTO?= smtp
JSMAILPORT?= 25
JSTIMEOUT?= 20
-check-sanity:
-.if ( defined(WITH_TOMCAT5) && defined(WITH_TOMCAT6) )
-IGNORE= you can only define one application server
-.elif ( defined(WITH_TOMCAT5) && defined(WITH_TOMCAT7) )
-IGNORE= you can only define one application server
-.elif ( defined(WITH_TOMCAT6) && defined(WITH_TOMCAT7) )
-IGNORE= you can only define one application server
-.elif ( !defined(APPHOME) )
-IGNORE= choose at least one application server
-.elif ( defined(WITH_MYSQL) && defined(WITH_POSTGRESQL) )
-IGNORE= you can only define one database
-.elif ( !defined(WITH_MYSQL) && !defined(WITH_POSTGRESQL) )
-IGNORE= choose at least one database
-.endif
-
pre-fetch:
# show the update warning before we fetch ~400MB sources
@${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL
@@ -177,7 +161,7 @@ post-patch:
@${SED} ${REPLACE_LIST_TEMP} ${file} > ${WRKDIR}/`basename ${file}`
@${ECHO_MSG} " [ DONE ]"
.endfor
-.if defined(WITH_XLS)
+.if ${PORT_OPTIONS:MXLS}
@${ECHO} "Applying alternative patches for Xls."
@cd ${PATCH_WRKSRC} && ${PATCH} --quiet < ${FILESDIR}/alt-patch-jasperserver__common__shared-config__applicationContext.xml
@cd ${PATCH_WRKSRC} && ${PATCH} --quiet < ${FILESDIR}/alt-patch-jasperserver__jasperserver-war__src__main__webappAdditions__WEB-INF__classes__jasperreports.properties
@@ -204,7 +188,7 @@ pre-build:
${ECHO} "maven = ${JAVASHAREDIR}/maven2/bin/mvn" >> ${APP_PROPERTIES} ; \
else ${FALSE}; \
fi )
-.if !defined(WITH_POSTGRESQL)
+.if ${PORT_OPTIONS:MMYSQL}
@${ECHO} "maven.jdbc.groupId = mysql" >> ${APP_PROPERTIES}
@${ECHO} "maven.jdbc.version = 5.1.17-bin" >> ${APP_PROPERTIES}
@${ECHO} "maven.jdbc.artifactId = mysql-connector-java" >> ${APP_PROPERTIES}
@@ -213,7 +197,7 @@ pre-build:
@${ECHO} "js-pro-path = ${JS}" >> ${APP_PROPERTIES}
@${ECHO} "repo-path = ${JSREPO}" >> ${APP_PROPERTIES}
-.if defined(WITH_MYSQL)
+.if ${PORT_OPTIONS:MMYSQL}
${LN} -s ${JAVAJARDIR}/mysql-connector-java.jar ${SRCDIR}/${PORTNAME}/buildomatic/conf_source/db/mysql/jdbc/mysql-connector-java-5.1.17-bin.jar
.endif
@@ -224,7 +208,7 @@ do-build:
@( ${CP} ${WRKDIR}/web.xml ${JS}/jasperserver-war/src/main/webappAdditions/WEB-INF/web.xml )
@( cd ${WRKSRC} && ./js-ant build-ce )
-.if !defined(WITH_POSTGRESQL)
+.if empty(PORT_OPTIONS:MPGSQL)
@${ECHO} "quartz.delegateClass=org.quartz.impl.jdbcjobstore.StdJDBCDelegate" > ${QTZ_PROPERTIES}
.else
@${ECHO} "quartz.delegateClass=org.quartz.impl.jdbcjobstore.PostgreSQLDelegate" > ${QTZ_PROPERTIES}
@@ -252,7 +236,7 @@ do-install:
@${INSTALL} -m 440 ${QTZ_PROPERTIES} ${JSHOME}/WEB-INF/
#removed shipped driver from vendor
-.if !defined(WITH_MYSQL)
+.if empty(PORT_OPTIONS:MMYSQL)
${INSTALL_DATA} ${DISTDIR}/${JDBC} ${APPHOME}/${JDBCLOC}
@${RM} ${APPHOME}/${JDBCLOC}/postgresql-9.0-801.jdbc3.jar
.else