Accepting request 243983 from home:sfalken:branches:Java:packages

Ok, try this one instead, it actually builds this time, since I'm submitting the right patch.

OBS-URL: https://build.opensuse.org/request/show/243983
OBS-URL: https://build.opensuse.org/package/show/Java:packages/aelfred?expand=0&rev=12
This commit is contained in:
Tomáš Chvátal 2014-08-08 15:40:50 +00:00 committed by Git OBS Bridge
parent 14897769a6
commit 43d0b338ed
5 changed files with 68 additions and 295 deletions

View File

@ -1,6 +1,7 @@
--- src/com/microstar/xml/XmlParser.java
+++ src/com/microstar/xml/XmlParser.java
@@ -1350,7 +1350,7 @@
diff -rupN net.old/sf/saxon/aelfred/XmlParser.java net/sf/saxon/aelfred/XmlParser.java
--- net.old/sf/saxon/aelfred/XmlParser.java 2002-04-12 14:30:00.000000000 -0700
+++ net/sf/saxon/aelfred/XmlParser.java 2014-08-08 07:24:55.979292881 -0700
@@ -1463,7 +1463,7 @@ loop:
{
String name;
int type;
@ -8,271 +9,38 @@
+ String enum2 = null;
// Read the attribute name.
name = readNmtoken(true);
@@ -1362,12 +1362,12 @@
name = readNmtoken (true);
@@ -1475,12 +1475,12 @@ loop:
// Get the string of enumerated values
// if necessary.
if (type == ATTRIBUTE_ENUMERATED || type == ATTRIBUTE_NOTATION) {
- enum = dataBufferToString();
+ enum2 = dataBufferToString();
- enum = dataBufferToString ();
+ enum2 = dataBufferToString ();
}
// Read the default value.
requireWhitespace();
- parseDefault(elementName, name, type, enum);
+ parseDefault(elementName, name, type, enum2);
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
@@ -1573,7 +1573,7 @@ loop:
String elementName,
String name,
int type,
- String enum
+ String enum2
) throws Exception
{
int valueType = ATTRIBUTE_DEFAULT_SPECIFIED;
@@ -1481,7 +1481,7 @@
value = readLiteral(LIT_CHAR_REF);
context = CONTEXT_DTD;
@@ -1605,7 +1605,7 @@ loop:
}
- setAttribute(elementName, name, type, enum, value, valueType);
+ setAttribute(elementName, name, type, enum2, value, valueType);
} else
value = readLiteral (flags);
- 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;
Binary files net.old/sf/saxon/aelfred/.XmlParser.java.un~ and net/sf/saxon/aelfred/.XmlParser.java.un~ differ

View File

@ -1,3 +1,21 @@
-------------------------------------------------------------------
Fri Aug 8 14:26:03 UTC 2014 - sfalken@opensuse.org
- Uploading proper patch, so things will build
-------------------------------------------------------------------
Fri Aug 8 02:47:25 UTC 2014 - sfalken@opensuse.org
- Updated to 7.0
* Changed the package name to net.sf.saxon.aelfred to prevent any accidental confusion with the original Microstar code or with David Brownell's version.
* Fixed several bugs: (1) a bug in namespace handling (where an attribute xxx:name precedes the xmlns:xxx declaration) (2) poor diagnostics when end of file occurs prematurely
* Subsetting the code to include only the XML non-validating parser and SAX driver, with appropriate changes to the setFeature() and getFeature() methods.
* Some further changes made by David Brownell up to June 2001 have been incorporated.
- Rebased aelfred-icedtea-build.patch for new source
- Added: aelfred7_0.zip
- Deleted: aelfred.zip
- Updated URLs in specfile
-------------------------------------------------------------------
Fri Jul 11 14:02:37 UTC 2014 - tchvatal@suse.com

View File

@ -17,13 +17,13 @@
Name: aelfred
Version: 1.2
Version: 7.0
Release: 0
Summary: Java-based XML parser
License: BSD-3-Clause
Group: Development/Libraries/Java
Url: http://www.jpackage.org/
Source0: http://card4u.fhnon.de/XMLKlassen/microstar-Parser/aelfred.zip
Url: http://saxon.sourceforge.net/aelfred.html
Source0: http://downloads.sourceforge.net/project/saxon/aelfred/7.0/aelfred7_0.zip
Patch0: aelfred-icedtea-build.patch
BuildRequires: ant
BuildRequires: java-devel
@ -54,50 +54,37 @@ Demonstrations and samples for aelfred.
%prep
%setup -q -c
# remove all binary libs
find . -name "*.jar" -exec rm -f {} \;
find . -name "*.class" -exec rm -f {} \;
rm -rf HTML/*
%patch0 -b .sav
unzip %{name}-source.zip
%patch0 -p0
%build
export JAVA_HOME=%{java_home}
export PATH=%{java_home}/bin:$PATH
export CLASSPATH=
cd src
cd net
%{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
cd net
mkdir -p %{buildroot}%{_javadir}
%{jar} cvmf /dev/null %{name}.jar -C . com/
cp -a %{name}.jar \
cp -a ../saxon-%{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}
cp -a ../HTML/* %{buildroot}%{_javadocdir}/%{name}
# data
mkdir -p %{buildroot}%{_datadir}/%{name}/Demo
cp -a *.class %{buildroot}%{_datadir}/%{name}/Demo
%files
%defattr(0644,root,root,0755)
%doc README.txt FILES
%{_javadir}/*
%dir %{_datadir}/%{name}
%files javadoc
%defattr(0644,root,root,0755)
%dir %{_javadocdir}/%{name}
%{_javadocdir}/%{name}/*
%files demo
%defattr(0644,root,root,0755)
%{_datadir}/%{name}/Demo
%changelog

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:01c1b09faf1e39f063755bed88602fbf2f30a1477e13b5cfea711bf0d9538b45
size 163234

3
aelfred7_0.zip Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c8a7dba1d509d1962a3785040af6a6c5c2958178394803fc4a315d40f9261ae9
size 80866