[icu4j] Update to latest upstream release

Mat Booth mbooth at fedoraproject.org
Mon Nov 17 16:59:58 UTC 2014


commit 66167eac7ffc07034e9c1c48dd9c4527c3d98f55
Author: Mat Booth <mat.booth at redhat.com>
Date:   Mon Nov 17 16:43:11 2014 +0000

    Update to latest upstream release
    
    - Add patch for building against java 8 taglet API
      - Fixes: rhbz#1087450, rhbz#1106794
    - Add patch for generating better OSGi metadata in core lib
    - Install core lib with mvn_install
    - Package localespi lib
    - Run test suite

 .gitignore                   |    7 +-
 icu4j-52.1.pom               |  144 ----------------------------------
 icu4j-crosslink.patch        |   11 ---
 icu4j-pdebuildlocation.patch |   12 ---
 icu4j.spec                   |  177 +++++++++++++++--------------------------
 improve-osgi-manifest.patch  |   44 +++++++++++
 java8-taglets.patch          |   66 ++++++++++++++++
 sources                      |    2 +-
 8 files changed, 178 insertions(+), 285 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 945c786..33b5590 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,5 @@
-icu4j-*-src.jar
 /icu4j-*.tar.xz
-icu4j-4.4.2.tar.xz
-icu4j-4.4.2.2.tar.xz
-/icu4j-50.1.0
+/icu4j-*
 /noarch
 /.project
-/icu4j-50.1.1
+/.build-*.log
diff --git a/icu4j.spec b/icu4j.spec
index 2efb1fa..0dc4a57 100644
--- a/icu4j.spec
+++ b/icu4j.spec
@@ -1,37 +1,5 @@
-# Copyright (c) 2000-2007, JPackage Project
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in the
-#    documentation and/or other materials provided with the
-#    distribution.
-# 3. Neither the name of the JPackage Project nor the names of its
-#    contributors may be used to endorse or promote products derived
-#    from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
 %{?scl:%scl_package icu4j}
 %{!?scl:%global pkg_name %{name}}
-%{!?scl:%global _scl_root %{nil}}
-
 
 %global with_eclipse 1
 
@@ -39,51 +7,39 @@
 %global with_eclipse 0
 %endif
 
-%global eclipse_base            `more %{_bindir}/eclipse-pdebuild  | grep datadir= | sed -e "s/datadir=//"`/eclipse
-# Note:  this next section looks weird having an arch specified in a
-# noarch specfile but the parts of the build
-# All arches line up between Eclipse and Linux kernel names except i386 -> x86
-%ifarch %{ix86}
-%global eclipse_arch    x86
-%else
-%global eclipse_arch   %{_arch}
-%endif
-
 Name:           %{?scl_prefix}icu4j
-Version:        52.1
-Release:        3%{?dist}
+Version:        54.1.1
+Release:        1%{?dist}
 Epoch:          1
 Summary:        International Components for Unicode for Java
-License:        MIT and EPL 
+License:        MIT and EPL
 URL:            http://site.icu-project.org/
-Group:          Development/Libraries
+
 #CAUTION
 #to create a tarball use following procedure
-#svn co http://source.icu-project.org/repos/icu/icu4j/tags/release-52-eclipse-20140218 icu4j-<version>
+#svn co http://source.icu-project.org/repos/icu/icu4j/tags/release-54-1-1 icu4j-<version>
 #tar caf icu4j-<version>.tar.xz icu4j-<version>/
 Source0:        icu4j-%{version}.tar.xz
-Source1:        %{pkg_name}-%{version}.pom
 
-Patch0:         %{pkg_name}-crosslink.patch
+# Java 8 taglet API changes
+Patch0:         java8-taglets.patch
+
+# Add better OSGi metadata to core jar
+Patch1:         improve-osgi-manifest.patch
+
 BuildRequires:  ant >= 1.7.0
-# FIXME:  is this necessary or is it just adding strings in the hrefs in
-# the docs?
-BuildRequires:  java-javadoc >= 1:1.6.0
-# This is to ensure we get OpenJDK and not GCJ
 BuildRequires:  java-devel >= 1:1.7.0
-BuildRequires:  jpackage-utils >= 0:1.5
+BuildRequires:  java-javadoc
+BuildRequires:  javapackages-local
 BuildRequires:  zip
-Requires:       jpackage-utils
-%{?scl:Requires: %scl_runtime}
-# This is to ensure we get OpenJDK and not GCJ
-Requires:       java-headless >= 1:1.6.0
 %if %{with_eclipse}
 BuildRequires:  %{?scl_prefix}eclipse-pde >= 0:3.2.1
