Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Dec 2011 10:39:04 -0800
From:      Jason Helfman <jhelfman@experts-exchange.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        jilles@stack.nl, jkim@FreeBSD.org
Subject:   java/163456: [patch] java/openjdk6: build and distribute open timezone data (tzdata)
Message-ID:  <1324319944.277110.72549.nullmailer@experts-exchange.com>
Resent-Message-ID: <201112191840.pBJIe5RF029527@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         163456
>Category:       java
>Synopsis:       [patch] java/openjdk6: build and distribute open timezone data (tzdata)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-java
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 19 18:40:05 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Jason Helfman
>Release:        FreeBSD 8.2-RELEASE amd64
>Organization:
Experts Exchange, LLC.
>Environment:
System: FreeBSD dormouse.experts-exchange.com 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Thu Feb 17 02:41:51 UTC 2011 root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64


	
>Description:
Timezone data hasn't been updated since 2010 in OpenJDK. This patch downloads open timezone data, uses the built java tool
javazic.jar to translate files so java may use them, and distributes into the correct location.

Builds cleanly in Tinderbox => http://jgh.devio.us/files/logs/openjdk6-b24_1.log.gz

This patch encapsulates the spirit of ports/161945, and potentially could be seen as a duplicate if compilefontconfig.jar
were copied into ${PREFIX}/openjdk6/jre/lib/

>How-To-Repeat:
	
>Fix:

Index: Makefile
===================================================================
RCS file: /home/jhelfman/ncvs/ports/java/openjdk6/Makefile,v
retrieving revision 1.53
diff -u -r1.53 Makefile
--- Makefile	30 Nov 2011 21:18:29 -0000	1.53
+++ Makefile	19 Dec 2011 17:21:17 -0000
@@ -7,6 +7,7 @@
 
 PORTNAME=	openjdk6
 PORTVERSION=	b24
+PORTREVISION=	1
 CATEGORIES=	java devel
 MASTER_SITES=	http://download.java.net/openjdk/jdk6/promoted/${PORTVERSION}/ \
 		http://download.java.net/jaxp/openjdk/jdk6/:jaxp \
@@ -17,13 +18,16 @@
 		http://icedtea.classpath.org/download/drops/:jaxws \
 		http://icedtea.classpath.org/download/drops/:jaf \
 		${MASTER_SITE_APACHE:S,%SUBDIR%/,ant/binaries/:ant,} \
-		http://download.java.net/openjdk/jtreg/promoted/4.1/${JTREGVERSION}/:jtreg
+		http://download.java.net/openjdk/jtreg/promoted/4.1/${JTREGVERSION}/:jtreg \
+		ftp://ftp.iana.org/tz/releases/:tzdata \
+		http://www.iana.org/time-zones/repository/releases/:tzdata
 DISTNAME=	openjdk-6-src-${PORTVERSION}-${OPENJDK_BUILDDATE}
 DISTFILES=	${DISTNAME}${EXTRACT_SUFX} \
 		${JAXPFILE}:jaxp \
 		${JAXWSFILE}:jaxws \
 		${JAFFILE}:jaf \
-		${ANTFILE}:ant
+		${ANTFILE}:ant \
+		${TZDATAFILE}:tzdata
 EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX} ${ANTFILE}
 
 MAINTAINER=	java@FreeBSD.org
@@ -64,6 +68,8 @@
 JAFFILE=	jdk6-jaf-${JAF_BUILD}.zip
 JTREGVERSION=	b03
 JTREGFILE=	jtreg-4.1-bin-${JTREGVERSION}_11_jul_2011.zip
+TZDATA_BUILD=	2011n
+TZDATAFILE=	tzdata${TZDATA_BUILD}${EXTRACT_SUFX}
 
 # do not depend on devel/apache-ant to avoid circular dependency, but
 # use .tar.bz2 distfile to avoid duplicated downloads
@@ -258,6 +264,24 @@
 	@${ECHO_MSG} ""
 .endif
 
+post-build-script:
+	@${ECHO_MSG} "Building new timezone data..."
+	@${RM} -rf ${WRKSRC}/build/${OPENJDK_OSARCH}/lib/zi/*
+	@${MKDIR} ${WRKSRC}/${TZDATA_BUILD} && ${TAR} xf ${DISTDIR}/${TZDATAFILE} -C ${WRKSRC}/${TZDATA_BUILD}
+	cd ${WRKSRC}/${TZDATA_BUILD} && ${WRKSRC}/build/${OPENJDK_OSARCH}/bin/java -jar \
+                ${WRKSRC}/build/${OPENJDK_OSARCH}/btjars/javazic.jar -V ${TZDATA_BUILD} \
+                -d  ${WRKSRC}/build/${OPENJDK_OSARCH}/lib/zi/ \
+                africa \
+                antarctica \
+                asia \
+                australasia \
+                etcetera \
+                europe \
+                factory \
+                northamerica \
+                southamerica \
+                systemv 2>/dev/null
+
 do-install:
 	@${MKDIR} ${PREFIX}/openjdk6/
 	@${CP} -Rp ${WRKSRC}/build/${OPENJDK_OSARCH}/j2sdk-image/ ${PREFIX}/openjdk6/
Index: distinfo
===================================================================
RCS file: /home/jhelfman/ncvs/ports/java/openjdk6/distinfo,v
retrieving revision 1.25
diff -u -r1.25 distinfo
--- distinfo	30 Nov 2011 21:18:29 -0000	1.25
+++ distinfo	19 Dec 2011 06:43:20 -0000
@@ -8,5 +8,5 @@
 SIZE (jdk6-jaf-b20.zip) = 71243
 SHA256 (apache-ant-1.8.2-bin.tar.bz2) = ecb49f5017807c9320bf19702149328cf4779a01bddca2b6c47e3ebb0e39c9c7
 SIZE (apache-ant-1.8.2-bin.tar.bz2) = 6740047
-SHA256 (jtreg-4.1-bin-b03_11_jul_2011.zip) = 7ae38e80d3342670cc9142eee423d0a755bf005e4d83b40c5681f0f7d95f1cce
-SIZE (jtreg-4.1-bin-b03_11_jul_2011.zip) = 4901245
+SHA256 (tzdata2011n.tar.gz) = a343e542486b2b8ebdeca474eed79f1c04f69420ca943c2b9bdea1d2385e38cd
+SIZE (tzdata2011n.tar.gz) = 204684
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1324319944.277110.72549.nullmailer>