aboutsummaryrefslogtreecommitdiffstats
path: root/databases
diff options
context:
space:
mode:
authorjgh <jgh@FreeBSD.org>2012-03-24 01:08:20 +0800
committerjgh <jgh@FreeBSD.org>2012-03-24 01:08:20 +0800
commit0afa22fcf845004efd2f5657b519292a083f1628 (patch)
tree09093c2de4e920bca89e36ed148ee298c941229e /databases
parent6fa46b8c28e7d043f72b25e50e85a410b4c1efcc (diff)
downloadfreebsd-ports-gnome-0afa22fcf845004efd2f5657b519292a083f1628.tar.gz
freebsd-ports-gnome-0afa22fcf845004efd2f5657b519292a083f1628.tar.zst
freebsd-ports-gnome-0afa22fcf845004efd2f5657b519292a083f1628.zip
- add option in for xls report tuning
- while here remove a .orig file from pkg-plist, and tune cleanup of .orig's By default, excel export prints all pages into a single excel sheet. This patch allows to have each page show up as a separate sheet in excel. Since the default export prints all pages into a single sheet, certain fields are removed: pageHeader, pageFooter, columnHeader, columnFooter This patch will put one page per sheet, and keep fields intact on each page. Sponsored by: Experts Exchange, LLC. Submitted by: jan@experts-exchange.com (email) Approved by: jgh@ Feature safe: yes
Diffstat (limited to 'databases')
-rw-r--r--databases/jasperserver/Makefile18
-rw-r--r--databases/jasperserver/files/alt-patch-jasperserver__common__shared-config__applicationContext.xml29
-rw-r--r--databases/jasperserver/files/alt-patch-jasperserver__jasperserver-war__src__main__webappAdditions__WEB-INF__classes__jasperreports.properties17
-rw-r--r--databases/jasperserver/pkg-plist1
4 files changed, 59 insertions, 6 deletions
diff --git a/databases/jasperserver/Makefile b/databases/jasperserver/Makefile
index e92e7a1c03aa..9204ef2d7ec7 100644
--- a/databases/jasperserver/Makefile
+++ b/databases/jasperserver/Makefile
@@ -46,7 +46,9 @@ 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
+ POSTGRESQL "Enable PostgreSQL 9.x support" on \
+ XLS "Alternative Patches for XLS Spreadsheets" off
+
REPLACE_FILES= ${JS}/jasperserver-war/src/main/webappAdditions/WEB-INF/web.xml
REPLACE_LIST_TEMP= ${SUB_LIST:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/}
@@ -174,11 +176,17 @@ post-patch:
@${ECHO_MSG} -n ">> Customizing `basename ${file}`..."
@${SED} ${REPLACE_LIST_TEMP} ${file} > ${WRKDIR}/`basename ${file}`
@${ECHO_MSG} " [ DONE ]"
- @( if [ -f ${JS}/jasperserver-war/src/main/webappAdditions/WEB-INF/web.xml.orig ] ; then \
- ${RM} ${JS}/jasperserver-war/src/main/webappAdditions/WEB-INF/web.xml.orig ; \
- else ${FALSE}; \
- fi )
.endfor
+.if defined(WITH_XLS)
+ @${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
+.endif
+
+post-patch-script:
+ @${ECHO_MSG} -n ">> Removing unneeded patched files..."
+ @${FIND} ${WRKDIR} -type f \( -name '*.orig' \) -delete
+ @${ECHO_MSG} " [ DONE ]"
post-extract-script:
@${LN} -fs ${WRKDIR}/.m2 ~/.m2 && ${UNZIP_CMD} -qq ${DISTDIR}/${JSMAVENARCH} -d ${WRKDIR}/.m2
diff --git a/databases/jasperserver/files/alt-patch-jasperserver__common__shared-config__applicationContext.xml b/databases/jasperserver/files/alt-patch-jasperserver__common__shared-config__applicationContext.xml
new file mode 100644
index 000000000000..12438e9ec3b9
--- /dev/null
+++ b/databases/jasperserver/files/alt-patch-jasperserver__common__shared-config__applicationContext.xml
@@ -0,0 +1,29 @@
+--- ./jasperserver/common/shared-config/applicationContext.xml.orig 2012-03-22 12:35:55.000000000 -0700
++++ ./jasperserver/common/shared-config/applicationContext.xml 2012-03-22 12:36:00.000000000 -0700
+@@ -1092,14 +1092,14 @@
+
+ <bean id="xlsExportParameters" class="com.jaspersoft.jasperserver.api.engine.jasperreports.common.XlsExportParametersBean">
+ <property name="detectCellType" value="true"/>
+- <property name="onePagePerSheet" value="false"/>
+- <property name="removeEmptySpaceBetweenRows" value="true"/>
++ <property name="onePagePerSheet" value="true"/>
++ <property name="removeEmptySpaceBetweenRows" value="false"/>
+ <property name="removeEmptySpaceBetweenColumns" value="true"/>
+ <property name="whitePageBackground" value="false"/>
+ <property name="ignoreGraphics" value="true"/>
+ <property name="collapseRowSpan" value="true"/>
+ <property name="ignoreCellBorder" value="true"/>
+- <property name="fontSizeFixEnabled" value="true"/>
++ <property name="fontSizeFixEnabled" value="false"/>
+ <property name="maximumRowsPerSheet" value="0"/>
+ <property name="xlsFormatPatternsMap" ref="formatPatternsMap"/>
+ </bean>
+@@ -1124,6 +1124,8 @@
+
+ <util:map id="formatPatternsMap">
+ <!-- entry key="ยค #,##0.00" value="$ #,##0.00"/-->
++ <entry key="" value="0"/>
++ <entry key="M/d/yyyy h:mm aa" value="m/d/yyyy h:mm"/>
+ </util:map>
+
+ <!-- end export parameters -->
diff --git a/databases/jasperserver/files/alt-patch-jasperserver__jasperserver-war__src__main__webappAdditions__WEB-INF__classes__jasperreports.properties b/databases/jasperserver/files/alt-patch-jasperserver__jasperserver-war__src__main__webappAdditions__WEB-INF__classes__jasperreports.properties
new file mode 100644
index 000000000000..479fd409c8cf
--- /dev/null
+++ b/databases/jasperserver/files/alt-patch-jasperserver__jasperserver-war__src__main__webappAdditions__WEB-INF__classes__jasperreports.properties
@@ -0,0 +1,17 @@
+--- ./jasperserver/jasperserver-war/src/main/webappAdditions/WEB-INF/classes/jasperreports.properties.orig 2012-03-22 12:38:28.000000000 -0700
++++ ./jasperserver/jasperserver-war/src/main/webappAdditions/WEB-INF/classes/jasperreports.properties 2012-03-22 12:39:04.000000000 -0700
+@@ -5,10 +5,10 @@
+ net.sf.jasperreports.crosstab.bucket.measure.limit=100000
+
+ #suppress page and column footers and all but the first page and column headers when exporting to XLS
+-net.sf.jasperreports.export.xls.exclude.origin.keep.first.band.1=pageHeader
+-net.sf.jasperreports.export.xls.exclude.origin.band.2=pageFooter
+-net.sf.jasperreports.export.xls.exclude.origin.keep.first.band.3=columnHeader
+-net.sf.jasperreports.export.xls.exclude.origin.band.4=columnFooter
++#net.sf.jasperreports.export.xls.exclude.origin.keep.first.band.1=pageHeader
++#net.sf.jasperreports.export.xls.exclude.origin.band.2=pageFooter
++#net.sf.jasperreports.export.xls.exclude.origin.keep.first.band.3=columnHeader
++#net.sf.jasperreports.export.xls.exclude.origin.band.4=columnFooter
+
+ # report exporter hints override export parameters
+ net.sf.jasperreports.export.parameters.override.report.hints=false
diff --git a/databases/jasperserver/pkg-plist b/databases/jasperserver/pkg-plist
index 8599c046b7e1..609949b64bfb 100644
--- a/databases/jasperserver/pkg-plist
+++ b/databases/jasperserver/pkg-plist
@@ -20,7 +20,6 @@
%%APP_VERSION%%/webapps/jasperserver/WEB-INF/applicationContext-security-web.xml
%%APP_VERSION%%/webapps/jasperserver/WEB-INF/applicationContext-security.xml
%%APP_VERSION%%/webapps/jasperserver/WEB-INF/applicationContext-themes.xml
-%%APP_VERSION%%/webapps/jasperserver/WEB-INF/applicationContext-themes.xml.orig
%%APP_VERSION%%/webapps/jasperserver/WEB-INF/applicationContext-web-services.xml
%%APP_VERSION%%/webapps/jasperserver/WEB-INF/applicationContext-webHelp.xml
%%APP_VERSION%%/webapps/jasperserver/WEB-INF/applicationContext-webapp.xml