Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[linux-distros-dev] instructions for building icu4j 3.4.5

Hi Michael,

I finally got around to building the icu4j plugins. Part of the hold up
was that Eclipse 3.2.0 included a custom version of icu4j. This made it
difficult to get the source code in a buildable format. Eclipse 3.2.1
fixes this problem by using icu4j 3.4.5 which has been released here:

ftp://ftp.software.ibm.com/software/globalization/icu/icu4j/3.4.5/icu4jsrc_3_4_5.jar

Building icu4j is a little bit difficult because it doesn't include the
generated build.xml files which creates a circular dependency in the
build. I'm going to file a bug about this, but in the meantime I am
going add a hacked up icu4j build in the Eclipse spec file for Fedora
Eclipse. 

The attached patch adds the build.xml files and some shell snippets that
build icu4j are included below. I currently have this working with
release M20060921-0945 and I will commit this stuff to the Fedora cvs as
soon as I update one last patch - expect to see it tomorrow afternoon
sometime. Here's a link to the source zip I'm using.

http://download.eclipse.org/eclipse/downloads/drops/M20060921-0945/eclipse-sourceBuild-srcIncluded-M20060921-0945.zip

I did some smoke tests of the packages for this release and I noticed
that icu4j doesn't seem to need this patch anymore:

http://c1.complang.tuwien.ac.at/cacaowiki/EclipseIcuBug

Let me know if you have any questions.

Cheers, Ben

++

Source7:   icu4jsrc_3_4_5.jar
Patch3:    eclipse-icu4j-build-files.patch

In the %prep section I setup the build:

# setup with the icu4j plugins for building
pushd baseLocation/plugins
rm com.ibm.icu.base_3.4.5.jar \
   com.ibm.icu_3.4.5.jar \
   com.ibm.icu.base.source_3.4.5/src/com.ibm.icu.base_3.4.5/src.zip \
   com.ibm.icu.source_3.4.5/src/com.ibm.icu_3.4.5/src.zip
mkdir -p icu4j-build-temp

pushd icu4j-build-temp
unzip -qq %{SOURCE7}
sed --in-place "s/ .*bootclasspath=.*//g" build.xml
ant eclipseProjects
popd

mkdir -p icu4j-build
mv icu4j-build-temp/eclipseProjects/com.ibm.icu icu4j-build
mv icu4j-build-temp/eclipseProjects/com.ibm.icu.base icu4j-build
rm -r icu4j-build-temp

# add build.xml patches
pushd icu4j-build
%patch3 -p1
popd

popd


The icu4 build is finished at the start of the %build section:

# finish the icu4j build
pushd baseLocation/plugins

# build the icu.base plugin
zipfile=
$PWD/com.ibm.icu.base.source_3.4.5/src/com.ibm.icu.base_3.4.5/src.zip
pushd icu4j-build/com.ibm.icu.base/src
find -name \*.java | xargs touch --date=1/1/1970
zip -X -9 -r $zipfile . -i \*.java
popd
pushd icu4j-build/com.ibm.icu.base
ant build.update.jar
popd
mv icu4j-build/com.ibm.icu.base/com.ibm.icu.base_3.4.5.jar .

# build the icu plugin
zipfile=$PWD/com.ibm.icu.source_3.4.5/src/com.ibm.icu_3.4.5/src.zip
pushd icu4j-build/com.ibm.icu/src
find -name \*.java | xargs touch --date=1/1/1970
zip -X -9 -r $zipfile . -i \*.java
popd
pushd icu4j-build/com.ibm.icu
ant build.update.jar
popd
mv icu4j-build/com.ibm.icu/com.ibm.icu_3.4.5.jar .

popd




Back to the top