-%global         debug_package %{nil}
 %endif
 
-BuildArch:      noarch
+Requires:       java-headless >= 1:1.7.0
+%{?scl:Requires: %scl_runtime}
 
+BuildArch:      noarch
 
 %description
 The International Components for Unicode (ICU) library provides robust and
@@ -101,105 +57,102 @@ richer APIs, while remaining as compatible as possible with the original
 Java text and internationalization API design.
 
 %package charset
-Summary:        Charset sublibrary of %{pkg_name}
-Group:          Development/Libraries
-Requires:       jpackage-utils
+Summary:        Charset converter library of %{pkg_name}
 
 %description charset
-Charset sublibrary of %{pkg_name}.
+Charset converter library of %{pkg_name}.
+
+%package localespi
+Summary:        Locale SPI library of %{pkg_name}
+
+%description localespi
+Locale SPI library of %{pkg_name}.
 
 %package javadoc
 Summary:        Javadoc for %{pkg_name}
-Group:          Documentation
-Requires:       jpackage-utils
-Requires:       java-javadoc >= 1:1.6.0
+Requires:       java-javadoc
 
 %description javadoc
-Javadoc for %{pkg_name}.
+API documentation for %{pkg_name}.
 
 %if %{with_eclipse}
 %package eclipse
 Summary:        Eclipse plugin for %{pkg_name}
-Group:          Development/Libraries
-Requires:       jpackage-utils
 
 %description eclipse
 Eclipse plugin support for %{pkg_name}.
-
 %endif
 
 %prep
-%setup -q -n %{pkg_name}-%{version}
-#%patch0 -p0
-
-cp %{SOURCE1} .
+%setup -q -n icu4j-%{version}
 
-%{__sed} -i 's/\r//' APIChangeReport.html
-%{__sed} -i 's/\r//' readme.html
-
-sed --in-place "s/ .*bootclasspath=.*//g" build.xml
-sed --in-place "s/<date datetime=.*when=\"after\"\/>//" build.xml
-sed --in-place "/javac1.3/d" build.xml
-sed --in-place "s:/usr/lib:%{_datadir}:g" build.xml
+%patch0 -b.orig
+%patch1
 
 %build
-%ant -Dicu4j.javac.source=1.5 -Dicu4j.javac.target=1.5 -Dj2se.apidoc=%{_javadocdir}/java jar docs
+export JAVA_HOME=%{_jvmdir}/java/
+ant -Dicu4j.api.doc.jdk.link=%{_javadocdir}/java all check
+
 %if %{with_eclipse}
-ECLIPSE_BASE=%{eclipse_base}
+ECLIPSE_BASE=`grep datadir= %{_bindir}/eclipse-pdebuild | sed -e "s/datadir=//"`/eclipse
 pushd eclipse-build
-  %ant -Dj2se.apidoc=%{_javadocdir}/java -Declipse.home=${ECLIPSE_BASE} \
+  ant -Declipse.home=$ECLIPSE_BASE \
     -Djava.rt=%{_jvmdir}/jre/lib/rt.jar \
     -Declipse.basews=gtk -Declipse.baseos=linux \
-    -Declipse.pde.dir=${ECLIPSE_BASE}/dropins/sdk/plugins/`ls ${ECLIPSE_BASE}/dropins/sdk/plugins/|grep org.eclipse.pde.build_`
+    -Declipse.pde.dir=$ECLIPSE_BASE/dropins/sdk/plugins/$(ls $ECLIPSE_BASE/dropins/sdk/plugins/|grep org.eclipse.pde.build_)
 popd
 %endif
-  
-%install
 
-# jars
-%__mkdir_p %{buildroot}%{_javadir}
-%__cp -ap %{pkg_name}.jar %{buildroot}%{_javadir}/%{pkg_name}.jar
-%__cp -ap %{pkg_name}-charset.jar %{buildroot}%{_javadir}/%{pkg_name}-charset.jar
+%mvn_artifact pom.xml icu4j.jar
 
