--- gjdoc-0.7.8.orig/configure +++ gjdoc-0.7.8/configure @@ -19667,6 +19667,7 @@ if test x$JAVAPREFIX = x; then test x$JAVA = x && for ac_prog in kaffe$EXEEXT gij$EXEEXT java$EXEEXT do + echo XXX $ac_prog # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 @@ -19710,6 +19711,7 @@ else test x$JAVA = x && for ac_prog in kaffe$EXEEXT gij$EXEEXT java$EXEEXT do + echo ZZZ $ac_prog # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 --- gjdoc-0.7.8.orig/debian/scripts/dh_javadoc +++ gjdoc-0.7.8/debian/scripts/dh_javadoc @@ -0,0 +1,137 @@ +#!/usr/bin/perl -w + +=head1 NAME + +dh_javadoc - generate javadoc documentation and install in package directory + +=cut + +use strict; +use Debian::Debhelper::Dh_Lib; + +=head1 SYNOPSIS + +B [S>] [B<-p>] [B<--sourcedir I>] [S>] + +=head1 DESCRIPTION + +dh_javadoc is a debhelper program that is responsible for generating HTML Java +documentation and installing it in package directories. This should be done in +the documentaion package of all Java libraries. Normal Java programs should not +be supplied with javadoc documentation (neither in their main package or in a +separate documentation package) + +Any package specified as parameters will be installed into the first package +dh_javadoc is told to act on. Use of the standard debhelper B<-p> option is +highly recommended. + +A file named debian/package.javadoc may list additional packages to have +documentation generated. These should be separated by new lines. + +When the Java policy is modified, this script will also install links to the +documentation in a common place so that javadoc pages may be interlinked; and +also provide a substitution variable for documentation package dependencies. + +Javadoc generation is done using gjdoc, currently the only free javadoc +implementation. When new features are added to this (such as overview files), +this script will be modified accordingly. + +=head1 OPTIONS + +=over 4 + +=item B<--sourcedir I> + +Specify the source path in which to look for Java source files. + +=item I + +Names of Java packages to be documented. + +=back + +=head1 TODO + +=over 4 + +=item + + +Check parameters more carefully. + +=item + + +Add substvar for documentation dependencies + +=item + + +Don't put the 'common' directory in all packages - refer to one in +/usr/share/gjdoc & insist on creating that dependency + +=item + + +Other items depend on gjdoc improvements: + +=over 8 + +=item - + +Add package listings to common directory + +=item - + +Generate dependency substvar based on additional doc packages used. + +=back + +=back + +=cut + +use Cwd; + +init(); + +foreach my $package (@{$dh{DOPACKAGES}}) { + my $tmp=tmpdir($package); + + my @packages = @ARGV; + + if (-e "debian/$package.javadoc"){ + open PACKAGES, "debian/$package.javadoc" + or error("Unable to open file: debian/$package.javadocL: $!"); + my @pkgs = ; + close PACKAGES or warning("Error closing debian/$package.javadoc: $!"); + @packages = (@packages, @pkgs); + } + + my $src_dir; + if ($dh{SOURCEDIR}){ + $src_dir = getcwd .'/'. $dh{SOURCEDIR}; + }else{ + $src_dir = getcwd(); + } + + if (! -e "/usr/bin/gjdoc"){ + error("/usr/bin/gjdoc not found"); + } + + # make directory + doit('install', '-g', '0', '-o', '0', '-d', "$tmp/usr/share/doc/$package/api/"); + # generate javadoc + doit('gjdoc', "-sourcepath", $src_dir, "-d", "$tmp/usr/share/doc/$package/api/", @packages); + # and remove gjdoc_rawcomment.cache + doit('rm', "-f", "gjdoc_rawcomment.cache"); + +} + +=head1 SEE ALSO + +L + +This program is designed similar to debhelper + +=head1 AUTHOR + +Mark Howard + +=cut --- gjdoc-0.7.8.orig/debian/scripts/gjdoc +++ gjdoc-0.7.8/debian/scripts/gjdoc @@ -0,0 +1,23 @@ +#!/bin/sh + +GJDOCCP=/usr/share/java/gjdoc.jar:/usr/share/java/gnujaxp.jar + +if [ -z "$CLASSPATH" ] ; then + CLASSPATH="$GJDOCCP" +else + CLASSPATH="$CLASSPATH:$GJDOCCP" +fi + +if [ -z "$JAVACMD" ] ; then + if [ -n "$JAVA_HOME" ] ; then + JAVACMD="$JAVA_HOME/bin/java" + else + JAVACMD="`which java 2> /dev/null`" + if [ -z "$JAVACMD" ] ; then + JAVACMD="/usr/bin/java" + fi + fi +fi + +LD_LIBRARY_PATH="/usr/lib/jni" exec "$JAVACMD" -classpath "$CLASSPATH" gnu.classpath.tools.gjdoc.Main "$@" + --- gjdoc-0.7.8.orig/debian/patches/08_encoding.dpatch +++ gjdoc-0.7.8/debian/patches/08_encoding.dpatch @@ -0,0 +1,158 @@ +#! /bin/sh -e +## DP: set encoding + +if [ $# -ne 1 ]; then echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"; exit 1; fi + +case "$1" in + -patch) + patch -f --no-backup-if-mismatch -p0 < $0 + ;; + -unpatch) + patch -f --no-backup-if-mismatch -R -p0 < $0 + ;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 + ;; +esac + +exit 0 + +diff -uNr src.orig/resources/doctranslets/html/allclasses.xsl src/resources/doctranslets/html/allclasses.xsl +--- src.orig/resources/doctranslets/html/allclasses.xsl 2003-03-18 21:53:45.000000000 +0900 ++++ src/resources/doctranslets/html/allclasses.xsl 2004-01-16 23:02:38.000000000 +0900 +@@ -33,7 +33,7 @@ + + + + + +diff -uNr src.orig/resources/doctranslets/html/allpackages.xsl src/resources/doctranslets/html/allpackages.xsl +--- src.orig/resources/doctranslets/html/allpackages.xsl 2003-03-18 21:53:45.000000000 +0900 ++++ src/resources/doctranslets/html/allpackages.xsl 2004-01-16 23:02:50.000000000 +0900 +@@ -33,7 +33,7 @@ + + + + + +diff -uNr src.orig/resources/doctranslets/html/classdoc.xsl src/resources/doctranslets/html/classdoc.xsl +--- src.orig/resources/doctranslets/html/classdoc.xsl 2003-03-18 21:53:45.000000000 +0900 ++++ src/resources/doctranslets/html/classdoc.xsl 2004-01-16 23:03:01.000000000 +0900 +@@ -33,7 +33,7 @@ + + + + + +diff -uNr src.orig/resources/doctranslets/html/descriptor.xsl src/resources/doctranslets/html/descriptor.xsl +--- src.orig/resources/doctranslets/html/descriptor.xsl 2003-03-18 21:53:45.000000000 +0900 ++++ src/resources/doctranslets/html/descriptor.xsl 2004-01-16 23:03:18.000000000 +0900 +@@ -34,7 +34,7 @@ + + + + + +diff -uNr src.orig/resources/doctranslets/html/doctranslet.xsl src/resources/doctranslets/html/doctranslet.xsl +--- src.orig/resources/doctranslets/html/doctranslet.xsl 2003-03-18 21:53:45.000000000 +0900 ++++ src/resources/doctranslets/html/doctranslet.xsl 2004-01-16 23:03:32.000000000 +0900 +@@ -31,7 +31,7 @@ + xmlns="http://www.gnu.org/software/cp-tools/gjdocxslfiles"> + + + + +diff -uNr src.orig/resources/doctranslets/html/fulltree.xsl src/resources/doctranslets/html/fulltree.xsl +--- src.orig/resources/doctranslets/html/fulltree.xsl 2003-03-18 21:53:45.000000000 +0900 ++++ src/resources/doctranslets/html/fulltree.xsl 2004-01-16 23:03:52.000000000 +0900 +@@ -33,7 +33,7 @@ + + + + + +diff -uNr src.orig/resources/doctranslets/html/gjdoc.xsl src/resources/doctranslets/html/gjdoc.xsl +--- src.orig/resources/doctranslets/html/gjdoc.xsl 2003-03-18 21:53:45.000000000 +0900 ++++ src/resources/doctranslets/html/gjdoc.xsl 2004-01-16 23:04:10.000000000 +0900 +@@ -31,7 +31,7 @@ + xmlns="http://www.gnu.org/software/cp-tools/gjdocxslfiles"> + + + + +diff -uNr src.orig/resources/doctranslets/html/index.xsl src/resources/doctranslets/html/index.xsl +--- src.orig/resources/doctranslets/html/index.xsl 2003-03-18 21:53:45.000000000 +0900 ++++ src/resources/doctranslets/html/index.xsl 2004-01-16 23:04:54.000000000 +0900 +@@ -34,7 +34,7 @@ + + + +diff -uNr src.orig/resources/doctranslets/html/index_noframes.xsl src/resources/doctranslets/html/index_noframes.xsl +--- src.orig/resources/doctranslets/html/index_noframes.xsl 2003-03-18 21:53:45.000000000 +0900 ++++ src/resources/doctranslets/html/index_noframes.xsl 2004-01-16 23:04:23.000000000 +0900 +@@ -34,7 +34,7 @@ + + + + + +diff -uNr src.orig/resources/doctranslets/html/packageclasses.xsl src/resources/doctranslets/html/packageclasses.xsl +--- src.orig/resources/doctranslets/html/packageclasses.xsl 2003-03-18 21:53:45.000000000 +0900 ++++ src/resources/doctranslets/html/packageclasses.xsl 2004-01-16 23:05:34.000000000 +0900 +@@ -33,7 +33,7 @@ + + + + + +diff -uNr src.orig/resources/doctranslets/html/packagedoc.xsl src/resources/doctranslets/html/packagedoc.xsl +--- src.orig/resources/doctranslets/html/packagedoc.xsl 2003-03-18 21:53:45.000000000 +0900 ++++ src/resources/doctranslets/html/packagedoc.xsl 2004-01-16 23:05:22.000000000 +0900 +@@ -1,4 +1,4 @@ +- ++ + + + + + +@@ -453,7 +453,7 @@ + + + +- ++ + + + + --- gjdoc-0.7.8.orig/debian/patches/10_gjdoc_sh_in.patch +++ gjdoc-0.7.8/debian/patches/10_gjdoc_sh_in.patch @@ -0,0 +1,11 @@ +--- gjdoc.sh.in.orig 2005-03-14 22:02:06.000000000 +0000 ++++ gjdoc.sh.in 2005-03-14 22:02:23.000000000 +0000 +@@ -28,8 +28,6 @@ + if [ -z "${JAVA}" ]; then + if [ -n "$JAVA_HOME" ]; then + JAVA="${JAVA_HOME}/bin/java" +- elif [ -x "${prefix}/bin/java" ]; then +- JAVA="${prefix}/bin/java" + else + JAVA=@JAVA@ + fi --- gjdoc-0.7.8.orig/debian/patches/06_no1.4classpath.dpatch +++ gjdoc-0.7.8/debian/patches/06_no1.4classpath.dpatch @@ -0,0 +1,35 @@ +#! /bin/sh -e +## DP: don't use 1.4 classpath + +if [ $# -ne 1 ]; then echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"; exit 1; fi + +case "$1" in + -patch) + patch -f --no-backup-if-mismatch -p0 < $0 + ;; + -unpatch) + patch -f --no-backup-if-mismatch -R -p0 < $0 + ;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 + ;; +esac + +exit 0 + +--- src/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTransletException.javai.orig 2003-03-07 14:32:15.000000000 +0000 ++++ src/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTransletException.java 2003-06-28 14:27:21.000000000 +0100 +@@ -27,10 +27,10 @@ + } + + public DocTransletException(String msg, Throwable cause) { +- super(msg, cause); ++ super(msg + " - caused by - "+cause.toString()); + } + + public DocTransletException(Throwable cause) { +- super(cause); ++ super( "Caused by - "+cause.toString() ); + } + } --- gjdoc-0.7.8.orig/debian/patches/00list +++ gjdoc-0.7.8/debian/patches/00list @@ -0,0 +1,8 @@ +01xml_catalog +02classpath_copyright +03dtd +06_no1.4classpath +07_default_out_dir +08_encoding +09_no_code_tag_in_param +09_saxon --- gjdoc-0.7.8.orig/debian/patches/template +++ gjdoc-0.7.8/debian/patches/template @@ -0,0 +1,20 @@ +#! /bin/sh -e +## DP: DUMMY + +if [ $# -ne 1 ]; then echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"; exit 1; fi + +case "$1" in + -patch) + patch -f --no-backup-if-mismatch -p0 < $0 + ;; + -unpatch) + patch -f --no-backup-if-mismatch -R -p0 < $0 + ;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 + ;; +esac + +exit 0 + --- gjdoc-0.7.8.orig/debian/patches/01xml_catalog.dpatch +++ gjdoc-0.7.8/debian/patches/01xml_catalog.dpatch @@ -0,0 +1,30 @@ +#! /bin/sh -e +## DP: create gjdoccatalog.xml file + +if [ $# -ne 1 ]; then echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"; exit 1; fi + +case "$1" in + -patch) + patch -f --no-backup-if-mismatch -p0 < $0 + ;; + -unpatch) + rm gjdoccatalog.xml + ;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 + ;; +esac + +exit 0 + +--- gjdoccatalog.xml.copy 2002-12-18 10:47:27.000000000 +0000 ++++ gjdoccatalog.xml 2002-12-17 18:32:04.000000000 +0000 +@@ -0,0 +1 @@ ++ ++ ++ ++ ++ ++ ++ --- gjdoc-0.7.8.orig/debian/patches/02classpath_copyright.dpatch +++ gjdoc-0.7.8/debian/patches/02classpath_copyright.dpatch @@ -0,0 +1,24 @@ +#! /bin/sh -e +## DP: create classpath-copyright.xml file on advice of upstream. + +if [ $# -ne 1 ]; then echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"; exit 1; fi + +case "$1" in + -patch) + patch -f --no-backup-if-mismatch -p0 < $0 + ;; + -unpatch) + rm classpath-copyright.xml + ;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 + ;; +esac + +exit 0 + +--- classpath-copyright.xml.c 2002-12-18 19:13:06.000000000 +0000 ++++ classpath-copyright.xml 2002-12-18 19:13:01.000000000 +0000 +@@ -0,0 +1 @@ ++

