This commit is contained in:
parent
77f59d0f2f
commit
0b51a4a2f9
278
aelfred-icedtea-build.patch
Normal file
278
aelfred-icedtea-build.patch
Normal file
@ -0,0 +1,278 @@
|
||||
--- src/com/microstar/xml/XmlParser.java
|
||||
+++ src/com/microstar/xml/XmlParser.java
|
||||
@@ -1350,7 +1350,7 @@
|
||||
{
|
||||
String name;
|
||||
int type;
|
||||
- String enum = null;
|
||||
+ String enum2 = null;
|
||||
|
||||
// Read the attribute name.
|
||||
name = readNmtoken(true);
|
||||
@@ -1362,12 +1362,12 @@
|
||||
// Get the string of enumerated values
|
||||
// if necessary.
|
||||
if (type == ATTRIBUTE_ENUMERATED || type == ATTRIBUTE_NOTATION) {
|
||||
- enum = dataBufferToString();
|
||||
+ enum2 = dataBufferToString();
|
||||
}
|
||||
|
||||
// Read the default value.
|
||||
requireWhitespace();
|
||||
- parseDefault(elementName, name, type, enum);
|
||||
+ parseDefault(elementName, name, type, enum2);
|
||||
}
|
||||
|
||||
|
||||
@@ -1380,7 +1380,7 @@
|
||||
* [57] EnumeratedType ::= NotationType | Enumeration
|
||||
* *TODO: validate the type!!
|
||||
*/
|
||||
- int readAttType ()
|
||||
+ protected int readAttType ()
|
||||
throws java.lang.Exception
|
||||
{
|
||||
String typeString;
|
||||
@@ -1411,7 +1411,7 @@
|
||||
* [61] Etoks ::= %Nmtoken (S? '|' S? %Nmtoken)*
|
||||
* *NOTE: the '(' has already been read.
|
||||
*/
|
||||
- void parseEnumeration ()
|
||||
+ protected void parseEnumeration ()
|
||||
throws java.lang.Exception
|
||||
{
|
||||
char c;
|
||||
@@ -1441,7 +1441,7 @@
|
||||
* [59] Ntoks ::= %Name (S? '|' S? %Name)
|
||||
* *NOTE: the 'NOTATION' has already been read
|
||||
*/
|
||||
- void parseNotationType ()
|
||||
+ protected void parseNotationType ()
|
||||
throws java.lang.Exception
|
||||
{
|
||||
requireWhitespace();
|
||||
@@ -1455,7 +1455,7 @@
|
||||
* Parse the default value for an attribute.
|
||||
* [62] Default ::= '#REQUIRED' | '#IMPLIED' | ((%'#FIXED' S)? %AttValue
|
||||
*/
|
||||
- void parseDefault (String elementName, String name, int type, String enum)
|
||||
+ protected void parseDefault (String elementName, String name, int type, String enum2)
|
||||
throws java.lang.Exception
|
||||
{
|
||||
int valueType = ATTRIBUTE_DEFAULT_SPECIFIED;
|
||||
@@ -1481,7 +1481,7 @@
|
||||
value = readLiteral(LIT_CHAR_REF);
|
||||
context = CONTEXT_DTD;
|
||||
}
|
||||
- setAttribute(elementName, name, type, enum, value, valueType);
|
||||
+ setAttribute(elementName, name, type, enum2, value, valueType);
|
||||
}
|
||||
|
||||
|
||||
@@ -1497,7 +1497,7 @@
|
||||
* *NOTE: the '<![' has already been read.
|
||||
* *TODO: verify that I am handling ignoreSectContents right.
|
||||
*/
|
||||
- void parseConditionalSect ()
|
||||
+ protected void parseConditionalSect ()
|
||||
throws java.lang.Exception
|
||||
{
|
||||
skipWhitespace();
|
||||
@@ -1539,7 +1539,7 @@
|
||||
* [67] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';'
|
||||
* *NOTE: the '&#' has already been read.
|
||||
*/
|
||||
- void parseCharRef ()
|
||||
+ protected void parseCharRef ()
|
||||
throws java.lang.Exception
|
||||
{
|
||||
int value = 0;
|
||||
@@ -1630,7 +1630,7 @@
|
||||
* *NOTE: the '&' has already been read.
|
||||
* @param externalAllowed External entities are allowed here.
|
||||
*/
|
||||
- void parseEntityRef (boolean externalAllowed)
|
||||
+ protected void parseEntityRef (boolean externalAllowed)
|
||||
throws java.lang.Exception
|
||||
{
|
||||
String name;
|
||||
@@ -1669,7 +1669,7 @@
|
||||
* [70] PEReference ::= '%' Name ';'
|
||||
* *NOTE: the '%' has already been read.
|
||||
*/
|
||||
- void parsePEReference (boolean isEntityValue)
|
||||
+ protected void parsePEReference (boolean isEntityValue)
|
||||
throws java.lang.Exception
|
||||
{
|
||||
String name;
|
||||
@@ -1713,7 +1713,7 @@
|
||||
* [75] NDataDecl ::= S %'NDATA' S %Name
|
||||
* *NOTE: the '<!ENTITY' has already been read.
|
||||
*/
|
||||
- void parseEntityDecl ()
|
||||
+ protected void parseEntityDecl ()
|
||||
throws java.lang.Exception
|
||||
{
|
||||
char c;
|
||||
@@ -1773,7 +1773,7 @@
|
||||
* [81] NotationDecl ::= '<!NOTATION' S %Name S %ExternalID S? '>'
|
||||
* *NOTE: the '<!NOTATION' has already been read.
|
||||
*/
|
||||
- void parseNotationDecl ()
|
||||
+ protected void parseNotationDecl ()
|
||||
throws java.lang.Exception
|
||||
{
|
||||
String nname, ids[];
|
||||
@@ -1806,7 +1806,7 @@
|
||||
* <p>The trick here is that the data stays in the dataBuffer without
|
||||
* necessarily being converted to a string right away.
|
||||
*/
|
||||
- void parsePCData ()
|
||||
+ protected void parsePCData ()
|
||||
throws java.lang.Exception
|
||||
{
|
||||
char c;
|
||||
@@ -1871,7 +1871,7 @@
|
||||
* Require whitespace characters.
|
||||
* [1] S ::= (#x20 | #x9 | #xd | #xa)+
|
||||
*/
|
||||
- void requireWhitespace ()
|
||||
+ protected void requireWhitespace ()
|
||||
throws java.lang.Exception
|
||||
{
|
||||
char c = readCh();
|
||||
@@ -1886,7 +1886,7 @@
|
||||
/**
|
||||
* Parse whitespace characters, and leave them in the data buffer.
|
||||
*/
|
||||
- void parseWhitespace ()
|
||||
+ protected void parseWhitespace ()
|
||||
throws java.lang.Exception
|
||||
{
|
||||
char c = readCh();
|
||||
@@ -1902,7 +1902,7 @@
|
||||
* Skip whitespace characters.
|
||||
* [1] S ::= (#x20 | #x9 | #xd | #xa)+
|
||||
*/
|
||||
- void skipWhitespace ()
|
||||
+ protected void skipWhitespace ()
|
||||
throws java.lang.Exception
|
||||
{
|
||||
// Start with a little cheat. Most of
|
||||
@@ -1956,7 +1956,7 @@
|
||||
* [7] Nmtoken ::= (NameChar)+
|
||||
* *NOTE: [6] is implemented implicitly where required.
|
||||
*/
|
||||
- String readNmtoken (boolean isName)
|
||||
+ protected String readNmtoken (boolean isName)
|
||||
throws java.lang.Exception
|
||||
{
|
||||
char c;
|
||||
@@ -2049,7 +2049,7 @@
|
||||
* [9] EntityValue ::= '"' ([^%&"] | PEReference | Reference)* '"'
|
||||
* | "'" ([^%&'] | PEReference | Reference)* "'"
|
||||
*/
|
||||
- String readLiteral (int flags)
|
||||
+ protected String readLiteral (int flags)
|
||||
throws java.lang.Exception
|
||||
{
|
||||
char delim, c;
|
||||
@@ -2119,7 +2119,7 @@
|
||||
* @param inNotation Are we in a notation?
|
||||
* @return A two-member String array containing the identifiers.
|
||||
*/
|
||||
- String[] readExternalIds (boolean inNotation)
|
||||
+ protected String[] readExternalIds (boolean inNotation)
|
||||
throws java.lang.Exception
|
||||
{
|
||||
char c;
|
||||
@@ -2154,7 +2154,7 @@
|
||||
* @param c The character to test.
|
||||
* @return true if the character is whitespace.
|
||||
*/
|
||||
- final boolean isWhitespace (char c)
|
||||
+ protected final boolean isWhitespace (char c)
|
||||
{
|
||||
switch ((int)c) {
|
||||
case 0x20:
|
||||
@@ -2177,7 +2177,7 @@
|
||||
/**
|
||||
* Add a character to the data buffer.
|
||||
*/
|
||||
- void dataBufferAppend (char c)
|
||||
+ protected void dataBufferAppend (char c)
|
||||
{
|
||||
// Expand buffer if necessary.
|
||||
dataBuffer =
|
||||
@@ -2189,7 +2189,7 @@
|
||||
/**
|
||||
* Add a string to the data buffer.
|
||||
*/
|
||||
- void dataBufferAppend (String s)
|
||||
+ protected void dataBufferAppend (String s)
|
||||
{
|
||||
dataBufferAppend(s.toCharArray(), 0, s.length());
|
||||
}
|
||||
@@ -2198,7 +2198,7 @@
|
||||
/**
|
||||
* Append (part of) a character array to the data buffer.
|
||||
*/
|
||||
- void dataBufferAppend (char ch[], int start, int length)
|
||||
+ protected void dataBufferAppend (char ch[], int start, int length)
|
||||
{
|
||||
dataBuffer =
|
||||
(char[])extendArray(dataBuffer, dataBuffer.length,
|
||||
@@ -2213,7 +2213,7 @@
|
||||
/**
|
||||
* Normalise whitespace in the data buffer.
|
||||
*/
|
||||
- void dataBufferNormalize ()
|
||||
+ protected void dataBufferNormalize ()
|
||||
{
|
||||
int i = 0;
|
||||
int j = 0;
|
||||
@@ -2256,7 +2256,7 @@
|
||||
* @param internFlag true if the contents should be interned.
|
||||
* @see #intern(char[],int,int)
|
||||
*/
|
||||
- String dataBufferToString ()
|
||||
+ protected String dataBufferToString ()
|
||||
{
|
||||
String s = new String(dataBuffer, 0, dataBufferPos);
|
||||
dataBufferPos = 0;
|
||||
@@ -2268,7 +2268,7 @@
|
||||
* Flush the contents of the data buffer to the handler, if
|
||||
* appropriate, and reset the buffer for new input.
|
||||
*/
|
||||
- void dataBufferFlush ()
|
||||
+ protected void dataBufferFlush ()
|
||||
throws java.lang.Exception
|
||||
{
|
||||
if (dataBufferPos > 0) {
|
||||
@@ -2297,7 +2297,7 @@
|
||||
/**
|
||||
* Require a string to appear, or throw an exception.
|
||||
*/
|
||||
- void require (String delim)
|
||||
+ protected void require (String delim)
|
||||
throws java.lang.Exception
|
||||
{
|
||||
char ch[] = delim.toCharArray();
|
||||
@@ -2310,7 +2310,7 @@
|
||||
/**
|
||||
* Require a character to appear, or throw an exception.
|
||||
*/
|
||||
- void require (char delim)
|
||||
+ protected void require (char delim)
|
||||
throws java.lang.Exception
|
||||
{
|
||||
char c = readCh();
|
||||
@@ -2422,7 +2422,7 @@
|
||||
* Ensure the capacity of an array, allocating a new one if
|
||||
* necessary.
|
||||
*/
|
||||
- Object extendArray (Object array, int currentSize, int requiredSize)
|
||||
+ protected Object extendArray (Object array, int currentSize, int requiredSize)
|
||||
{
|
||||
if (requiredSize < currentSize) {
|
||||
return array;
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 3 10:28:26 CET 2008 - mvyskocil@suse.cz
|
||||
|
||||
- merged with jpackage 1.7
|
||||
- allow to build with icedtea
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 30 12:12:00 CEST 2007 - ssommer@suse.de
|
||||
|
||||
|
79
aelfred.spec
79
aelfred.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package aelfred (Version 1.2)
|
||||
#
|
||||
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# This file and all modifications and additions to the pristine
|
||||
# package are under the same license as the package itself.
|
||||
#
|
||||
@ -10,21 +10,37 @@
|
||||
|
||||
# norootforbuild
|
||||
|
||||
%define gcj_support %{?_with_gcj_support:1}%{!?_with_gcj_support:%{?_without_gcj_support:0}%{!?_without_gcj_support:%{?_gcj_support:%{_gcj_support}}%{!?_gcj_support:0}}}
|
||||
|
||||
Name: aelfred
|
||||
BuildRequires: ant java2-devel-packages unzip xml-commons-apis
|
||||
%define name aelfred
|
||||
%define version 1.2
|
||||
%define release 0.a.7jpp
|
||||
%define section free
|
||||
Version: 1.2
|
||||
Release: 51
|
||||
Release: 177
|
||||
Summary: Java-based XML parser
|
||||
License: BSD License and BSD-like
|
||||
URL: http://www.jpackage.org/
|
||||
License: BSD 3-Clause
|
||||
Url: http://www.jpackage.org/
|
||||
Source0: http://card4u.fhnon.de/XMLKlassen/microstar-Parser/aelfred.zip
|
||||
Patch0: aelfred-icedtea-build.patch
|
||||
Group: Development/Libraries/Java
|
||||
Buildarch: noarch
|
||||
BuildRequires: ant
|
||||
BuildRequires: jpackage-utils >= 1.6
|
||||
%if ! %{gcj_support}
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if %defined suse_version
|
||||
BuildRequires: java-devel
|
||||
BuildRequires: unzip
|
||||
%endif
|
||||
%if %{gcj_support}
|
||||
BuildRequires: gnu-crypto
|
||||
BuildRequires: java-gcj-compat-devel
|
||||
Requires(post): java-gcj-compat
|
||||
Requires(postun): java-gcj-compat
|
||||
%endif
|
||||
|
||||
%description
|
||||
AElfred is a Java-based XML parser from Microstar Software Ltd. AElfred
|
||||
@ -37,6 +53,8 @@ non-commercial use.
|
||||
PreReq: coreutils
|
||||
Summary: Java-based XML parser (documentation)
|
||||
Group: Development/Libraries/Java
|
||||
Requires(post): /bin/rm,/bin/ln
|
||||
Requires(postun): /bin/rm
|
||||
|
||||
%description javadoc
|
||||
Javadoc for aelfred.
|
||||
@ -58,64 +76,76 @@ Demonstrations and samples for aelfred.
|
||||
# remove all binary libs
|
||||
find . -name "*.jar" -exec %__rm -f {} \;
|
||||
find . -name "*.class" -exec %__rm -f {} \;
|
||||
|
||||
%__rm -rf HTML/*
|
||||
%patch0 -b .sav
|
||||
|
||||
%build
|
||||
export JAVA_HOME=%{java_home}
|
||||
export PATH=%{java_home}/bin:$PATH
|
||||
export CLASSPATH=
|
||||
cd src
|
||||
|
||||
%javac -source 1.4 `find . -name \*.java`
|
||||
|
||||
%javadoc -source 1.4 -d ../HTML `find . -name \*.java`
|
||||
|
||||
%install
|
||||
# jar
|
||||
export JAVA_HOME=%{java_home}
|
||||
cd src
|
||||
|
||||
%__mkdir_p %{buildroot}%{_javadir}
|
||||
|
||||
%jar cvmf /dev/null %{name}.jar -C . com/
|
||||
|
||||
%__cp -a %{name}.jar \
|
||||
%{buildroot}%{_javadir}/%{name}-%{version}.jar
|
||||
(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do \
|
||||
|
||||
%__ln_s ${jar} ${jar/-%{version}/}; done)
|
||||
# javadoc
|
||||
|
||||
%__mkdir_p %{buildroot}%{_javadocdir}/%{name}-%{version}
|
||||
|
||||
%__cp -a ../HTML/* %{buildroot}%{_javadocdir}/%{name}-%{version}
|
||||
(cd %{buildroot}%{_javadocdir} && %__ln_s %{name}-%{version} %{name})
|
||||
# data
|
||||
|
||||
%__mkdir_p %{buildroot}%{_datadir}/%{name}/Demo
|
||||
|
||||
%__cp -a *.class %{buildroot}%{_datadir}/%{name}/Demo
|
||||
%if %{gcj_support}
|
||||
export CLASSPATH=$(build-classpath gnu-crypto)
|
||||
%{_bindir}/aot-compile-rpm
|
||||
%endif
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
%__rm -rf %{buildroot}
|
||||
|
||||
%post javadoc
|
||||
|
||||
%__rm -f %{_javadocdir}/%{name}
|
||||
|
||||
%__ln_s %{name}-%{version} %{_javadocdir}/%{name}
|
||||
|
||||
%postun javadoc
|
||||
if [ $1 -eq 0 ]; then
|
||||
%__rm -f %{_javadocdir}/%{name}
|
||||
fi
|
||||
%if %{gcj_support}
|
||||
|
||||
%post
|
||||
if [ -x %{_bindir}/rebuild-gcj-db ]
|
||||
then
|
||||
%{_bindir}/rebuild-gcj-db
|
||||
fi
|
||||
%endif
|
||||
%if %{gcj_support}
|
||||
|
||||
%postun
|
||||
if [ -x %{_bindir}/rebuild-gcj-db ]
|
||||
then
|
||||
%{_bindir}/rebuild-gcj-db
|
||||
fi
|
||||
%endif
|
||||
|
||||
%files
|
||||
%defattr(0644,root,root,0755)
|
||||
%doc README.txt FILES
|
||||
%{_javadir}/*
|
||||
%dir %{_datadir}/%{name}
|
||||
%if %{gcj_support}
|
||||
%dir %attr(-,root,root) %{_libdir}/gcj/%{name}
|
||||
%attr(-,root,root) %{_libdir}/gcj/%{name}/%{name}-%{version}.jar.*
|
||||
%endif
|
||||
|
||||
%files javadoc
|
||||
%defattr(0644,root,root,0755)
|
||||
@ -128,9 +158,12 @@ fi
|
||||
%{_datadir}/%{name}/Demo
|
||||
|
||||
%changelog
|
||||
* Fri Mar 30 2007 - ssommer@suse.de
|
||||
* Mon Mar 03 2008 mvyskocil@suse.cz
|
||||
- merged with jpackage 1.7
|
||||
- allow to build with icedtea
|
||||
* Fri Mar 30 2007 ssommer@suse.de
|
||||
- add unzip to BuildRequires
|
||||
* Wed Jan 25 2006 - mls@suse.de
|
||||
* Wed Jan 25 2006 mls@suse.de
|
||||
- converted neededforbuild to BuildRequires
|
||||
* Wed Oct 19 2005 - jsmeix@suse.de
|
||||
* Wed Oct 19 2005 jsmeix@suse.de
|
||||
- Current version 1.2 from JPackage.org
|
||||
|
Loading…
x
Reference in New Issue
Block a user