Bug 37087 - java/jdk13 build fails after upgrading gettext
Summary: java/jdk13 build fails after upgrading gettext
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Greg Lewis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-15 07:20 UTC by Herbert J. Skuhra
Modified: 2002-05-03 06:37 UTC (History)
0 users

See Also:


Attachments
patch-aa (10.96 KB, text/plain; charset=iso-8859-1)
2002-04-27 01:33 UTC, marius
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Herbert J. Skuhra 2002-04-15 07:20:01 UTC
After upgrading gettext two days ago, I have now problems to rebuild
java/jdk13:

i386 Build finished:   1.3.1-p6-herbert-020414-12:04
i386 Build finished:   1.3.1-p6-herbert-020414-12:04

Fix: 

Sorry guys, no idea at the moment!
But someone mentioned on the freebsd-java list that jdk13 builds fine, when devel/gettext-old (instead of gettext) is installed.
How-To-Repeat: Update devel/gettext and try to build java/jdk13... :)
Comment 1 Ernst de Haan freebsd_committer freebsd_triage 2002-04-15 22:04:08 UTC
Responsible Changed
From-To: freebsd-ports->glewis

Over to maintainer.
Comment 2 kanou 2002-04-16 19:04:38 UTC
How about this patch?  This will remove duplicate message definitions.

--- jdk13.orig/Makefile	Tue Apr 16 17:02:31 2002
+++ jdk13/Makefile	Wed Apr 17 02:46:29 2002
@@ -87,6 +87,14 @@
 IGNORE=		"You can not legally distribute pre-compiled binaries"
 .endif
 
+.if !defined(WITHOUT_PLUGIN)
+RESOURCEDIR=	work/j2sdk1.3.1/ext/plugin/oji-plugin/src/motif/resources/
+DUPLICATE_LOCALES=	ja ko ko.UTF-8 sv zh zh.GBK zh_TW zh_TW.BIG5 
+.for locale in ${DUPLICATE_LOCALES}
+RESOURCEFILES+=	${RESOURCEDIR}/${locale}/sunw_java_plugin.po
+.endfor
+.endif
+
 .include <bsd.port.pre.mk>
 
 .for file in ${DISTFILES}
@@ -108,6 +116,15 @@
 		${MKDIR} -p hotspot1.3.1/src/os/bsd/vm && \
 		${MKDIR} -p hotspot1.3.1/src/os_cpu/bsd_i486/vm && \
 			${PATCH} < ${WRKDIR}/jdk131.patches
+
+.if !defined(WITHOUT_PLUGIN)
+post-extract:
+.for file in ${RESOURCEFILES}
+	# Remove duplicate message definitions
+	${PERL} -ni.bak -e \
+		'/^msgid/?$$USED{$$_}?<>:($$USED{$$_}=1,print):print' ${file}
+.endfor
+.endif
 
 post-build:
 	# Prune empty dirs

<<< end of patch >>>

A perl code included in the patch is a compressed form of following one:
----------------------------------------------------------------
while (<>) {		# -n option implies this loop
	if (/^msgid/) {
		if ($USED{$_}) {
			<>;		# supress output and ignore following line
		} else {
			$USED{$_} = 1;
			print;
		}
	} else {
		print;
	}
}
----------------------------------------------------------------

KANOU Hiroki <kanou@mil.allnet.ne.jp>
Comment 3 marius 2002-04-27 01:33:09 UTC
why not directly patch the affected files ?

the patch would be also available at
ftp://alchemy.franken.de/pub/misc/patch-aa
in case it gets crippled via mail.


marius
Comment 4 Greg Lewis freebsd_committer freebsd_triage 2002-05-03 06:36:38 UTC
State Changed
From-To: open->closed

Fix committed, thanks for all the input!