Copyright (c) 2002 Free Software Foundation

--- gjdoc-0.7.8.orig/debian/manpages/gjdoc.1 +++ gjdoc-0.7.8/debian/manpages/gjdoc.1 @@ -0,0 +1,106 @@ +.TH GJDOC 1 "Wed, 18 Dec 2002 10:52:48 +0000 +.SH NAME +gjdoc \- Extract javadoc documentation from Java source files +.SH SYNOPSIS +.B gjdoc +.RI [options] [packagenames] [classnames] [@files] +.SH DESCRIPTION +This manual page documents briefly the +.B gjdoc +command. +This manual page was written for the Debian distribution +because the original program does not have a manual page. It may be out of date +and contain incorrect information. Please submit a bug report if you find this +to be the case. +.PP +\fBgjdoc\fP extracts specially formatted documentation strings from Java source +files and produces html output. This extraction is similar to that done by Sun's +javadoc program. +.SH OPTIONS +.TP +\fB\-doclet\fR +Doclet class to use for generating output +.TP +\fB\-sourcepath\fR +Where to look for source files +.TP +\fB\-public\fR +Include only public classes and members +.TP +\fB\-protected\fR +Include protected/public classes and members (default) +.TP +\fB\-package\fR +Include package/protected/public classes and members +.TP +\fB\-private\fR +Include all classes and members +.TP +\fB\-verbose\fR +Output messages about what Gjdoc is doing +.TP +\fB\-help\fR +Show help summary +.SH STANDARD DOCLET OPTIONS +.TP +\fB\-genhtml \fR +Generate HTML code instead of XML code. This is the default. +.TP +\fB\-geninfo\fR +Generate Info code instead of XML code. +.TP +\fB\-xslsheet \fR +If specified, XML files will be written to a temporary directory and transformed +using the given XSL sheet. The result of the transformation is written to the +output directory. Not required if -genhtml or -geninfo has been specified. +.TP +\fB\-xmlonly\fR +Generate XML code only, do not generate HTML code. +.TP +\fB\-title\fR +Title for this set of API documentation. +.TP +\fB\-bottomnote\fR +HTML code to include at the bottom of each page. +.TP +\fB\-nofixhtml\fR +If not specified, heurestics will be applied to fix broken HTML code in +comments. +.TP +\fB\-nohtmlwarn\fR +Do not emit warnings when encountering broken HTML code. +.TP +\fB\-noemailwarn\fR +Do not emit warnings when encountering strings like . +.TP +\fB\-indentstep \fR +How many spaces to indent each tag level in generated XML code. +.TP +\fB\-xsltdriver \fR +Specifies the XSLT driver to use for transformation. By default, xsltproc is +used. +.TP +\fB\-postprocess \fR +XmlDoclet postprocessor class to apply after XSL transformation. +.TP +\fB\-compress\fR +Generated info pages will be Zip-compressed. +.TP +\fB\-workpath\fR +Specify a temporary directory to use. +.TP +\fB\-taglet\fR +Adds a Taglet class to the map of taglets. +.TP +\fB\-tagletpath\fR +Sets the CLASSPATH to load subsequent Taglets from. + + +.BR For documentation - temporarily - refer to Sun's `javadoc' homepage, +http://java.sun.com/j2se/javadoc/index.html +.br +.SH AUTHOR +This manual page was written by Mark Howard , +for the Debian GNU/Linux system (but may be used by others). The options section +was generqted automatically by help2man. + --- gjdoc-0.7.8.orig/debian/control +++ gjdoc-0.7.8/debian/control @@ -0,0 +1,28 @@ +Source: gjdoc +Section: devel +Priority: optional +Maintainer: Debian Java Maintainers +Uploaders: Mark Howard , Arnaud Vandyck , Michael Koch , Matthias Klose +Build-Depends: debhelper (>> 5), cdbs, + gcj-4.2 (>= 4.2.1-3) [!alpha !m68k], gcj-4.1 (>= 4.1.2) [alpha m68k], + libgcj-bc (>= 4.2.1-2) [!alpha !m68k], libgcj-bc (>= 4.1.2) [alpha m68k], + fastjar, antlr (>= 2.7.1), texlive-latex-base, perl, python, time, sharutils +Standards-Version: 3.7.2 + +Package: gjdoc +Architecture: any +Depends: debhelper (>> 5), gij | java-gcj-compat | java1-runtime | java2-runtime, antlr, ${shlibs:Depends} +Conflicts: gjdoc-native +Replaces: gjdoc-native +Description: documentation generation framework for java source files + A doclet driver for the Java(tm) platform which is compatible to javadoc up to + and including version 1.4. + . + In addition to a standard doclet for producing a set of HTML pages, gjdoc + provides a doclet for generating XML output. + . + This package also includes dh_javadoc, a debhelper style script for handing + javadoc generation in Debian packages. + . + This tool is part of the GNU classpath project. + http://www.gnu.org/software/cp-tools/ --- gjdoc-0.7.8.orig/debian/compat +++ gjdoc-0.7.8/debian/compat @@ -0,0 +1 @@ +4 --- gjdoc-0.7.8.orig/debian/rules +++ gjdoc-0.7.8/debian/rules @@ -0,0 +1,105 @@ +#!/usr/bin/make -f + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/autotools.mk +include /usr/share/cdbs/1/rules/simple-patchsys.mk + +VERSION := $(shell head -1 debian/changelog | cut -f2 -d\( | cut -f1 -d\) | cut -f1 -d\-) +DH_JAVADOC_VER = "0.1" + +ifeq (,$(filter $(DEB_HOST_ARCH), alpha m68k)) + GCC_VERSION = 4.2 + LIBGCJ_EXT = 8 + LIBGCJ_SOVER = 81 + REQ_VERSION = 4.2.1 +else + GCC_VERSION = 4.1 + LIBGCJ_EXT = 7 + LIBGCJ_SOVER = 71 + REQ_VERSION = 4.1.2-3 +endif + +GCJ = gcj-$(GCC_VERSION) +GCJSUBDIR = /usr/lib/gcj-$(GCC_VERSION)-$(LIBGCJ_SOVER) +ANTLR_JAR = /usr/share/java/antlr.jar + +include /usr/share/gcj/debian_defaults +#ifneq (,$(filter $(DEB_HOST_ARCH), $(gcj_native_archs) arm armel hppa m68k)) + with_gcj_native := yes +#endif + +DEB_CONFIGURE_SCRIPT_ENV = \ + JAVA=gij-$(GCC_VERSION) \ + JAVAC=gcj-wrapper-$(GCC_VERSION) \ + JAR=fastjar \ + GCJ=$(GCJ) \ + ANTLR_JAR=$(ANTLR_JAR) + +GCJ_DBTOOL = gcj-dbtool-$(GCC_VERSION) + +DEB_CONFIGURE_USER_FLAGS = --disable-native --enable-xmldoclet + +build-native-stamp: + rm -rf build-native + mkdir -p build-native +ifeq ($(with_gcj_native),yes) + rm -rf build-native/*.jar* + cp -p *.jar build-native/ + + rm -rf build-resources + mkdir -p build-resources + cd build-resources; \ + for i in ../*.jar; do \ + fastjar -xf $$i; \ + done + find build-resources -name '*.class' -type f | xargs -r rm -f + rm -rf build-resources/META-INF build-resources/*.txt + find build-resources -depth -type d -empty -delete + cd build-resources && find -type f \ + | fastjar -c -@ -f $(CURDIR)/build-native/resources.jar + + PYTHONPATH=$(CURDIR)/debian \ + RPATH=-Wl,-rpath,$(GCJSUBDIR) \ + time python debian/aot-compile \ + --gcj=$(GCJ) --dbtool='$(GCJ_DBTOOL)' \ + -L /usr/lib/gcj build-native build-native +endif + time $(GCJ) -g -O1 -o build-native/gjdoc \ + -Wl,-rpath,$(GCJSUBDIR) \ + --main=gnu.classpath.tools.gjdoc.Main \ + -Dgnu.gcj.runtime.VMClassLoader.library_control=never \ + $(ANTLR_JAR) *.jar + + -build-native/gjdoc --help + + touch build-native-stamp + +install/gjdoc:: build-native-stamp + cp debian/scripts/dh_javadoc debian/gjdoc/usr/bin + mkdir -p debian/gjdoc/usr/share/man/man1 + pod2man -c Debhelper -r $(DH_JAVADOC_VER) \ + debian/scripts/dh_javadoc \ + debian/gjdoc/usr/share/man/man1/dh_javadoc.1 + ln -sf com-sun-javadoc-$(VERSION).jar \ + debian/gjdoc/usr/share/java/com-sun-javadoc.jar + ln -sf com-sun-tools-doclets-Taglet-$(VERSION).jar \ + debian/gjdoc/usr/share/java/com-sun-tools-doclets-Taglet.jar + ln -sf gnu-classpath-tools-gjdoc-$(VERSION).jar \ + debian/gjdoc/usr/share/java/gnu-classpath-tools-gjdoc.jar + + install -m755 build-native/gjdoc debian/gjdoc/usr/bin/ + -cd debian/gjdoc/usr/bin && ./gjdoc --help + +ifeq ($(with_gcj_native),yes) + mkdir -p debian/gjdoc/usr/lib/gcj + install -m644 build-native/*.jar.so debian/gjdoc/usr/lib/gcj/ + mkdir -p debian/gjdoc/usr/share/gcj/classmap.d + install -m644 build-native/*.db debian/gjdoc/usr/share/gcj/classmap.d/ +endif + +#binary-predeb/gjdoc:: +# sed -i 's/libgcj[1-9][^,]*//;s/,,/,/' debian/gjdoc.substvars + +clean:: + rm -f debian/*.pyc + rm -rf build-native* build-resources --- gjdoc-0.7.8.orig/debian/aotcompile.py +++ gjdoc-0.7.8/debian/aotcompile.py @@ -0,0 +1,431 @@ + +# -*- python -*- + +## Copyright (C) 2005, 2006 Red Hat, Inc. +## Written by Gary Benson +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. + +import classfile +import copy +import md5 +import operator +import os +import sys +import cStringIO as StringIO +import zipfile + +PATHS = {"make": "/usr/bin/make", + "gcj": "/usr/bin/gcj-4.2", + "dbtool": "/usr/bin/gcj-dbtool-4.2"} + +MAKEFLAGS = [] +GCJFLAGS = ["-g", "-O2", "-fPIC", "-findirect-dispatch", "-fjni"] +LDFLAGS = ["-Wl,-Bsymbolic"] + +MAX_CLASSES_PER_JAR = 1024 +MAX_BYTES_PER_JAR = 1048576 + +try: + for line in file('/proc/meminfo'): + if line.startswith('MemTotal:'): + memtotal = int(line.split()[1]) + if memtotal < 270000: + MAX_CLASSES_PER_JAR = 512 + MAX_BYTES_PER_JAR = 524288 + if memtotal < 140000: + MAX_CLASSES_PER_JAR = 256 + MAX_BYTES_PER_JAR = 262144 +except: + pass + +MAKEFILE = "Makefile" + +MAKEFILE_HEADER = '''\ +GCJ = %(gcj)s +DBTOOL = %(dbtool)s +GCJFLAGS = %(gcjflags)s +LDFLAGS = %(ldflags)s + +%%.o: %%.jar + $(GCJ) -c $(GCJFLAGS) $< -o $@ + +TARGETS = \\ +%(targets)s \\ +gjdoc + +all: $(TARGETS) + +gjdoc_objects = $(com_sun_javadoc_0_7_8_jar_so_OBJECTS) $(com_sun_tools_doclets_Taglet_0_7_8_jar_so_OBJECTS) $(gnu_classpath_tools_gjdoc_0_7_8_jar_so_OBJECTS) resources.o +gjdoc: $(gjdoc_objects) + $(GCJ) $(GCJFLAGS) $(RPATH) -Wl,-O1 \\ + --main=gnu.classpath.tools.gjdoc.Main \\ + -Dgnu.gcj.runtime.VMClassLoader.library_control=never $(gjdoc_objects) -o $@ +''' + +MAKEFILE_JOB = ''' +%(base)s_SOURCES = \\ +%(jars)s + +%(base)s_OBJECTS = \\ +$(%(base)s_SOURCES:.jar=.o) + +%(dso)s: $(%(base)s_OBJECTS) + $(GCJ) -shared $(GCJFLAGS) $(LDFLAGS) $^ -o $@ + +%(db)s: $(%(base)s_SOURCES) + $(DBTOOL) -n $@ 64 + for jar in $^; do \\ + $(DBTOOL) -f $@ $$jar \\ + %(libdir)s/%(dso)s; \\ + done''' + +ZIPMAGIC, CLASSMAGIC = "PK\x03\x04", "\xca\xfe\xba\xbe" + +class Error(Exception): + pass + +class Compiler: + def __init__(self, srcdir, dstdir): + self.srcdir = os.path.abspath(srcdir) + self.dstdir = os.path.abspath(dstdir) + if not self.dstdir.startswith(self.srcdir): + raise Error, "dstdir must be within srcdir" + self.libdir = dstdir[len(self.srcdir):] + + # Calling code may modify these parameters + self.gcjflags = copy.copy(GCJFLAGS) + self.ldflags = copy.copy(LDFLAGS) + self.makeflags = copy.copy(MAKEFLAGS) + self.exclusions = [] + + def compile(self): + """Search srcdir for classes and jarfiles, then generate + solibs and mappings databases for them all in libdir.""" + if not os.path.isdir(self.dstdir): + os.makedirs(self.dstdir) + oldcwd = os.getcwd() + os.chdir(self.dstdir) + try: + jobs = self.getJobList() + self.writeMakefile(MAKEFILE, jobs) + for job in jobs: + job.writeJars() + system([PATHS["make"]] + self.makeflags) + for job in jobs: + job.clean() + os.unlink(MAKEFILE) + finally: + os.chdir(oldcwd) + + def getJobList(self): + """Return all jarfiles and class collections in srcdir.""" + jobs = weed_jobs(find_jobs(self.srcdir, self.exclusions)) + set_basenames(jobs) + return jobs + + def writeMakefile(self, path, jobs): + """Generate a makefile to build the solibs and mappings + databases for the specified list of jobs.""" + fp = open(path, "w") + print >>fp, MAKEFILE_HEADER % { + "gcj": PATHS["gcj"], + "dbtool": PATHS["dbtool"], + "gcjflags": " ".join(self.gcjflags), + "ldflags": " ".join(self.ldflags), + "targets": " \\\n".join(reduce(operator.add, [ + (job.dsoName(), job.dbName()) for job in jobs]))} + for job in jobs: + values = job.ruleArguments() + values["libdir"] = self.libdir + print >>fp, MAKEFILE_JOB % values + fp.close() + +def find_jobs(dir, exclusions = ()): + """Scan a directory and find things to compile: jarfiles (zips, + wars, ears, rars, etc: we go by magic rather than file extension) + and directories of classes.""" + def visit((classes, zips), dir, items): + for item in items: + path = os.path.join(dir, item) + if os.path.islink(path) or not os.path.isfile(path): + continue + magic = open(path, "r").read(4) + if magic == ZIPMAGIC: + zips.append(path) + elif magic == CLASSMAGIC: + classes.append(path) + classes, paths = [], [] + os.path.walk(dir, visit, (classes, paths)) + # Convert the list of classes into a list of directories + while classes: + # XXX this requires the class to be correctly located in its heirachy. + path = classes[0][:-len(os.sep + classname(classes[0]) + ".class")] + paths.append(path) + classes = [cls for cls in classes if not cls.startswith(path)] + # Handle exclusions. We're really strict about them because the + # option is temporary in aot-compile-rpm and dead options left in + # specfiles will hinder its removal. + for path in exclusions: + if path in paths: + paths.remove(path) + else: + raise Error, "%s: path does not exist or is not a job" % path + # Build the list of jobs + jobs = [] + paths.sort() + for path in paths: + if os.path.isfile(path): + job = JarJob(path) + else: + job = DirJob(path) + if len(job.classes): + jobs.append(job) + return jobs + +class Job: + """A collection of classes that will be compiled as a unit.""" + + def __init__(self, path): + self.path, self.classes, self.blocks = path, {}, None + + def addClass(self, bytes): + """Subclasses call this from their __init__ method for + every class they find.""" + self.classes[md5.new(bytes).digest()] = bytes + + def __makeBlocks(self): + """Split self.classes into chunks that can be compiled to + native code by gcj. In the majority of cases this is not + necessary -- the job will have come from a jarfile which will + be equivalent to the one we generate -- but this only happens + _if_ the job was a jarfile and _if_ the jarfile isn't too big + and _if_ the jarfile has the correct extension and _if_ all + classes are correctly named and _if_ the jarfile has no + embedded jarfiles. Fitting a special case around all these + conditions is tricky to say the least. + + Note that this could be called at the end of each subclass's + __init__ method. The reason this is not done is because we + need to parse every class file. This is slow, and unnecessary + if the job is subsetted.""" + names = {} + for hash, bytes in self.classes.items(): + name = classname(bytes) + if not names.has_key(name): + names[name] = [] + names[name].append(hash) + names = names.items() + # We have to sort somehow, or the jars we generate + # We sort by name in a simplistic attempt to keep related + # classes together so inter-class optimisation can happen. + names.sort() + self.blocks, bytes = [[]], 0 + for name, hashes in names: + for hash in hashes: + if len(self.blocks[-1]) >= MAX_CLASSES_PER_JAR \ + or bytes >= MAX_BYTES_PER_JAR: + self.blocks.append([]) + bytes = 0 + self.blocks[-1].append((name, hash)) + bytes += len(self.classes[hash]) + + # From Archit Shah: + # The implementation and the documentation don't seem to match. + # + # [a, b].isSubsetOf([a]) => True + # + # Identical copies of all classes this collection do not exist + # in the other. I think the method should be named isSupersetOf + # and the documentation should swap uses of "this" and "other" + # + # XXX think about this when I've had more sleep... + def isSubsetOf(self, other): + """Returns True if identical copies of all classes in this + collection exist in the other.""" + for item in other.classes.keys(): + if not self.classes.has_key(item): + return False + return True + + def __targetName(self, ext): + return self.basename + ext + + def tempJarName(self, num): + return self.__targetName(".%d.jar" % (num + 1)) + + def tempObjName(self, num): + return self.__targetName(".%d.o" % (num + 1)) + + def dsoName(self): + """Return the filename of the shared library that will be + built from this job.""" + return self.__targetName(".so") + + def dbName(self): + """Return the filename of the mapping database that will be + built from this job.""" + return self.__targetName(".db") + + def ruleArguments(self): + """Return a dictionary of values that when substituted + into MAKEFILE_JOB will create the rules required to build + the shared library and mapping database for this job.""" + if self.blocks is None: + self.__makeBlocks() + return { + "base": "".join( + [c.isalnum() and c or "_" for c in self.dsoName()]), + "jars": " \\\n".join( + [self.tempJarName(i) for i in xrange(len(self.blocks))]), + "dso": self.dsoName(), + "db": self.dbName()} + + def writeJars(self): + """Generate jarfiles that can be native compiled by gcj.""" + if self.blocks is None: + self.__makeBlocks() + for block, i in zip(self.blocks, xrange(len(self.blocks))): + jar = zipfile.ZipFile(self.tempJarName(i), "w", zipfile.ZIP_STORED) + for name, hash in block: + jar.writestr( + zipfile.ZipInfo("%s.class" % name), self.classes[hash]) + jar.close() + + def clean(self): + """Delete all temporary files created during this job's build.""" + if self.blocks is None: + self.__makeBlocks() + for i in xrange(len(self.blocks)): + os.unlink(self.tempJarName(i)) + os.unlink(self.tempObjName(i)) + +class JarJob(Job): + """A Job whose origin was a jarfile.""" + + def __init__(self, path): + Job.__init__(self, path) + self._walk(zipfile.ZipFile(path, "r")) + + def _walk(self, zf): + for name in zf.namelist(): + bytes = zf.read(name) + if bytes.startswith(ZIPMAGIC): + self._walk(zipfile.ZipFile(StringIO.StringIO(bytes))) + elif bytes.startswith(CLASSMAGIC): + self.addClass(bytes) + +class DirJob(Job): + """A Job whose origin was a directory of classfiles.""" + + def __init__(self, path): + Job.__init__(self, path) + os.path.walk(path, DirJob._visit, self) + + def _visit(self, dir, items): + for item in items: + path = os.path.join(dir, item) + if os.path.islink(path) or not os.path.isfile(path): + continue + fp = open(path, "r") + magic = fp.read(4) + if magic == CLASSMAGIC: + self.addClass(magic + fp.read()) + +def weed_jobs(jobs): + """Remove any jarfiles that are completely contained within + another. This is more common than you'd think, and we only + need one nativified copy of each class after all.""" + jobs = copy.copy(jobs) + while True: + for job1 in jobs: + for job2 in jobs: + if job1 is job2: + continue + if job1.isSubsetOf(job2): + msg = "subsetted %s" % job2.path + if job2.isSubsetOf(job1): + if (isinstance(job1, DirJob) and + isinstance(job2, JarJob)): + # In the braindead case where a package + # contains an expanded copy of a jarfile + # the jarfile takes precedence. + continue + msg += " (identical)" + warn(msg) + jobs.remove(job2) + break + else: + continue + break + else: + break + continue + return jobs + +def set_basenames(jobs): + """Ensure that each jarfile has a different basename.""" + names = {} + for job in jobs: + name = os.path.basename(job.path) + if not names.has_key(name): + names[name] = [] + names[name].append(job) + for name, set in names.items(): + if len(set) == 1: + set[0].basename = name + continue + # prefix the jar filenames to make them unique + # XXX will not work in most cases -- needs generalising + set = [(job.path.split(os.sep), job) for job in set] + minlen = min([len(bits) for bits, job in set]) + set = [(bits[-minlen:], job) for bits, job in set] + bits = apply(zip, [bits for bits, job in set]) + while True: + row = bits[-2] + for bit in row[1:]: + if bit != row[0]: + break + else: + del bits[-2] + continue + break + set = zip( + ["_".join(name) for name in apply(zip, bits[-2:])], + [job for bits, job in set]) + for name, job in set: + warn("building %s as %s" % (job.path, name)) + job.basename = name + # XXX keep this check until we're properly general + names = {} + for job in jobs: + name = job.basename + if names.has_key(name): + raise Error, "%s: duplicate jobname" % name + names[name] = 1 + +def system(command): + """Execute a command.""" + status = os.spawnv(os.P_WAIT, command[0], command) + if status > 0: + raise Error, "%s exited with code %d" % (command[0], status) + elif status < 0: + raise Error, "%s killed by signal %d" % (command[0], -status) + +def warn(msg): + """Print a warning message.""" + print >>sys.stderr, "%s: warning: %s" % ( + os.path.basename(sys.argv[0]), msg) + +def classname(bytes): + """Extract the class name from the bytes of a class file.""" + klass = classfile.Class(bytes) + return klass.constants[klass.constants[klass.name][1]][1] --- gjdoc-0.7.8.orig/debian/fake-dbtool +++ gjdoc-0.7.8/debian/fake-dbtool @@ -0,0 +1,8 @@ +#! /bin/sh + +echo XXX $@ +case "$1" in + -n) touch "$2" +esac + +exit 0 --- gjdoc-0.7.8.orig/debian/changelog +++ gjdoc-0.7.8/debian/changelog @@ -0,0 +1,412 @@ +gjdoc (0.7.8-6) unstable; urgency=low + + * Build-depend on sharutils for configure test. + + -- Matthias Klose Wed, 05 Sep 2007 00:26:52 +0200 + +gjdoc (0.7.8-5) unstable; urgency=low + + * Tighten build-dependency on libgcj-bc. + + -- Matthias Klose Sat, 25 Aug 2007 20:21:07 +0200 + +gjdoc (0.7.8-4) unstable; urgency=medium + + * Build using gcj-4.1 on alpha. + + -- Matthias Klose Sat, 25 Aug 2007 13:53:47 +0200 + +gjdoc (0.7.8-3) unstable; urgency=low + + * Build using gcj-4.2 on all architectures except m68k. + + -- Matthias Klose Sat, 25 Aug 2007 11:58:47 +0200 + +gjdoc (0.7.8-2) unstable; urgency=medium + + * Build using gcj-4.2 on arm, armel, hppa. + * BC-compile gjdoc. + + -- Matthias Klose Sat, 04 Aug 2007 22:05:19 +0200 + +gjdoc (0.7.8-1ubuntu1) gutsy; urgency=low + + * Build using gcj-4.2. + * Set Ubuntu maintainer address. + + -- Matthias Klose Sun, 22 Jul 2007 16:24:28 +0200 + +gjdoc (0.7.8-1) unstable; urgency=low + + * New upstream version, runs sucessfully against the backported + libjava in gcj-4.1. + - Fixes PR gjdoc/24723, resolving links. Closes: #379088. + * Set java to gij-4.1 instead of gij-4.1-wrapper. + * Adjust (build-)dependencies. + + -- Matthias Klose Wed, 02 May 2007 17:48:57 +0200 + +gjdoc (0.7.7-8) experimental; urgency=low + + * Build-depend on gcj generics backport. + * Add gij as an alternative dependency. + + -- Matthias Klose Sun, 4 Mar 2007 00:38:11 +0100 + +gjdoc (0.7.7-7) unstable; urgency=low + + * Use back gcj-dbtool-4.1 and gij-wrapper-4.1 on arm (closes: + bug#400791). Thanks to Aurelien Jarno. + + -- Arnaud Vandyck Mon, 4 Dec 2006 16:39:35 +0100 + +gjdoc (0.7.7-6) unstable; urgency=low + + * Use gcj-4.1, not gcj. + + -- Matthias Klose Sat, 14 Oct 2006 20:08:56 +0200 + +gjdoc (0.7.7-5) unstable; urgency=medium + + * Do not require a java runtime for the package build. + * Configure with --disable-native, use aot-compile to build the + .jar.so files. + + -- Matthias Klose Sat, 14 Oct 2006 16:35:12 +0200 + +gjdoc (0.7.7-4) unstable; urgency=low + + * Build depend on gcj-4.1 (>= 4.1.1-15). + * Remove --disable-native on m68k. Closes: #389015. + + -- Matthias Klose Wed, 4 Oct 2006 22:59:30 +0200 + +gjdoc (0.7.7-3) unstable; urgency=low + + * Build depend on gcj-4.1 (>= 4.1.1-13). + + -- Matthias Klose Sat, 2 Sep 2006 14:16:52 +0000 + +gjdoc (0.7.7-2) unstable; urgency=low + + * debian/control: Build-Depends on libgcj7-dev and gcj-4.1. + * debian/rules: Use GCJ 4.1. + * Removed Takashi Okamoto from Uploaders (Closes: #352979). + * Fixed section of debhelper man-page in debian/scripts/dh_javadoc + (Closes: #363155). + * Updated Standards-Version to 3.7.2. + * Fixed typo in debian/README.Debian. + + -- Michael Koch Sat, 20 May 2006 10:21:45 +0000 + +gjdoc (0.7.7-1) unstable; urgency=low + + * New upstream release + + -- Michael Koch Sun, 18 Dec 2005 13:40:33 +0000 + +gjdoc (0.7.6-1) unstable; urgency=low + + * New upstream release + - Removed debian/patches/gjdoc-posix.patch. Applied upstream. + * Depends on libgcj6 directly with using ${shlips:Depends} + (Closes: #330140). + + -- Michael Koch Fri, 14 Oct 2005 20:35:23 +0000 + +gjdoc (0.7.5-5) unstable; urgency=low + + * debian/rules: Set GCJ variable to point to /usr/bin/gcj-4.0 before running + configure + + -- Michael Koch Fri, 23 Sep 2005 21:53:15 +0000 + +gjdoc (0.7.5-4) unstable; urgency=low + + * Build-Depends on libgcj6-dev, gij-4.0, fastjar instead of java-gc-compat + and sablvm (Closes: #328929) + * Reworked debian/rules for new Build-Depends + + -- Michael Koch Sun, 18 Sep 2005 16:27:24 +0000 + +gjdoc (0.7.5-3) unstable; urgency=low + + * Build-Depends on java-gcj-compat instead of java-gcj-compat-dev + * debian/rules: Use gcj-wrapper-4.0 as javac to build the package + + -- Michael Koch Sat, 17 Sep 2005 07:33:49 +0000 + +gjdoc (0.7.5-2) unstable; urgency=low + + * Depends on java-gcj-compat | java1-runtime (Closes: #245204, #319168) + * Moved Build-Depends-Indep to Build-Depends + * Build-Depends on java-gcj-compat-dev instead of kaffe, jikes, fastjar + * debian/rules: Use commands from java-gcj-compat-dev + * debian/rules: Dont delete files installed to /usr/lib + * debian/control: Make gjdoc an architecture dependant package + * Fixed address of FSF in debian/copyright + * Updated Standards-Version to 3.6.2 + + -- Michael Koch Wed, 14 Sep 2005 19:12:57 +0000 + +gjdoc (0.7.5-1) unstable; urgency=low + + * New upstream release (Closes: #306371, #308913, #309219) + * Removed debian/patches/10_gjdoc_sh_in.patch + * Removed debian/patches/gjdoc-checkparamslength.patch + * Removed debian/patches/gjdoc-parameterimpl.patch + * Added debian/patches/gjdoc-posix.patch (Closes: #309903) + + -- Michael Koch Sat, 18 Jun 2005 20:18:03 +0200 + +gjdoc (0.7.4-1) unstable; urgency=low + + * New upstream release + + -- Michael Koch Sun, 1 May 2005 15:24:50 +0000 + +gjdoc (0.7.3-1) unstable; urgency=low + + * New upstream release + - Removed debian/patches/10_gjdoc_sh_in.patch + * Updated debian/copyright (Closes: #299426) + * debian/control: Revised description + * debian/rules: Automate getting upstream version + * Updated watch file + + -- Michael Koch Tue, 15 Mar 2005 13:00:41 +0000 + +gjdoc (0.7.2-2) unstable; urgency=low + + * Fixed gjdoc.sh.in + + -- Michael Koch Thu, 10 Mar 2005 09:21:20 +0000 + +gjdoc (0.7.2-1) unstable; urgency=low + + * New upstream release + + -- Michael Koch Wed, 9 Mar 2005 15:30:37 +0000 + +gjdoc (0.7.1-2) unstable; urgency=low + + * Fixed Depends on kaffe. + * Added watch file. + + -- Michael Koch Fri, 25 Feb 2005 08:18:38 +0000 + +gjdoc (0.7.1-1) unstable; urgency=low + + * New upstream release + * Removed debian/patches/01-gjdoc_script_antlr_in_classpath.patch. + * debian/control: Use correct epoch when depending on kaffe. + + -- Michael Koch Tue, 22 Feb 2005 16:38:44 +0000 + +gjdoc (0.7.0+cvs20050217-2) unstable; urgency=low + + * debian/control: Revised description. + * Install manpage for dh_javadoc. + * Don't fail when trying to delete non-existant gjdoc_rawcomments.cache + (Closes: #293193). + * Removed obsolete dpatch files in debian/patches. + + -- Michael Koch Mon, 21 Feb 2005 09:13:49 +0000 + +gjdoc (0.7.0+cvs20050217-1) unstable; urgency=low + + * New upstream release + * Use CDBS and kaffe for building. + * Fixed Build-Depends. + * debian/control: Made short description start with a lower letter. + Updated Standards-Version. + * debian/README.Debian: Removed. + + -- Michael Koch Thu, 17 Feb 2005 16:55:10 -0600 + +gjdoc (0.6.1-14) unstable; urgency=low + + * debian/scripts/gjdoc: applied a patch from Loic Minier (thanks to him + and thanks to Kurt Roeckx for submitting the bug): + - fixes the syntax error (superfluous fi), + - adds sanitizing double-quotes, + - hence supports spaces in commands or classpath, + - uses /usr/bin/java as the default JVM when the PATH is broken, + - breaks fallback on "kaffe" when java isn't in the PATH (admin has to + fix his alternatives!). + + -- Arnaud Vandyck Sun, 21 Nov 2004 00:19:17 +0100 + +gjdoc (0.6.1-13) unstable; urgency=low + + * debian/README.Debian: added to explain how to override CLASSPATH and + virtual machine + * gjdoc: modify the script to check for an existing JAVA_HOME, JAVACMD + and CLASSPATH. + + -- Arnaud Vandyck Thu, 18 Nov 2004 22:42:24 +0100 + +gjdoc (0.6.1-12) unstable; urgency=low + + * support saxon XSLT processor. + + -- Takashi Okamoto Sun, 25 Jul 2004 11:41:32 +0900 + +gjdoc (0.6.1-11) unstable; urgency=low + + * javadoc alternative solved, applyed postinst patch, thanks to Loic + Minier. (closes: #252309) + * dh_javadoc: removed the generated gjdoc_rawcomment.cache file. + + -- Arnaud Vandyck Tue, 13 Jul 2004 22:53:15 +0200 + +gjdoc (0.6.1-10) unstable; urgency=low + + * problem with the @param tag when html is used as the first word of the + description + + -- Arnaud Vandyck Wed, 5 May 2004 13:01:00 +0200 + +gjdoc (0.6.1-9) unstable; urgency=low + + * added Takashi Okamoto and I as uploaders + * removed libxalan2-java as a dependency, gnujaxp is enough, so gjdoc + can go back to main! + * modified the gjdoc script to work only with gnujaxp + * gjdoc only works with kaffe at the moment + + -- Arnaud Vandyck Fri, 16 Apr 2004 21:19:06 +0200 + +gjdoc (0.6.1-8) unstable; urgency=low + + * Use encoding utf-8 instead of iso-8859-1 for I18N. + Now gjdoc work with kaffe. + + -- Takashi Okamoto Sat, 17 Jan 2004 12:25:52 +0900 + +gjdoc (0.6.1-7) unstable; urgency=low + + * Moved to contrib. Closes: #199673. + Hopefully an XSLT processor will be made available in main at some point + soon but this cannot be guaranteed, so moving to contrib until it happens + + -- Mark Howard Wed, 17 Dec 2003 09:15:41 +0000 + +gjdoc (0.6.1-6) unstable; urgency=low + + * Removed libgcj3 build dependency. Closes: #212090 + + -- Mark Howard Sat, 27 Sep 2003 17:11:14 +0100 + +gjdoc (0.6.1-5) unstable; urgency=low + + * Removed classpath documentation. It isn't always needed. Having it in the + package is not a good idea. If you encounter problems, either include it + manually or file bug reports and we'll se what we can do. + + -- Mark Howard Thu, 11 Sep 2003 19:58:25 +0100 + +gjdoc (0.6.1-4) unstable; urgency=low + + * Fixed typos in manpage. Closes: #209260 + + -- Mark Howard Thu, 11 Sep 2003 19:45:49 +0100 + +gjdoc (0.6.1-3) unstable; urgency=low + + * Removed references to javadoc-gjdoc. Closes: #206424 + + -- Mark Howard Tue, 26 Aug 2003 18:56:34 +0100 + +gjdoc (0.6.1-2) unstable; urgency=low + + * Use libgnujaxp-java rather than libxerces2-java. Closes: #199678 + * Compile with jikes explicitly. Closes: #204155 + Thanks to Arnaud Vandyck who provided help and + patches for both items. + * Changed maintainer to Debian Java Maintainers + + + -- Mark Howard Tue, 5 Aug 2003 18:52:18 +0100 + +gjdoc (0.6.1-1) unstable; urgency=low + + * New Upstream release Closes: #186115 + - now works (as default) far more like javadoc (generates nice html). Run + gjdoc -help for more options + Sorry it took so long to package. Thanks to Arnaud Vandyck + for advice. + * Determine libgcj version at runtime. Closes: #183692, #184823 + * Fixed gjdoc script. Closes: #188698 + * Removed javadoc-gjdoc wrapper. gjdoc is now sufficiently like javadoc + * Removed gjdoc-native package - Java Bytecode gjdoc now works and is far + more useful wrt debugging + * Created a few patches - make it work better as default + + -- Mark Howard Sat, 28 Jun 2003 19:06:29 +0100 + +gjdoc (0.4.1-1) experimental; urgency=low + + * New upstream release + This release seems generally unstable based on my limited testing, so + uploading to experimental. Please report bugs, preferably with patches. + * HTML generation now works better (Closes: #174478) + * Manpage has been fixed (Closes: #176885) + + -- Mark Howard Mon, 17 Feb 2003 19:33:42 +0000 + +gjdoc (0.0.20021217-2) unstable; urgency=low + + * dh_javadoc: removed unneccessary output + * dh_javadoc: Added ability to process debian/package.javadoc files + + -- Mark Howard Thu, 26 Dec 2002 19:15:19 +0000 + +gjdoc (0.0.20021217-1) unstable; urgency=low + + * New Maintainer - Mark Howard + * Reorganised debian/ directory + * New man pages for gjdocxml2html and javadoc-gjdoc + * Rewritten javadoc-gjdoc wrapper script + - now takes into account multiple class and source path parameters as well + as environment variables (Closes: #171717) + * New CVS Checkout (Closes: #173454) + * Fixed gjdoc-native dependencies (Closes: #170287) + * Included classpath sources as these are generally required for sucessful + operation of gjdoc (Closes: #171724) + * Started work on dh_javadoc: a debhelper script for creating and installing + javadoc into packages. Included in gjdoc packages for ease while it is + under heavy development. Please test and report your successes. + * gjdoc-native should now work well - please test on all your packages + (preferably by using dh_javadoc). Report any bugs or annoyances to the + bts. + + -- Mark Howard Thu, 19 Dec 2002 09:55:29 +0000 + +gjdoc (0.0.20021003-2) unstable; urgency=low + + * Alternative javadoc should use javadoc-gjdoc wrapper. + Closes: #167630 + + -- Grzegorz Prokopski (Debian Developer) Tue, 5 Nov 2002 23:06:42 +0100 + +gjdoc (0.0.20021003-1) unstable; urgency=low + + * New upstream version (current CVS) + * Cleaning to prepare for first upload + * First upload. Closes: #156411 + + -- Grzegorz Prokopski (Debian Developer) Sat, 26 Oct 2002 22:18:58 +0200 + +gjdoc (0.0.20020812-2) unstable; urgency=low + + * Adding gcj (native) resulting package + + -- Mark Howard Wed, 2 Oct 2002 13:31:27 +0100 + +gjdoc (0.0.20020812-1) unstable; urgency=low + + * Initial Release. + + -- Grzegorz Prokopski (Debian Developer) Mon, 12 Aug 2002 12:44:59 +0200 + --- gjdoc-0.7.8.orig/debian/classfile.py +++ gjdoc-0.7.8/debian/classfile.py @@ -0,0 +1,222 @@ + +## Copyright (C) 2004, 2005 Red Hat, Inc. +## Written by Gary Benson +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. + +"""Read Java(TM) class files.""" + +import cStringIO as StringIO +import struct + +class Class: + def __init__(self, arg): + if hasattr(arg, "read"): + self.fp = arg + elif type(arg) == type(""): + if arg.startswith("\xca\xfe\xba\xbe"): + self.fp = StringIO.StringIO(arg) + else: + self.fp = open(arg, "r") + else: + raise TypeError, type(arg) + + magic = self._read_int() + assert magic == 0xcafebabeL + minor, major = self._read(">HH") + self.version = (major, minor) + + self.pool_integrity_checks = None + try: + assert False + except AssertionError: + self.pool_integrity_checks = [] + + self._read_constants_pool() + + self.access_flags = self._read_short() + self.name = self._read_reference_Class() + self.super = self._read_reference_Class() + + self.interfaces = self._read_interfaces() + self.fields = self._read_fieldsormethods() + self.methods = self._read_fieldsormethods() + self.attributes = self._read_attributes() + + if self.pool_integrity_checks is not None: + for index, tag in self.pool_integrity_checks: + assert self.constants[index][0] == tag + + del self.fp, self.pool_integrity_checks + + def __repr__(self): + result = [] + attrs = [attr for attr in dir(self) + if not attr.startswith("_") and attr != "Member"] + attrs.sort() + for attr in attrs: + result.append("%-13s %s" % ( + attr + ":", attr == "constants" and + "" or repr(getattr(self, attr)))) + return "\n".join(result) + + def _read_constants_pool(self): + self.constants = {} + skip = False + for i in xrange(1, self._read_short()): + if skip: + skip = False + continue + tag = { + 1: "Utf8", 3: "Integer", 4: "Float", 5: "Long", + 6: "Double", 7: "Class", 8: "String", 9: "Fieldref", + 10: "Methodref", 11: "InterfaceMethodref", + 12: "NameAndType"}[self._read_byte()] + skip = tag in ("Long", "Double") # crack crack crack! + self.constants[i] = (tag, getattr(self, "_read_constant_" + tag)()) + + def _read_interfaces(self): + result = [] + for i in xrange(self._read_short()): + result.append(self._read_reference_Class()) + return result + + def _read_fieldsormethods(self): + result = [] + for i in xrange(self._read_short()): + result.append(self.Member(self)) + return result + + class Member: + def __init__(self, source): + self.access_flags = source._read_short() + self.name = source._read_reference_Utf8() + self.descriptor = source._read_reference_Utf8() + self.attributes = source._read_attributes() + + def __repr__(self): + result = [] + attrs = [attr for attr in dir(self) if not attr.startswith("_")] + attrs.sort() + for attr in attrs: + value = getattr(self, attr) + if attr == "attributes" and value.has_key("Code"): + value = value.copy() + value.update({"Code": ""}) + result.append("%-13s %s" % ( + attr + ":", repr(value).replace( + "'Code': ''", "'Code': "))) + return ("\n%s" % (15 * " ")).join(result) + + def _read_attributes(self): + result = {} + for i in xrange(self._read_short()): + name = self._read_reference_Utf8() + data = self.fp.read(self._read_int()) + assert not result.has_key(name) + result[name] = data + return result + + # Constants pool reference reader convenience functions + + def _read_reference_Utf8(self): + return self._read_references("Utf8")[0] + + def _read_reference_Class(self): + return self._read_references("Class")[0] + + def _read_reference_Class_NameAndType(self): + return self._read_references("Class", "NameAndType") + + def _read_references(self, *args): + result = [] + for arg in args: + index = self._read_short() + if self.pool_integrity_checks is not None: + self.pool_integrity_checks.append((index, arg)) + result.append(index) + return result + + # Constants pool constant reader functions + + def _read_constant_Utf8(self): + constant = self.fp.read(self._read_short()) + try: + constant = constant.decode("utf-8") + except UnicodeError: + constant = _bork_utf8_decode(constant) + try: + constant = constant.encode("us-ascii") + except UnicodeError: + pass + return constant + + def _read_constant_Integer(self): + return self._read_int() + + def _read_constant_Float(self): + return self._read(">f")[0] + + def _read_constant_Long(self): + return self._read(">q")[0] + + def _read_constant_Double(self): + return self._read(">d")[0] + + _read_constant_Class = _read_reference_Utf8 + _read_constant_String = _read_reference_Utf8 + _read_constant_Fieldref = _read_reference_Class_NameAndType + _read_constant_Methodref = _read_reference_Class_NameAndType + _read_constant_InterfaceMethodref = _read_reference_Class_NameAndType + + def _read_constant_NameAndType(self): + return self._read_reference_Utf8(), self._read_reference_Utf8() + + # Generic reader functions + + def _read_int(self): + # XXX how else to read 32 bits on a 64-bit box? + h, l = map(long, self._read(">HH")) + return (h << 16) + l + + def _read_short(self): + return self._read(">H")[0] + + def _read_byte(self): + return self._read("B")[0] + + def _read(self, fmt): + return struct.unpack(fmt, self.fp.read(struct.calcsize(fmt))) + +def _bork_utf8_decode(data): + # more crack! + bytes, unicode = map(ord, data), "" + while bytes: + b1 = bytes.pop(0) + if b1 & 0x80: + assert b1 & 0x40 + b2 = bytes.pop(0) + assert b2 & 0xC0 == 0x80 + if b1 & 0x20: + assert not b1 & 0x10 + b3 = bytes.pop(0) + assert b3 & 0xC0 == 0x80 + unicode += unichr( + ((b1 & 0x0f) << 12) + ((b2 & 0x3f) << 6) + (b3 & 0x3f)) + else: + unicode += unichr(((b1 & 0x1f) << 6) + (b2 & 0x3f)) + else: + unicode += unichr(b1) + return unicode + +if __name__ == "__main__": + print Class("/usr/share/katana/build/ListDependentClasses.class") + --- gjdoc-0.7.8.orig/debian/unused.files +++ gjdoc-0.7.8/debian/unused.files @@ -0,0 +1,12 @@ +Restored 'patches/08_encoding.dpatch' +Restored 'patches/03dtd.dpatch' +Restored 'patches/07_default_out_dir.dpatch' +Restored 'patches/09_no_code_tag_in_param.dpatch' +Restored 'patches/09_saxon.dpatch' +Restored 'patches/10_gjdoc_sh_in.patch' +Restored 'patches/06_no1.4classpath.dpatch' +Restored 'patches/00list' +Restored 'patches/template' +Restored 'patches/02classpath_copyright.dpatch' +Restored 'scripts/gjdoc' +Restored 'README.Debian' --- gjdoc-0.7.8.orig/debian/watch +++ gjdoc-0.7.8/debian/watch @@ -0,0 +1,2 @@ +version=2 +ftp://ftp.gnu.org/gnu/classpath/gjdoc-(.*)\.tar\.gz debian uupdate --- gjdoc-0.7.8.orig/debian/gjdoc.postinst +++ gjdoc-0.7.8/debian/gjdoc.postinst @@ -0,0 +1,36 @@ +#! /bin/sh + +set -e + +case "$1" in + configure) + man=/usr/share/man/man1 + update-alternatives \ + --install /usr/bin/javadoc javadoc /usr/bin/gjdoc 350 \ + --slave $man/javadoc.1.gz javadoc.1.gz $man/gjdoc.1.gz + # is this a first install? + if [ "${2}" ]; then + if ("dpkg" "--compare-versions" "${2} " "<<" "0.6.1"); then + update-alternatives --remove javadoc /usr/bin/gjdoc; + fi + fi + + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +if [ -x "/usr/bin/rebuild-gcj-db" ]; then + /usr/bin/rebuild-gcj-db +fi + +#DEBHELPER# + +exit 0 --- gjdoc-0.7.8.orig/debian/copyright +++ gjdoc-0.7.8/debian/copyright @@ -0,0 +1,24 @@ +This package was debianized by Grzegorz Prokopski (Debian Developer) on +Mon, 12 Aug 2002 12:44:59 +0200. + +It was downloaded from ftp://ftp.gnu.org/gnu/classpath. + +Upstream Authors: (C) 2001-2005 Free Software Foundation + +Copyright: + + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 dated June, 1991. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. --- gjdoc-0.7.8.orig/debian/gjdoc.postrm +++ gjdoc-0.7.8/debian/gjdoc.postrm @@ -0,0 +1,11 @@ +#! /bin/sh + +set -e + +if [ -x "/usr/bin/rebuild-gcj-db" ]; then + /usr/bin/rebuild-gcj-db +fi + +#DEBHELPER# + +exit 0 --- gjdoc-0.7.8.orig/debian/aot-compile +++ gjdoc-0.7.8/debian/aot-compile @@ -0,0 +1,89 @@ +#! /usr/bin/python + +## Copyright (C) 2006 Red Hat, Inc. +## Written by Gary Benson +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. + +import aotcompile +import getopt +import os +import sys + +usage = """\ +Usage: %s [OPTION...] SRCDIR DSTDIR +AOT-compile all Java bytecode in SRCDIR into DSTDIR. +Note that DSTDIR must be within SRCDIR. + +Options: + -M, --make=PATH make executable to use (%s) + -C, --gcj=PATH gcj executable to use (%s) + -D, --dbtool=PATH gcj-dbtool executable to use (%s) + -m, --makeflags=FLAGS flags to pass to make during build + -c, --gcjflags=FLAGS flags to pass to gcj during compilation + in addition to %s + -l, --ldflags=FLAGS flags to pass to gcj during linking + in addition to %s + -e, --exclude=PATH do not compile PATH + -L, --libdir=DIR overwrite destination directory + +Extra flags may also be passed using the AOT_MAKEFLAGS, AOT_GCJFLAGS +and AOT_LDFLAGS environment variables.""" % ( + os.path.basename(sys.argv[0]), + aotcompile.PATHS["make"], + aotcompile.PATHS["gcj"], + aotcompile.PATHS["dbtool"], + repr(" ".join(aotcompile.GCJFLAGS)), + repr(" ".join(aotcompile.LDFLAGS))) + +try: + if os.environ.has_key("RPM_PACKAGE_NAME"): + raise aotcompile.Error, "not for use within rpm specfiles" + + try: + opts, args = getopt.getopt( + sys.argv[1:], + "C:c:l:D:e:L:", + ["gcj=", "dbtool=", "gcjflags=", "ldflags=", "exclude=", "libdir="]) + srcdir, dstdir = args + except: + print >>sys.stderr, usage + sys.exit(1) + + compiler = aotcompile.Compiler(srcdir, dstdir) + for o, a in opts: + if o in ("-M", "--make"): + aotcompile.PATHS["make"] = a + if o in ("-C", "--gcj"): + aotcompile.PATHS["gcj"] = a + if o in ("-D", "--dbtool"): + aotcompile.PATHS["dbtool"] = a + if o in ("-m", "--makeflags"): + compiler.makeflags[0:0] = a.split() + if o in ("-c", "--gcjflags"): + compiler.gcjflags[0:0] = a.split() + if o in ("-l", "--ldflags"): + compiler.ldflags[0:0] = a.split() + if o in ("-e", "--exclude"): + compiler.exclusions.append(a) + if o in ("-L", "--libdir"): + compiler.libdir = a + + compiler.makeflags[0:0] = os.environ.get("AOT_MAKEFLAGS", "").split() + compiler.gcjflags[0:0] = os.environ.get("AOT_GCJFLAGS", "").split() + compiler.ldflags[0:0] = os.environ.get("AOT_LDFLAGS", "").split() + + compiler.compile() + +except aotcompile.Error, e: + print >>sys.stderr, "%s: error: %s" % ( + os.path.basename(sys.argv[0]), e) + sys.exit(1) --- gjdoc-0.7.8.orig/debian/gjdoc.prerm +++ gjdoc-0.7.8/debian/gjdoc.prerm @@ -0,0 +1,22 @@ +#! /bin/sh + +set -e + + +case "$1" in + remove|upgrade|deconfigure) + update-alternatives --remove javadoc /usr/bin/gjdoc + ;; + failed-upgrade) + ;; + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 + + --- gjdoc-0.7.8.orig/debian/README.Debian +++ gjdoc-0.7.8/debian/README.Debian @@ -0,0 +1,12 @@ +gjdoc +----- + + You can override the default JVM used by gjdoc by setting the +JAVA_HOME environment variable or the JAVACMD enironment variable. GJDOC +uses kaffe as its default JVM. + + You can also change the default xml parser and the default xslt +transformer by overriding the CLASSPATH environment variable to set the +classpath of your preferred jaxp processor. + + -- Arnaud Vandyck , Thu Nov 18 16:39:53 2004