-# javadoc
-%__mkdir_p %{buildroot}%{_javadocdir}/%{pkg_name}
-%__cp -pr doc/* %{buildroot}%{_javadocdir}/%{pkg_name}
+%install
+%mvn_install -J doc
+
+# No poms for these, so install manually
+install -m 644 icu4j-charset.jar   %{buildroot}%{_javadir}/icu4j/
+install -m 644 icu4j-localespi.jar %{buildroot}%{_javadir}/icu4j/
 
 %if %{with_eclipse}
-# eclipse
 install -d -m755 %{buildroot}%{_javadir}/icu4j-eclipse
-
 unzip -qq -d %{buildroot}%{_javadir}/icu4j-eclipse eclipse-build/out/projects/ICU4J.com.ibm.icu/com.ibm.icu-com.ibm.icu.zip
 %endif
 
-# maven stuff
-install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
-cp %{pkg_name}-%{version}.pom $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{pkg_name}.pom
-%add_maven_depmap JPP-%{pkg_name}.pom %{pkg_name}.jar
-
-%files
-%doc readme.html APIChangeReport.html
-%{_javadir}/%{pkg_name}.jar
-%{_mavendepmapfragdir}/*
-%{_mavenpomdir}/*.pom
+%files -f .mfiles
+%doc main/shared/licenses/license.html readme.html APIChangeReport.html
+%dir %{_javadir}/icu4j
+%dir %{_mavenpomdir}/icu4j
 
 %files charset
-%{_javadir}/%{pkg_name}-charset.jar
+%doc main/shared/licenses/license.html
+%{_javadir}/icu4j/icu4j-charset.jar
+
+%files localespi
+%doc main/shared/licenses/license.html
+%{_javadir}/icu4j/icu4j-localespi.jar
 
-%files javadoc
-%doc %{_javadocdir}/*
+%files javadoc -f .mfiles-javadoc
+%doc main/shared/licenses/license.html
 
 %if %{with_eclipse}
 %files eclipse
+%doc main/shared/licenses/license.html
 %dir %{_javadir}/icu4j-eclipse/
 %dir %{_javadir}/icu4j-eclipse/features
 %dir %{_javadir}/icu4j-eclipse/plugins
 %{_javadir}/icu4j-eclipse/features/*
 %{_javadir}/icu4j-eclipse/plugins/*
-%doc readme.html
 %endif
 
 %changelog
+* Mon Nov 17 2014 Mat Booth <mat.booth at redhat.com> - 1:54.1.1-1
+- Update to latest upstream release
+- Add patch for building against java 8 taglet API
+  - Fixes: rhbz#1087450, rhbz#1106794
+- Add patch for generating better OSGi metadata in core lib
+- Install core lib with mvn_install
+- Package localespi lib
+- Run test suite
+
 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1:52.1-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 
@@ -387,5 +340,5 @@ cp %{pkg_name}-%{version}.pom $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{pkg_name}.pom
 * Mon Feb 27 2006 Fernando Nasser <fnasser at redhat.com> - 0:3.2-2jpp
 - First JPP 1.7 build
 
-* Sun Jan 29 2005 David Walluck <david at jpackage.org> 0:3.2-1jpp
+* Sat Jan 29 2005 David Walluck <david at jpackage.org> 0:3.2-1jpp
 - release (contributed by Mary Ellen Foster <mefoster at gmail.com>)
diff --git a/improve-osgi-manifest.patch b/improve-osgi-manifest.patch
new file mode 100644
index 0000000..805d49f
--- /dev/null
+++ b/improve-osgi-manifest.patch
@@ -0,0 +1,44 @@
+--- manifest.stub.orig	2014-11-17 14:56:10.568212293 +0000
++++ manifest.stub	2014-11-17 15:00:31.395686692 +0000
+@@ -9,10 +9,28 @@
+ Bundle-ManifestVersion: 2
+ Bundle-Name: ICU4J
+ Bundle-Description: International Components for Unicode for Java
+-Bundle-SymbolicName: com.ibm.icu
++Bundle-SymbolicName: com.ibm.icu; singleton:=true
+ Bundle-Version: @IMPLVERSION@
+ Bundle-Vendor: IBM Corporation
+ Bundle-Copyright: @COPYRIGHT@
+ Bundle-RequiredExecutionEnvironment: @EXECENV@
+ Main-Class: com.ibm.icu.util.VersionInfo
+-Export-Package: com.ibm.icu.lang,com.ibm.icu.math,com.ibm.icu.text,com.ibm.icu.util
+\ No newline at end of file
++Export-Package: com.ibm.icu.lang;base=true;full=true;version="@IMPLVERSION@",
++ com.ibm.icu.math;base=true;full=true;version="@IMPLVERSION@",
++ com.ibm.icu.text;base=true;full=true;version="@IMPLVERSION@",
++ com.ibm.icu.util;base=true;full=true;version="@IMPLVERSION@",
++ com.ibm.icu.impl;x-internal:=true,
++ com.ibm.icu.impl.data;x-internal:=true,
++ com.ibm.icu.impl.data.icudt at DATAVERSION@b;x-internal:=true,
++ com.ibm.icu.impl.data.icudt at DATAVERSION@b.brkitr;x-internal:=true,
++ com.ibm.icu.impl.data.icudt at DATAVERSION@b.coll;x-internal:=true,
++ com.ibm.icu.impl.data.icudt at DATAVERSION@b.curr;x-internal:=true,
++ com.ibm.icu.impl.data.icudt at DATAVERSION@b.lang;x-internal:=true,
++ com.ibm.icu.impl.data.icudt at DATAVERSION@b.rbnf;x-internal:=true,
++ com.ibm.icu.impl.data.icudt at DATAVERSION@b.region;x-internal:=true,
++ com.ibm.icu.impl.data.icudt at DATAVERSION@b.translit;x-internal:=true,
++ com.ibm.icu.impl.data.icudt at DATAVERSION@b.zone;x-internal:=true,
++ com.ibm.icu.impl.duration;x-internal:=true,
++ com.ibm.icu.impl.locale;x-internal:=true
++Eclipse-LazyStart: true
++Eclipse-ExtensibleAPI: true
+--- main/shared/build/common-targets.xml.orig	2014-11-17 14:59:05.335849961 +0000
++++ main/shared/build/common-targets.xml	2014-11-17 14:59:36.868423736 +0000
+@@ -78,6 +78,7 @@
+             <filterset>
+                 <filter token="SPECVERSION" value="${jar.spec.version}"/>
+                 <filter token="IMPLVERSION" value="${jar.impl.version}"/>
++                <filter token="DATAVERSION" value="${jar.data.version}"/>
+                 <filter token="COPYRIGHT" value="${jar.copyright.info}"/>
+                 <filter token="EXECENV" value="${jar.exec.env}"/>
+             </filterset>
diff --git a/java8-taglets.patch b/java8-taglets.patch
new file mode 100644
index 0000000..19513be
--- /dev/null
+++ b/java8-taglets.patch
@@ -0,0 +1,66 @@
+--- tools/build/src/com/ibm/icu/dev/tool/docs/ICUTaglet.java.orig	2014-11-17 10:11:13.000000000 +0000
++++ tools/build/src/com/ibm/icu/dev/tool/docs/ICUTaglet.java	2014-11-17 16:05:29.453442334 +0000
+@@ -13,8 +13,9 @@
+ 
+ import com.sun.javadoc.Doc;
+ import com.sun.javadoc.Tag;
++import com.sun.tools.doclets.formats.html.markup.RawHtml;
++import com.sun.tools.doclets.internal.toolkit.Content;
+ import com.sun.tools.doclets.internal.toolkit.taglets.Taglet;
+-import com.sun.tools.doclets.internal.toolkit.taglets.TagletOutput;
+ import com.sun.tools.doclets.internal.toolkit.taglets.TagletWriter;
+ 
+ public abstract class ICUTaglet implements Taglet {
+@@ -98,26 +99,26 @@
+                 return toString(tags[0]);
+             }
+         }
+-        return null;
++        return "";
+     }
+ 
+-    public TagletOutput getTagletOutput(Tag tag, TagletWriter writer)
++    public Content getTagletOutput(Tag tag, TagletWriter writer)
+         throws IllegalArgumentException {
+ 
+-        TagletOutput out = writer.getTagletOutputInstance();
+-        out.setOutput(toString(tag));
++        Content out = writer.getOutputInstance();
++        out.addContent(new RawHtml(toString(tag)));
+         return out;
+     }
+ 
+-    public TagletOutput getTagletOutput(Doc holder, TagletWriter writer)
++    public Content getTagletOutput(Doc holder, TagletWriter writer)
+         throws IllegalArgumentException {
+ 
+-        TagletOutput out = writer.getTagletOutputInstance();
++        Content out = writer.getOutputInstance();
+         Tag[] tags = holder.tags(getName());
+         if (tags.length == 0) {
+-            return null;
++            return out;
+         }
+-        out.setOutput(toString(tags[0]));
++        out.addContent(new RawHtml(toString(tags[0])));
+         return out;
+     }
+ 
+@@ -198,7 +199,7 @@
+         }
+ 
+         public String toString(Tag tag) {
+-            return null;
++            return "";
+         }
+     }
+ 
+@@ -245,7 +246,7 @@
+         }
+ 
+         public String toString(Tag tag) {
+-            return null;
++            return "";
+         }
+     }
+ 
diff --git a/sources b/sources
index e9b179d..2889923 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-e52729889dafc60a25b2a8d3a82725be  icu4j-52.1.tar.xz
+ee5ed1200b82292dd06dba28d2c490cb  icu4j-54.1.1.tar.xz


More information about the scm-commits mailing list