Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Dec 2011 13:28:01 -0800
From:      jgh@FreeBSD.org
To:        Andriy Gapon <avg@FreeBSD.org>
Cc:        bug-followup@FreeBSD.org, freebsd-java@FreeBSD.org
Subject:   Re: java/163456: [patch] java/openjdk6: build and distribute open timezone data (tzdata)
Message-ID:  <20111219212801.GB24344@dormouse.experts-exchange.com>
In-Reply-To: <4EEF91DF.9090701@FreeBSD.org>
References:  <1324319944.277110.72549.nullmailer@experts-exchange.com> <201112191840.pBJIe5HB029523@freefall.freebsd.org> <20111219184422.GD53882@dormouse.experts-exchange.com> <4EEF91DF.9090701@FreeBSD.org>

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

--h31gzZEtNLTqOjlF
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Disposition: inline

On Mon, Dec 19, 2011 at 09:34:55PM +0200, Andriy Gapon thus spake:
>on 19/12/2011 20:44 Jason Helfman said the following:
>> Updated patch. jtreg was removed from distinfo
>
>Jason,
>
>I wonder if it would make sense to add a dependency on misc/zoneinfo and use
>data from there instead of separately downloading and using it.
>
>-- 
>Andriy Gapon

This wouldn't work, as java needs to prepare the files and distribute them.
I have updated the patch, and it works now. The updated zonefiles were being
clobbered. Had to move build location. Updated patch is attached.

-jgh

-- 
Jason Helfman         | FreeBSD Committer
jgh@FreeBSD.org       | http://people.freebsd.org/~jgh

8E0D C457 9A0F C91C 23F3  0454 2059 9A63 4150 D3DC

--h31gzZEtNLTqOjlF
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="openjdk.txt"

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 21:24:11 -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}/j2sdk-image/jre/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}/j2sdk-image/jre/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 18:42:09 -0000
@@ -8,5 +8,7 @@
 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 (tzdata2011n.tar.gz) = a343e542486b2b8ebdeca474eed79f1c04f69420ca943c2b9bdea1d2385e38cd
+SIZE (tzdata2011n.tar.gz) = 204684
 SHA256 (jtreg-4.1-bin-b03_11_jul_2011.zip) = 7ae38e80d3342670cc9142eee423d0a755bf005e4d83b40c5681f0f7d95f1cce
 SIZE (jtreg-4.1-bin-b03_11_jul_2011.zip) = 4901245

--h31gzZEtNLTqOjlF--



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