diff options
| author | fukachan <fukachan> | 2005-06-06 03:45:57 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2005-06-06 03:45:57 +0000 |
| commit | f7cbfec74df8f8fd7e135c16de75b2fa6f5ab6a3 (patch) | |
| tree | 8c8fb14178b0d5ef6de0be740868ac6bfc10f1ce | |
| parent | e19ad4df732efb6d4cd3e857120c7ecff4674abb (diff) | |
| download | fml8-f7cbfec74df8f8fd7e135c16de75b2fa6f5ab6a3.tar.gz fml8-f7cbfec74df8f8fd7e135c16de75b2fa6f5ab6a3.tar.bz2 fml8-f7cbfec74df8f8fd7e135c16de75b2fa6f5ab6a3.zip | |
Initial revision
48 files changed, 7192 insertions, 0 deletions
diff --git a/gnu/dist/sgmltools-lite/COPYING b/gnu/dist/sgmltools-lite/COPYING new file mode 100644 index 00000000..60549be5 --- /dev/null +++ b/gnu/dist/sgmltools-lite/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) 19yy <name of author> + + 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. + + 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/gnu/dist/sgmltools-lite/ChangeLog b/gnu/dist/sgmltools-lite/ChangeLog new file mode 100644 index 00000000..862417c3 --- /dev/null +++ b/gnu/dist/sgmltools-lite/ChangeLog @@ -0,0 +1,51 @@ +2001-05-04 David Nedrow <dnedrow@usa.net> + + * Several updates to begin moving sgmltools-lite into the LSB world. + +2001-04-21 David Nedrow <dnedrow@usa.net> + + * Updated primary spec file for RedHat 7.1 + + * Renamed sgmltools.1 manpage to sgmltools-lite.1 to avoid conflicts + with sgmltools version 1 manpage. + +2000-10-26 David Nedrow <dnedrow@usa.net> + + * Added new w3m backend + (http://ei5nazha.yz.yamagata-u.ac.jp/~aito/w3m/eng/) + + * Slight change to txt backend. If w3m is installed it is used rather + than Lynx. + + * Added support to Makefile.in for building RPMs (see README.rpm). + + * Structural change to allow building RPM's directly from the source + file (rpm -ta sgmltools-lite-<ver>.tar.gz). + +2000-06-30 Marc André Selig <mas@seligma.com> + + * Oh, and I bumped up the version number for the whole project + to 3.0.2 + + * VERSION is now created by the Makefile instead of being distributed + + * make install now installs the distributed catalogues as well + + * Updated dist: target + + * "Imported" .spec file (for building RPM packages) + (SourceForge does not allow real import, just added the latest + version) + Updated the .spec file to match the current version of the CVS tree. + + * Added catalogue files for SuSE (containing cdegroot's setup) + and Red Hat. + + * Modified POSTINSTALL to include instructions and package names + for Red Hat as well. + +2000-06-26 Marc André Selig <mas@seligma.com> + + * Added a target "dist" to Makefile.in that will create a + distributable tarball. + diff --git a/gnu/dist/sgmltools-lite/Makefile.in b/gnu/dist/sgmltools-lite/Makefile.in new file mode 100644 index 00000000..64c8c040 --- /dev/null +++ b/gnu/dist/sgmltools-lite/Makefile.in @@ -0,0 +1,143 @@ +# +# Makefile.in for sgmltools package +# +# $Id: Makefile.in,v 1.13 2001/04/24 18:37:22 dnedrow Exp $ +# +# SGMLtools - an SGML toolkit. +# Copyright (C) 1998 Cees A. de Groot +# +# 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. +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +prefix=@prefix@ +exec_prefix=@exec_prefix@ +bindir=@bindir@ +datadir=@datadir@ +SHAREDIR=$(datadir)/sgml +stylesheets=$(SHAREDIR)/stylesheets/sgmltools +dtds=$(SHAREDIR)/dtd/sgmltools +DOCDIR=@prefix@/doc +mandir=@mandir@ +sysconfdir=@sysconfdir@ +etcdir=@etcsgml@ +PERL=@PERL@ +INSTALL=@INSTALL@ +INSTALL_PROGRAM=@INSTALL_PROGRAM@ +INSTALL_DATA=@INSTALL_DATA@ +MKDIRHIER=mkdir -p +PACKAGE=sgmltools-lite +TAR=tar +GZIP_ENV=--best + +VERSION=3.0.3 + +all: VERSION + +.PHONY: install +install: all + -$(MKDIRHIER) $(bindir) + -$(MKDIRHIER) $(etcdir)/catalog.d + $(INSTALL_PROGRAM) bin/sgmltools $(bindir)/sgmltools + $(INSTALL_PROGRAM) bin/buildcat $(bindir)/buildcat + $(INSTALL_PROGRAM) bin/gensgmlenv $(bindir)/gensgmlenv + $(INSTALL_PROGRAM) bin/sgmlwhich $(bindir)/sgmlwhich + -umask 022;$(MKDIRHIER) $(stylesheets) + set -e; for i in dsssl/*.dsl dsssl/*.cat; do \ + $(INSTALL_DATA) $$i $(stylesheets); \ + done; + -umask 022;$(MKDIRHIER) $(dtds) + set -e; for i in dtd/[a-z]*; do \ + $(INSTALL_DATA) $$i $(dtds); \ + done; + -umask 022;$(MKDIRHIER) $(mandir)/man1 + $(INSTALL_DATA) man/sgmltools-lite.1 $(mandir)/man1 + -umask 022;$(MKDIRHIER) $(SHAREDIR)/misc/sgmltools/site-backends + -umask 022;$(MKDIRHIER) $(SHAREDIR)/misc/sgmltools/python/backends + set -e; for i in python/*.py; do \ + $(INSTALL_DATA) $$i $(SHAREDIR)/misc/sgmltools/python; \ + done + set -e; for i in python/backends/*.py; do \ + $(INSTALL_DATA) $$i $(SHAREDIR)/misc/sgmltools/python/backends; \ + done; + -umask 022;$(MKDIRHIER) $(etcdir) + set -e; for i in catalog.rh62 catalog.suse aliases; do \ + if test -f $(etcdir)/$$i; then \ + $(INSTALL_DATA) $$i $(etcdir)/$$i.new; \ + echo "** Installed distributed $$i as $(etcdir)/$$i.new"; \ + else \ + $(INSTALL_DATA) $$i $(etcdir); \ + fi; \ + done + $(INSTALL_DATA) VERSION $(SHAREDIR)/misc/sgmltools + #$(INSTALL_DATA) ../../../COPYING $(SHAREDIR)/misc/sgmltools + @echo "" + @echo "" + @echo "" + @echo " Installation done. Please read POSTINSTALL for " + @echo " post-installation instructions; the steps in that " + @echo " document are necessary to make SGMLtools-Lite work." + @echo "" + @echo "" + @echo "" + +VERSION: + echo $(VERSION) >VERSION + +distdir = $(PACKAGE)-$(VERSION) + +clean: + rm -f config.cache config.log config.status + rm -f bin/buildcat bin/gensgmlenv bin/sgmltools bin/sgmlwhich + rm -f dsssl/print.dsl + rm -f Makefile VERSION + rm -f $(distdir).tar.gz + +dist: distdir + -chmod -R a+rX $(distdir) + GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) + -rm -rf $(distdir) + +rpm:: + @ \ + VERS=`sed -n 's/\([0-9]\.[0-9]\.[0-9][0-9]*\).*/\1/p' VERSION` ; \ + DIR=/usr/src/redhat ; \ + cp -p sgmltools-lite-$$VERS.tar.gz $$DIR/SOURCES/ ; \ + rpm -ba rpm/sgmltools-lite.spec ; \ + rm -f $$DIR/sgmltools-lite-$$VERS.tar.gz ; \ + rm -rf $$DIR/BUILD/sgmltools-lite-$$VERS ; \ + mv $$DIR/SRPMS/sgmltools-lite-$$VERS-*.rpm . ; \ + mv $$DIR/RPMS/i386/sgmltools-lite-$$VERS-*.rpm . ; \ + echo '' ; \ + ls -lFG sgmltools-lite*-$$VERS-*.rpm + +# The target distdir creates a directory that can then be zipped up +# for distribution. We `make clean' before. All CVS files as well +# as those needed for packaging only (rpm/) are excluded. +distdir: clean + -rm -rf $(distdir) + umask 022 + -mkdir $(distdir) + for i in `find . ! -name . -a ! -regex '\./rpm.*' -a \ + ! -name .cvsignore -a ! -regex '.*/CVS.*' -a \ + ! -name '*~'` ; do \ + if test $$i = ./$(distdir); then \ + echo "Leaving out $$i"; \ + elif test -d $$i; then \ + mkdir $(distdir)/$$i; \ + elif test -f $$i; then \ + cp -p $$i $(distdir)/$$i; \ + else \ + echo "Cannot handle $$i currently, fix me."; \ + fi; \ + done diff --git a/gnu/dist/sgmltools-lite/POSTINSTALL b/gnu/dist/sgmltools-lite/POSTINSTALL new file mode 100644 index 00000000..ac591b64 --- /dev/null +++ b/gnu/dist/sgmltools-lite/POSTINSTALL @@ -0,0 +1,97 @@ +$Id: POSTINSTALL,v 1.3 2001/04/21 23:59:08 dnedrow Exp $ + +SGMLtools-Lite post installation instructions +--------------------------------------------- + +SGMLtools-Lite needs a bunch of SGML-related data files in order to function +correctly. These data files may already be on your system, or be part +of your Linux distribution, because lots of Linux distributors now bundle +them. The package names for SuSE and RedHat are included in this document; +if you have a set of package names for your distribution, I'll be happy to +add them. + +Here are the packages you need to have installed: + +* SGML ISO 8879:1986 entity declarations + + This is a set of declarations for standard character entities. + + RedHat: sgml-common (RH 6.2 uses sgml-common-0.1-8.noarch.rpm) + SuSE: sgm1/iso_ent.rpm + +* DocBook 3.1 Document Type Definition + + This is the actual DocBook DTD. + + RedHat 6.2: docbook + RedHat 7.1: docbook-dtd31-sgml + SuSE: sgm1/docbk31.rpm + +* DocBook DSSSL Stylesheets + + This are the stylesheets that Jade uses to transform SGML into + whatever backend format you like. + + RedHat 6.2: stylesheets + RedHat 7.1: docbook-style-dsssl + SuSE: sgm1/docbkdsl.rpm + +Each of these packages, and Jade and SGMLtools-Lite as well, have a +catalog that points to other files in the packages. If you don't +know about SGML catalog files, don't worry: you won't need to know. + +What you should make sure is that you have the names of the following +catalog files strung together in the environment variable SGML_CATALOG_FILES +(don't forget to export it!): + +- DocBook DTD catalog: "docbook.cat" in the DocBook DTD directory +- DocBook DSSL catalog: "catalog" in the DocBook DSSSL stylesheets directory +- ISO Entities catalog: "iso-entities.cat" in the ISO 8870:1986 directory +- Jade catalog: "dsssl.cat" in the Jade data directory +- SGMLtools DTD catalog: "catalog" in the SGMLtools DTD directory +- SGMLtools DSSSL catalog: "sgmltools.cat" in the SGMLtools DSSSL directory + +Here is cdegroot's version for SuSE Linux: +% echo $SGML_CATALOG_FILES +/usr/local/share/sgml/stylesheets/docbook/catalog:/usr/local/share/sgml/entities/iso-entities-8879.1986/iso-entities.cat:/usr/local/share/sgml/dtd/jade/dsssl.cat:/usr/local/share/sgml/stylesheets/sgmltools/sgmltools.cat:/usr/local/share/sgml/dtd/sgmltools/catalog:/usr/local/share/sgml/dtd/docbook/3.1/docbook.cat + +If yours looks similar, you have a working catalog setup. + + Tip: there's a little program called 'gensgmlenv' that is installed + with the SGMLtools distribution. If you collect a bunch of symlinks + in to all these catalog files mentioned above in /etc/sgml/catalog.d, + running this script will generate a Bourne-shell and a C-shell file + in /etc/sgml that defines the SGML_CATALOG_FILES variable. + + Tip: The current developer version of sgmltools-lite contains + master catalogue files for RedHat and SuSE. You can just place + these files somewhere convenient and then point SGML_CATALOG_FILES + to this master catalog. + +The second thing you need to have working is JadeTeX. JadeTeX itself is not +hard to install: + + RedHat: jadetex (RH 6.2 uses jadetex-2.7-2.i386.rpm) + SuSE: sgm1/jadetex.rpm + +JadeTeX eats enourmous amounts of TeX memory and needs special TeX +configuration. The SuSE RPMs take care of that, but if your distribution +does not, or if you need to install JadeTeX manually, tune texmf.cnf +and set the following parameters: + + hash_extra.jadetex = 15000 + pool_size.jadetex = 200000 + max_strings.jadetex = 50000 + save_size.jadetex = 15000 + +If you're unsure, don't touch the file and start working with SGMLtools-Lite. +When you get a TeX error message complaining about capacities, you'll know +what to do... + +That's all, folks! + +Cees de Groot +mailto:cg@cdegroot.com + +Marc André Selig +mailto:mas@seligma.com diff --git a/gnu/dist/sgmltools-lite/README b/gnu/dist/sgmltools-lite/README new file mode 100644 index 00000000..91fe6628 --- /dev/null +++ b/gnu/dist/sgmltools-lite/README @@ -0,0 +1,55 @@ +$Id: README,v 1.1 2000/03/24 09:14:37 cdegroot Exp $ + +sgmltools package README. + +For now, a collection of notes pertaining to the sgmltools package's +functionality. For notes on the sgmltools build environment, see the +sgmltools-base distribution's top-level directory. + + +* SGML Open catalogs + +SGMLtools interprets most identifiers as public identifiers until proven +otherwise, and therefore uses SGML_CATALOG_FILES in order to resolve these +names. If SGML_CATALOG_FILES isn't set in the environment, a default +value of "/etc/sgml/catalog" is used. + +* --dsssl_spec option + +When specifying a DSSSL-File with the --dssl_spec, you can specify either +one of a) a file, b) a public identifier, c) an alias (see below). The +specification will be checked for a file, then subjected to alias expansion, +then re-checked for a file, and finally looked up in the catalogs. + +* DSSSL Aliases + +Files can be a long run of characters away - whether specified by +public identifier or by system identifier. Therefore SGMLtools uses +alias files to save on typing on the command-line. As command-line +specified files will be almost always DSSSL files, it is reasonable +to see this functionality as providing DSSSL aliases. + +The alias files read, in order and when available, are: + +/etc/sgml/aliases +~/.sgmlaliases + +These files are simply + +alias identifier + +sequences, where identifier may be quoted and the separation may be any +run of whitespace characters. Empty lines and '#'-lead comments are +allowed. So, instead of typing: + +sgmltools ... -d /usr/local/share/sgml/dsssl/mystuff/html.dsl ... + +or + +sgmltools ... -d "-//Local//MyStuff HTML stylesheet//EN" ... + +you can just make an alias and get away with typing + +sgmltools ... -d myhtmlstuff ... + + diff --git a/gnu/dist/sgmltools-lite/README.rpm b/gnu/dist/sgmltools-lite/README.rpm new file mode 100644 index 00000000..60c26d51 --- /dev/null +++ b/gnu/dist/sgmltools-lite/README.rpm @@ -0,0 +1,37 @@ +$Id: README.rpm,v 1.3 2001/05/04 04:27:17 dnedrow Exp $ + +There are two way to build RPMs for sgmltools-lite. Both require that you be +logged in (or su'd) as root. + +1) Using rpm directly + +To build the rpm directly from the source, simply run the following command: + +rpm -ta sgmltool-lite-<ver>.tar.gz + +where <ver> should be substituted with the appropriate string from the actual +source file. + +This command instructs RPM to use the source file directly when creating RPMs. +It uses the spec file (previously under ${top}/rpm, now directly in ${top} of +the source tree) stored in the source file. + +Two RPMs will be built, a binary package and a source package. These will be +stored under /usr/src/redhat. + +Note that the default specfile is now for RedHat 7.1. If you wish to build +for another platform, use the appropriate spec file from the rpm directory. + +2) Using the Makefile + +To use make to create the RPMs, simply copy the tarred and GZIP'd source file +into the top of the source tree (where you found this README.rpm) and issue the +following command: + +make rpm + +That's all. Unlike method 1 above, the make version copies the completed RPMs +into the top of the sgmltools-lite source tree. + +-David Nedrow + diff --git a/gnu/dist/sgmltools-lite/aliases b/gnu/dist/sgmltools-lite/aliases new file mode 100644 index 00000000..5f7cabab --- /dev/null +++ b/gnu/dist/sgmltools-lite/aliases @@ -0,0 +1,30 @@ +# +# $Id: aliases,v 1.4 2000/10/25 06:00:05 cdegroot Exp $ +# +# SGMLtools alias file. This initial set, installed in /etc/sgml, +# provides the aliases used internally by SGMLtools to find +# default stylesheets for the various backends. Modify as you +# like. +# + +# +# These are the default stylesheet specifications for the various +# backends. +# +sgmltools-dvi "-//SGMLtools//DOCUMENT Docbook Style Sheet for Print//EN"#print +sgmltools-db "-//SGMLtools//DOCUMENT Linuxdoc Style Sheet for Docbook//EN"#db +sgmltools-onehtml "-//SGMLtools//DOCUMENT Docbook Style Sheet for HTML//EN"#onehtml +sgmltools-html "-//SGMLtools//DOCUMENT Docbook Style Sheet for HTML//EN"#html +sgmltools-ps "-//SGMLtools//DOCUMENT Docbook Style Sheet for Print//EN"#print.ps +sgmltools-pdf "-//SGMLtools//DOCUMENT Docbook Style Sheet for Print//EN"#print.pdf +sgmltools-rtf "-//SGMLtools//DOCUMENT Docbook Style Sheet for Print//EN"#print +sgmltools-pdb "-//SGMLtools//DOCUMENT Docbook Style Sheet for HTML//EN"#onehtml +sgmltools-lynx "-//SGMLtools//DOCUMENT Docbook Style Sheet for Lynx Text//EN"#html +sgmltools-w3m "-//SGMLtools//DOCUMENT Docbook Style Sheet for w3m Text//EN"#html +sgmltools-tex "-//SGMLtools//DOCUMENT Docbook Style Sheet for Print//EN"#print + +# +# HOWTO stylesheets. 'sgmltools -b dvi -s howtop', for example. +# +howtop "-//SGMLtools//DOCUMENT Docbook Style Sheet for Print//EN"#howto +howtoh "-//SGMLtools//DOCUMENT Docbook Style Sheet for HTML//EN"#howto diff --git a/gnu/dist/sgmltools-lite/bin/buildcat.in b/gnu/dist/sgmltools-lite/bin/buildcat.in new file mode 100644 index 00000000..496afef5 --- /dev/null +++ b/gnu/dist/sgmltools-lite/bin/buildcat.in @@ -0,0 +1,87 @@ +#!@PYTHON@ +# +# buildcat - build a shared catalog file. +# +# $Id: buildcat.in,v 1.2 2001/05/04 04:27:17 dnedrow Exp $ +# +# SGMLtools - an SGML toolkit. +# Copyright (C) 1998 Cees A. de Groot +# +# 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. +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + +""" +NAME + + buildcat - build a shared catalog file. + +SYNOPSIS + + # buildcat >/etc/sgml/catalog + +DESCRIPTION + + The program **buildcat** builds a shared catalog file from + the symlinks encountered in /etc/sgml. In order to + keep the meaning of the individual catalogs the same, relative + system identifiers in the catalogs are expanded to their absolute + equivalents. +""" + +import sys +if sys.version < "1.5": + # re module appeared first in v1.5 + print "%s: need python 1.5 or better" % sys.argv[0] + raise SystemExit,1 + +import string, re, os, glob, types + +# +# Find etcdir. The requirement is that sgmlwhich should be in PATH. If +# it ain't there, we use the built-in default. +# +ETCSGMLCATDIR = "@etcsgml@" + +import os, string +from stat import * + +try: + cmd = "/bin/sh -c sgmlwhich" + retval = string.strip(os.popen(cmd).readline()) + if os.path.isdir(retval): + ETCSGMLCATDIR = retval + else: + entries = {} + for line in open(retval, 'r').readlines(): + line = string.strip(line) + list = string.split(line, "=") + if len(list) == 2: + entries[list[0]] = list[1] + ETCSGMLCATDIR = entries['SGML_CATALOGS_DIR'] + +except: + pass + +assert os.path.isdir(ETCSGMLCATDIR) + +if __name__ == "__main__": + print '-- AUTOMATICALLY GENERATED, DO NOT EDIT --' + for filename in glob.glob(ETCSGMLCATDIR + "/*.cat"): + if S_ISLNK(os.stat(filename)[ST_MODE]): + catlnkpath = os.readlink(filename) + else: + catlnkpath = filename + print 'CATALOG "%s"' % catlnkpath + diff --git a/gnu/dist/sgmltools-lite/bin/gensgmlenv.in b/gnu/dist/sgmltools-lite/bin/gensgmlenv.in new file mode 100644 index 00000000..acf826ff --- /dev/null +++ b/gnu/dist/sgmltools-lite/bin/gensgmlenv.in @@ -0,0 +1,112 @@ +#!@PYTHON@ +# +# gensgmlenv.in +# +# $Id: gensgmlenv.in,v 1.4 2001/05/05 23:07:06 dnedrow Exp $ +# +# Generate @etcsgml@/sgml.env, containing definition for SGML_CATALOG_FILES +# +# SGMLtools - an SGML toolkit. +# Copyright (C) 1999 Cees A. de Groot +# +# 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. +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# + +""" +head1 NAME + + gensgmlenv - Generate @etcsgml@/sgml.env + +SYNOPSIS + + gensgmlenv + +DESCRIPTION + + The subroutine gensgmlenv generates a file @etcsgml@/sgml.env that contains + the bourne shell command that sets SGML_CATALOG_FILES. It is meant to be + included in SGML-processing scripts and/or in /etc/profile. + +EXCEPTIONS + + There are some exceptions which can be thrown by this module. They + are: + + Error: Base error. If that module throws an exception, and you don't + want to catch every specific one, catching of Error would be enough. + + NoCatalogError: There was no catalog files found. + + ReadLinkError: There was an error occured during trial of getting + the real name of the file pointed by a symbolic link. + + WriteScriptError: Could not write the configuration script. The type + of the shell will be thrown within the detail attribute. + +""" + +import glob, os, re, string +from stat import * + + +class Error(Exception): + pass + +class NoCatalogError(Error): + pass + +class ReadLinkError(Error): + pass + +class WriteScriptError(Error): + pass + +_subdot = re.compile("\.\.\/\.\.\/\.\.").sub +_subslash = re.compile("\/\/").sub + + +def gensgmlenv(): + catfiles = [] + for link in glob.glob("@etcsgml@/*.cat"): + st = os.lstat( link ) + if S_ISLNK(st[ST_MODE]): + file = os.readlink(link) + else: + file = link + file = _subdot("", file, 1) + file = _subslash("/", file) + catfiles.append(file) + if not catfiles: + raise NoCatalogError + files = string.join(catfiles, ":") + try: + sgmlenv = open("@etcsgml@/sgml.env", "w") + sgmlenv.write("SGML_CATALOG_FILES=%s\n" + "export SGML_CATALOG_FILES\n" % files) + sgmlenv.close() + except IOError: + raise WriteScriptError, "writing sh version" + try: + sgmlenv = open("@etcsgml@/sgml.cenv", "w") + sgmlenv.write("setenv SGML_CATALOG_FILES %s\n" % files) + sgmlenv.close() + except IOError: + raise WriteScriptError, "writing csh version" + + +if __name__ == "__main__": + # testcode + gensgmlenv() diff --git a/gnu/dist/sgmltools-lite/bin/sgmltools.in b/gnu/dist/sgmltools-lite/bin/sgmltools.in new file mode 100755 index 00000000..73dc285e --- /dev/null +++ b/gnu/dist/sgmltools-lite/bin/sgmltools.in @@ -0,0 +1,94 @@ +#!@PYTHON@ +# +# sgmltools.in +# +# $Id: sgmltools.in,v 1.6 2001/05/07 20:24:25 dnedrow Exp $ +# +# SGMLtools driver frontend. This is installed in $prefix/bin. +# +# SGMLtools - an SGML toolkit. +# Copyright (C) 1998 Cees A. de Groot +# +# 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. +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +# +# Setup: check version, and add our modules directory to the +# search path. +# +import sys +if sys.version < '1.5': + print '%s: need python 1.5 or better' % sys.argv[0] + raise SystemExit,1 + +sys.path.append('@datadir@/sgml/misc/sgmltools/python') + +# +# Autoconf edits most of these. +# +autoconf = { + 'prefix': '@pyprefix@', + 'shrdir': '@datadir@/sgml/misc/sgmltools', + 'bindir': '@pybindir@', + 'etcdir': '@etcsgml@', + 'progs' : { + 'jade': '@JADE@', + 'lynx': '@LYNX@', + 'iSilo': '@ISILO@', + 'w3m': '@W3M@' + }, + # + # Editable: places where backends can be found. + # + 'backends' : [ + '@datadir@/sgml/misc/sgmltools/python/backends', + '@datadir@/sgml/misc/sgmltools/site-backends' + ], +} + +# +# Find etcdir. The requirement is that sgmlwhich should be in PATH. If +# it ain't there, we use the built-in default. +# +import os, string +try: + cmd = "/bin/sh -c sgmlwhich" + retval = string.strip(os.popen(cmd).readline()) + if retval != '' and pipe.close() == 0: + if os.path.isdir(retval): + autoconf['etcdir'] = retval + else: + entries = {} + for line in open(retval, 'r').readlines(): + line = string.strip(line) + list = string.split(line, "=") + if len(list) == 2: + entries[list[0]] = list[1] + autoconf['etcdir'] = entries['SGML_CATALOGS_DIR'] + +except: + pass + +# +# Import SGMLtools module, initialize, and run for all +# the files. +# +from SGMLtools import SGMLtools + +tool = SGMLtools(autoconf) + +fileList = tool.processOptions (sys.argv[1:]) +for curfile in fileList: + tool.processFile(curfile) + diff --git a/gnu/dist/sgmltools-lite/bin/sgmlwhich.in b/gnu/dist/sgmltools-lite/bin/sgmlwhich.in new file mode 100755 index 00000000..502dae7f --- /dev/null +++ b/gnu/dist/sgmltools-lite/bin/sgmlwhich.in @@ -0,0 +1,2 @@ +#!/bin/sh +echo @etcsgml@ diff --git a/gnu/dist/sgmltools-lite/catalog.rh62 b/gnu/dist/sgmltools-lite/catalog.rh62 new file mode 100644 index 00000000..52e8d465 --- /dev/null +++ b/gnu/dist/sgmltools-lite/catalog.rh62 @@ -0,0 +1,7 @@ + -- SGML Catalogue for RedHat 6.2 -- +CATALOG "/usr/lib/sgml/docbook.cat" +CATALOG "/usr/lib/sgml/dsssl.cat" +CATALOG "/usr/lib/sgml/sgml-common.cat" +CATALOG "/usr/lib/sgml/stylesheets/nwalsh-modular/catalog" +CATALOG "/usr/lib/sgml/stylesheets/sgmltools/sgmltools.cat" +CATALOG "/usr/lib/sgml/dtd/sgmltools/catalog" diff --git a/gnu/dist/sgmltools-lite/catalog.rh71 b/gnu/dist/sgmltools-lite/catalog.rh71 new file mode 100644 index 00000000..8d34d8c9 --- /dev/null +++ b/gnu/dist/sgmltools-lite/catalog.rh71 @@ -0,0 +1,8 @@ +-- AUTOMATICALLY GENERATED, DO NOT EDIT -- +CATALOG "/etc/sgml/sgml-docbook-3.0.cat" +CATALOG "/etc/sgml/sgml-docbook.cat" +CATALOG "/etc/sgml/sgml-docbook-3.1.cat" +CATALOG "/etc/sgml/sgml-docbook-4.0.cat" +CATALOG "/etc/sgml/sgml-docbook-4.1.cat" +CATALOG "/etc/sgml/xml-docbook-4.1.cat" +CATALOG "/etc/sgml/xml-docbook.cat" diff --git a/gnu/dist/sgmltools-lite/catalog.suse b/gnu/dist/sgmltools-lite/catalog.suse new file mode 100644 index 00000000..cb503e52 --- /dev/null +++ b/gnu/dist/sgmltools-lite/catalog.suse @@ -0,0 +1,7 @@ + -- SGML Catalogue for SuSE -- +CATALOG "/usr/local/share/sgml/stylesheets/docbook/catalog" +CATALOG "/usr/local/share/sgml/entities/iso-entities-8879.1986/iso-entities.cat" +CATALOG "/usr/local/share/sgml/dtd/jade/dsssl.cat" +CATALOG "/usr/local/share/sgml/stylesheets/sgmltools/sgmltools.cat" +CATALOG "/usr/local/share/sgml/dtd/sgmltools/catalog" +CATALOG "/usr/local/share/sgml/dtd/docbook/3.1/docbook.cat" diff --git a/gnu/dist/sgmltools-lite/configure b/gnu/dist/sgmltools-lite/configure new file mode 100755 index 00000000..13e8a1ae --- /dev/null +++ b/gnu/dist/sgmltools-lite/configure @@ -0,0 +1,1404 @@ +#! /bin/sh + +# Guess values for system-dependent variables and create Makefiles. +# Generated automatically using autoconf version 2.13 +# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. + +# Defaults: +ac_help= +ac_default_prefix=/usr/local +# Any additions from configure.in: +ac_help="$ac_help + --with-etcsgml=DIR use DIR instead of /etc/sgml" +ac_help="$ac_help + --with-dbimages=DIR use DIR instead of DATADIR/sgml/stylesheets/docbook/images/" + +# Initialize some variables set by options. +# The variables have the same names as the options, with +# dashes changed to underlines. +build=NONE +cache_file=./config.cache +exec_prefix=NONE +host=NONE +no_create= +nonopt=NONE +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +target=NONE +verbose= +x_includes=NONE +x_libraries=NONE +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +# Initialize some other variables. +subdirs= +MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} +# Maximum number of lines to put in a shell here document. +ac_max_here_lines=12 + +ac_prev= +for ac_option +do + + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + case "$ac_option" in + -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) ac_optarg= ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case "$ac_option" in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir="$ac_optarg" ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build="$ac_optarg" ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file="$ac_optarg" ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir="$ac_optarg" ;; + + -disable-* | --disable-*) + ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + eval "enable_${ac_feature}=no" ;; + + -enable-* | --enable-*) + ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "enable_${ac_feature}='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix="$ac_optarg" ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he) + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat << EOF +Usage: configure [options] [host] +Options: [defaults in brackets after descriptions] +Configuration: + --cache-file=FILE cache test results in FILE + --help print this message + --no-create do not create output files + --quiet, --silent do not print \`checking...' messages + --version print the version of autoconf that created configure +Directory and file names: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [same as prefix] + --bindir=DIR user executables in DIR [EPREFIX/bin] + --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] + --libexecdir=DIR program executables in DIR [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data in DIR + [PREFIX/share] + --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data in DIR + [PREFIX/com] + --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] + --libdir=DIR object code libraries in DIR [EPREFIX/lib] + --includedir=DIR C header files in DIR [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] + --infodir=DIR info documentation in DIR [PREFIX/info] + --mandir=DIR man documentation in DIR [PREFIX/man] + --srcdir=DIR find the sources in DIR [configure dir or ..] + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM + run sed PROGRAM on installed program names +EOF + cat << EOF +Host type: + --build=BUILD configure for building on BUILD [BUILD=HOST] + --host=HOST configure for HOST [guessed] + --target=TARGET configure for TARGET [TARGET=HOST] +Features and packages: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR +EOF + if test -n "$ac_help"; then + echo "--enable and --with options recognized:$ac_help" + fi + exit 0 ;; + + -host | --host | --hos | --ho) + ac_prev=host ;; + -host=* | --host=* | --hos=* | --ho=*) + host="$ac_optarg" ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir="$ac_optarg" ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir="$ac_optarg" ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir="$ac_optarg" ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir="$ac_optarg" ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir="$ac_optarg" ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir="$ac_optarg" ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir="$ac_optarg" ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix="$ac_optarg" ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix="$ac_optarg" ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix="$ac_optarg" ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name="$ac_optarg" ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir="$ac_optarg" ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir="$ac_optarg" ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site="$ac_optarg" ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir="$ac_optarg" ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir="$ac_optarg" ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target="$ac_optarg" ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers) + echo "configure generated by autoconf version 2.13" + exit 0 ;; + + -with-* | --with-*) + ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "with_${ac_package}='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`echo $ac_option|sed -e 's/-*without-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + eval "with_${ac_package}=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes="$ac_optarg" ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries="$ac_optarg" ;; + + -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + ;; + + *) + if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then + echo "configure: warning: $ac_option: invalid host type" 1>&2 + fi + if test "x$nonopt" != xNONE; then + { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } + fi + nonopt="$ac_option" + ;; + + esac +done + +if test -n "$ac_prev"; then + { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } +fi + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +# File descriptor usage: +# 0 standard input +# 1 file creation +# 2 errors and warnings +# 3 some systems may open it to /dev/tty +# 4 used on the Kubota Titan +# 6 checking for... messages and results +# 5 compiler messages saved in config.log +if test "$silent" = yes; then + exec 6>/dev/null +else + exec 6>&1 +fi +exec 5>./config.log + +echo "\ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. +" 1>&5 + +# Strip out --no-create and --no-recursion so they do not pile up. +# Also quote any args containing shell metacharacters. +ac_configure_args= +for ac_arg +do + case "$ac_arg" in + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) ;; + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) + ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) ac_configure_args="$ac_configure_args $ac_arg" ;; + esac +done + +# NLS nuisances. +# Only set these to C if already set. These must not be set unconditionally +# because not all systems understand e.g. LANG=C (notably SCO). +# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! +# Non-C LC_CTYPE values break the ctype check. +if test "${LANG+set}" = set; then LANG=C; export LANG; fi +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi +if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo > confdefs.h + +# A filename unique to this package, relative to the directory that +# configure is in, which we can look for to find out if srcdir is correct. +ac_unique_file=dsssl + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_prog=$0 + ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` + test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + else + { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + fi +fi +srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` + +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + echo "loading site script $ac_site_file" + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + echo "loading cache $cache_file" + . $cache_file +else + echo "creating cache $cache_file" + > $cache_file +fi + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +ac_exeext= +ac_objext=o +if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' +' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi +else + ac_n= ac_c='\c' ac_t= +fi + + + +ac_aux_dir= +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/install-sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f $ac_dir/install.sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } +fi +ac_config_guess=$ac_aux_dir/config.guess +ac_config_sub=$ac_aux_dir/config.sub +ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# ./install, which can be erroneously created by make from ./install.sh. +echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +echo "configure:561: checking for a BSD compatible install" >&5 +if test -z "$INSTALL"; then +if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" + for ac_dir in $PATH; do + # Account for people who put trailing slashes in PATH elements. + case "$ac_dir/" in + /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + if test -f $ac_dir/$ac_prog; then + if test $ac_prog = install && + grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + else + ac_cv_path_install="$ac_dir/$ac_prog -c" + break 2 + fi + fi + done + ;; + esac + done + IFS="$ac_save_IFS" + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL="$ac_cv_path_install" + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL="$ac_install_sh" + fi +fi +echo "$ac_t""$INSTALL" 1>&6 + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + + + +# Extract the first word of "jade", so it can be a program name with args. +set dummy jade; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:618: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_oldjade'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$oldjade" in + /*) + ac_cv_path_oldjade="$oldjade" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_oldjade="$oldjade" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_oldjade="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_oldjade" && ac_cv_path_oldjade="N/A" + ;; +esac +fi +oldjade="$ac_cv_path_oldjade" +if test -n "$oldjade"; then + echo "$ac_t""$oldjade" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +# Extract the first word of "openjade", so it can be a program name with args. +set dummy openjade; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:654: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_openjade'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$openjade" in + /*) + ac_cv_path_openjade="$openjade" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_openjade="$openjade" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_openjade="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_openjade" && ac_cv_path_openjade="N/A" + ;; +esac +fi +openjade="$ac_cv_path_openjade" +if test -n "$openjade"; then + echo "$ac_t""$openjade" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if test "$openjade" != "N/A"; then + JADE=$openjade +elif test "$oldjade" != "N/A"; then + JADE=$oldjade +else + { echo "configure: error: You don't have Jade or OpenJade installed" 1>&2; exit 1; } + exit 1 +fi +echo "$ac_t""Using $JADE as DSSSL engine" 1>&6 + +# Extract the first word of "lynx", so it can be a program name with args. +set dummy lynx; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:700: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_LYNX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$LYNX" in + /*) + ac_cv_path_LYNX="$LYNX" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_LYNX="$LYNX" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_LYNX="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_LYNX" && ac_cv_path_LYNX="N/A" + ;; +esac +fi +LYNX="$ac_cv_path_LYNX" +if test -n "$LYNX"; then + echo "$ac_t""$LYNX" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +# Extract the first word of "w3m", so it can be a program name with args. +set dummy w3m; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:736: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_W3M'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$W3M" in + /*) + ac_cv_path_W3M="$W3M" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_W3M="$W3M" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_W3M="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_W3M" && ac_cv_path_W3M="N/A" + ;; +esac +fi +W3M="$ac_cv_path_W3M" +if test -n "$W3M"; then + echo "$ac_t""$W3M" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +# Extract the first word of "iSilo386", so it can be a program name with args. +set dummy iSilo386; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:772: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_ISILO'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$ISILO" in + /*) + ac_cv_path_ISILO="$ISILO" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_ISILO="$ISILO" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_ISILO="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_ISILO" && ac_cv_path_ISILO="N/A" + ;; +esac +fi +ISILO="$ac_cv_path_ISILO" +if test -n "$ISILO"; then + echo "$ac_t""$ISILO" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + +# Extract the first word of "python", so it can be a program name with args. +set dummy python; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:809: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_PYTHON'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$PYTHON" in + /*) + ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_PYTHON="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +esac +fi +PYTHON="$ac_cv_path_PYTHON" +if test -n "$PYTHON"; then + echo "$ac_t""$PYTHON" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + +if echo 'import sys +if sys.version < "1.5": raise SystemExit, 1' | $PYTHON +then + : # Solaris and OSF/1 /bin/sh don't know about negation operators... +else + { echo "configure: error: You don't have Python 1.5 or better..." 1>&2; exit 1; } + exit 1 +fi + +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:854: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:884: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_prog_rejected=no + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + break + fi + done + IFS="$ac_save_ifs" +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + set dummy "$ac_dir/$ac_word" "$@" + shift + ac_cv_prog_CC="$@" + fi +fi +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + # Extract the first word of "cl", so it can be a program name with args. +set dummy cl; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:935: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="cl" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + fi + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +fi + +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:967: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +cat > conftest.$ac_ext << EOF + +#line 978 "configure" +#include "confdefs.h" + +main(){return(0);} +EOF +if { (eval echo configure:983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cc_cross=no + else + ac_cv_prog_cc_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cc_works=no +fi +rm -fr conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 +if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:1009: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 +cross_compiling=$ac_cv_prog_cc_cross + +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +echo "configure:1014: checking whether we are using GNU C" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.c <<EOF +#ifdef __GNUC__ + yes; +#endif +EOF +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes +else + ac_cv_prog_gcc=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + +if test $ac_cv_prog_gcc = yes; then + GCC=yes +else + GCC= +fi + +ac_test_CFLAGS="${CFLAGS+set}" +ac_save_CFLAGS="$CFLAGS" +CFLAGS= +echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:1042: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_cc_g=yes +else + ac_cv_prog_cc_g=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi + + +etcsgml=/etc/sgml +# Check whether --with-etcsgml or --without-etcsgml was given. +if test "${with_etcsgml+set}" = set; then + withval="$with_etcsgml" + etcsgml=$withval +fi + + + + +ac_safe=`echo "/usr/share/sgml/docbkdsl/images" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for /usr/share/sgml/docbkdsl/images""... $ac_c" 1>&6 +echo "configure:1086: checking for /usr/share/sgml/docbkdsl/images" >&5 +if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; } +else + if test -r /usr/share/sgml/docbkdsl/images; then + eval "ac_cv_file_$ac_safe=yes" + else + eval "ac_cv_file_$ac_safe=no" + fi +fi +fi +if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + dbimages=/usr/share/sgml/docbkdsl/images/ +else + echo "$ac_t""no" 1>&6 +test "$datadir" = '${prefix}/share' && dbimages=$ac_default_prefix/share/sgml/stylesheets/docbook/images/ +fi + +# Check whether --with-dbimages or --without-dbimages was given. +if test "${with_dbimages+set}" = set; then + withval="$with_dbimages" + dbimages=$withval +fi + +echo "$ac_t""" trying $dbimages"" 1>&6 + + +# +# Expand a couple of things that would make invalid Python code. Tedious... +# +pyprefix=$prefix;pyexec_prefix=$exec_prefix +pybindir=$bindir;pydatadir=$datadir +test "$prefix" = "NONE" && pyprefix=$ac_default_prefix +test "$exec_prefix" = "NONE" && pyexec_prefix=$pyprefix +test "$bindir" = '${exec_prefix}/bin' && pybindir=$pyexec_prefix/bin +test "$datadir" = '${prefix}/share' && pydatadir=$pyprefix/share + + + + + +trap '' 1 2 15 +cat > confcache <<\EOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +EOF +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +(set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote substitution + # turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + -e "s/'/'\\\\''/g" \ + -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' + ;; + esac >> confcache +if cmp -s $cache_file confcache; then + : +else + if test -w $cache_file; then + echo "updating cache $cache_file" + cat confcache > $cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Any assignment to VPATH causes Sun make to only execute +# the first set of double-colon rules, so remove it if not needed. +# If there is a colon in the path, we need to keep it. +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' +fi + +trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 + +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +cat > conftest.defs <<\EOF +s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g +s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g +s%\[%\\&%g +s%\]%\\&%g +s%\$%$$%g +EOF +DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` +rm -f conftest.defs + + +# Without the "./", some shells look in PATH for config.status. +: ${CONFIG_STATUS=./config.status} + +echo creating $CONFIG_STATUS +rm -f $CONFIG_STATUS +cat > $CONFIG_STATUS <<EOF +#! /bin/sh +# Generated automatically by configure. +# Run this file to recreate the current configuration. +# This directory was configured as follows, +# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# +# $0 $ac_configure_args +# +# Compiler output produced by configure, useful for debugging +# configure, is in ./config.log if it exists. + +ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" +for ac_option +do + case "\$ac_option" in + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" + exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; + -version | --version | --versio | --versi | --vers | --ver | --ve | --v) + echo "$CONFIG_STATUS generated by autoconf version 2.13" + exit 0 ;; + -help | --help | --hel | --he | --h) + echo "\$ac_cs_usage"; exit 0 ;; + *) echo "\$ac_cs_usage"; exit 1 ;; + esac +done + +ac_given_srcdir=$srcdir +ac_given_INSTALL="$INSTALL" + +trap 'rm -fr `echo "bin/sgmltools bin/buildcat bin/sgmlwhich Makefile dsssl/print.dsl bin/gensgmlenv" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +EOF +cat >> $CONFIG_STATUS <<EOF + +# Protect against being on the right side of a sed subst in config.status. +sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; + s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF +$ac_vpsub +$extrasub +s%@SHELL@%$SHELL%g +s%@CFLAGS@%$CFLAGS%g +s%@CPPFLAGS@%$CPPFLAGS%g +s%@CXXFLAGS@%$CXXFLAGS%g +s%@FFLAGS@%$FFLAGS%g +s%@DEFS@%$DEFS%g +s%@LDFLAGS@%$LDFLAGS%g +s%@LIBS@%$LIBS%g +s%@exec_prefix@%$exec_prefix%g +s%@prefix@%$prefix%g +s%@program_transform_name@%$program_transform_name%g +s%@bindir@%$bindir%g +s%@sbindir@%$sbindir%g +s%@libexecdir@%$libexecdir%g +s%@datadir@%$datadir%g +s%@sysconfdir@%$sysconfdir%g +s%@sharedstatedir@%$sharedstatedir%g +s%@localstatedir@%$localstatedir%g +s%@libdir@%$libdir%g +s%@includedir@%$includedir%g +s%@oldincludedir@%$oldincludedir%g +s%@infodir@%$infodir%g +s%@mandir@%$mandir%g +s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g +s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g +s%@INSTALL_DATA@%$INSTALL_DATA%g +s%@JADE@%$JADE%g +s%@oldjade@%$oldjade%g +s%@openjade@%$openjade%g +s%@LYNX@%$LYNX%g +s%@W3M@%$W3M%g +s%@ISILO@%$ISILO%g +s%@PYTHON@%$PYTHON%g +s%@CC@%$CC%g +s%@etcsgml@%$etcsgml%g +s%@dbimages@%$dbimages%g +s%@pyprefix@%$pyprefix%g +s%@pyexec_prefix@%$pyexec_prefix%g +s%@pybindir@%$pybindir%g +s%@pydatadir@%$pydatadir%g + +CEOF +EOF + +cat >> $CONFIG_STATUS <<\EOF + +# Split the substitutions into bite-sized pieces for seds with +# small command number limits, like on Digital OSF/1 and HP-UX. +ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. +ac_file=1 # Number of current file. +ac_beg=1 # First line for current file. +ac_end=$ac_max_sed_cmds # Line after last line for current file. +ac_more_lines=: +ac_sed_cmds="" +while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file + else + sed "${ac_end}q" conftest.subs > conftest.s$ac_file + fi + if test ! -s conftest.s$ac_file; then + ac_more_lines=false + rm -f conftest.s$ac_file + else + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f conftest.s$ac_file" + else + ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + fi + ac_file=`expr $ac_file + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_cmds` + fi +done +if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat +fi +EOF + +cat >> $CONFIG_STATUS <<EOF + +CONFIG_FILES=\${CONFIG_FILES-"bin/sgmltools bin/buildcat bin/sgmlwhich Makefile dsssl/print.dsl bin/gensgmlenv"} +EOF +cat >> $CONFIG_STATUS <<\EOF +for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. + + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dir_suffix. + ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + else + ac_dir_suffix= ac_dots= + fi + + case "$ac_given_srcdir" in + .) srcdir=. + if test -z "$ac_dots"; then top_srcdir=. + else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; + /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; + *) # Relative path. + srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" + top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + case "$ac_given_INSTALL" in + [/$]*) INSTALL="$ac_given_INSTALL" ;; + *) INSTALL="$ac_dots$ac_given_INSTALL" ;; + esac + + echo creating "$ac_file" + rm -f "$ac_file" + configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." + case "$ac_file" in + *Makefile*) ac_comsub="1i\\ +# $configure_input" ;; + *) ac_comsub= ;; + esac + + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + sed -e "$ac_comsub +s%@configure_input@%$configure_input%g +s%@srcdir@%$srcdir%g +s%@top_srcdir@%$top_srcdir%g +s%@INSTALL@%$INSTALL%g +" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file +fi; done +rm -f conftest.s* + +EOF +cat >> $CONFIG_STATUS <<EOF + +EOF +cat >> $CONFIG_STATUS <<\EOF + +exit 0 +EOF +chmod +x $CONFIG_STATUS +rm -fr confdefs* $ac_clean_files +test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + + diff --git a/gnu/dist/sgmltools-lite/configure.in b/gnu/dist/sgmltools-lite/configure.in new file mode 100644 index 00000000..e2ea0db7 --- /dev/null +++ b/gnu/dist/sgmltools-lite/configure.in @@ -0,0 +1,93 @@ +dnl +dnl configure.in +dnl +dnl $Id: configure.in,v 1.7 2000/10/25 06:00:05 cdegroot Exp $ +dnl +dnl Process this file with autoconf to produce a configure script. +dnl +dnl SGMLtools - an SGML toolkit. +dnl Copyright (C) 1998 Cees A. de Groot +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; if not, write to the Free Software +dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +AC_INIT(dsssl) + +AC_PROG_INSTALL + +AC_SUBST(JADE) +AC_PATH_PROG(oldjade, jade, N/A) +AC_PATH_PROG(openjade, openjade, N/A) +if test "$openjade" != "N/A"; then + JADE=$openjade +elif test "$oldjade" != "N/A"; then + JADE=$oldjade +else + AC_MSG_ERROR(You don't have Jade or OpenJade installed) + exit 1 +fi +AC_MSG_RESULT(Using $JADE as DSSSL engine) + +AC_PATH_PROG(LYNX, lynx, N/A) +AC_PATH_PROG(W3M, w3m, N/A) +dnl Fixme - this is Linux-dependent +AC_PATH_PROG(ISILO, iSilo386, N/A) + +AC_PATH_PROG(PYTHON, python) +AC_SUBST(PYTHON) +if echo 'import sys +if sys.version < "1.5": raise SystemExit, 1' | $PYTHON +then + : # Solaris and OSF/1 /bin/sh don't know about negation operators... +else + AC_MSG_ERROR(You don't have Python 1.5 or better...) + exit 1 +fi + +dnl Because AC_CHECK_FILE checks for CC... +AC_PROG_CC + +etcsgml=/etc/sgml +AC_ARG_WITH(etcsgml, +[ --with-etcsgml=DIR use DIR instead of /etc/sgml], + etcsgml=$withval) +AC_SUBST(etcsgml) + +dnl AC_MSG_CHECKING(DocBook Images) +AC_CHECK_FILE(/usr/share/sgml/docbkdsl/images, + dnl SuSE Linux + dbimages=/usr/share/sgml/docbkdsl/images/, + [test "$datadir" = '${prefix}/share' && dbimages=$ac_default_prefix/share/sgml/stylesheets/docbook/images/]) +AC_ARG_WITH(dbimages, +[ --with-dbimages=DIR use DIR instead of DATADIR/sgml/stylesheets/docbook/images/], + dbimages=$withval) +AC_MSG_RESULT(" trying $dbimages") +AC_SUBST(dbimages) + +# +# Expand a couple of things that would make invalid Python code. Tedious... +# +pyprefix=$prefix;pyexec_prefix=$exec_prefix +pybindir=$bindir;pydatadir=$datadir +test "$prefix" = "NONE" && pyprefix=$ac_default_prefix +test "$exec_prefix" = "NONE" && pyexec_prefix=$pyprefix +test "$bindir" = '${exec_prefix}/bin' && pybindir=$pyexec_prefix/bin +test "$datadir" = '${prefix}/share' && pydatadir=$pyprefix/share +AC_SUBST(pyprefix) +AC_SUBST(pyexec_prefix) +AC_SUBST(pybindir) +AC_SUBST(pydatadir) + +AC_OUTPUT(bin/sgmltools bin/buildcat bin/sgmlwhich Makefile dsssl/print.dsl bin/gensgmlenv) + diff --git a/gnu/dist/sgmltools-lite/dsssl/ascii-lynx.dsl b/gnu/dist/sgmltools-lite/dsssl/ascii-lynx.dsl new file mode 100644 index 00000000..3ac2268c --- /dev/null +++ b/gnu/dist/sgmltools-lite/dsssl/ascii-lynx.dsl @@ -0,0 +1,22 @@ +<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [ +<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN" CDATA dsssl> +]> +<style-sheet> +<style-specification id="html" use="docbook"> +<style-specification-body> +;; +;; $Id: ascii-lynx.dsl,v 1.1 2000/03/24 09:16:05 cdegroot Exp $ +;; +;; Stylesheet that converts to HTML with the correct parameters to do a +;; subsequent Lynx -dump on it. +;; + +(define nochunks #t) +(define %html-manifest% #f) +(define %html-ext% ".html") +(define %use-id-as-filename% #f) + +</style-specification-body> +</style-specification> +<external-specification id="docbook" document="docbook.dsl"> +</style-sheet> diff --git a/gnu/dist/sgmltools-lite/dsssl/ascii-w3m.dsl b/gnu/dist/sgmltools-lite/dsssl/ascii-w3m.dsl new file mode 100644 index 00000000..132b5666 --- /dev/null +++ b/gnu/dist/sgmltools-lite/dsssl/ascii-w3m.dsl @@ -0,0 +1,22 @@ +<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [ +<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN" CDATA dsssl> +]> +<style-sheet> +<style-specification id="html" use="docbook"> +<style-specification-body> +;; +;; $Id: ascii-w3m.dsl,v 1.1 2000/11/27 19:14:43 dnedrow Exp $ +;; +;; Stylesheet that converts to HTML with the correct parameters to do a +;; subsequent w3m -dump on it. +;; + +(define nochunks #t) +(define %html-manifest% #f) +(define %html-ext% ".html") +(define %use-id-as-filename% #f) + +</style-specification-body> +</style-specification> +<external-specification id="docbook" document="docbook.dsl"> +</style-sheet> diff --git a/gnu/dist/sgmltools-lite/dsssl/html.dsl b/gnu/dist/sgmltools-lite/dsssl/html.dsl new file mode 100644 index 00000000..e1a6d435 --- /dev/null +++ b/gnu/dist/sgmltools-lite/dsssl/html.dsl @@ -0,0 +1,66 @@ +<!-- + html.dsl - stylesheets for HTML output. + + $Id: html.dsl,v 1.2 2000/03/24 09:36:07 cdegroot Exp $ + + SGMLtools - an SGML toolkit. + Copyright (C) 1998 Cees A. de Groot + + 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. + + 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + --> +<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [ +<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN" CDATA dsssl> +]> +<style-sheet> + +<style-specification id="html" use="docbook"> +<style-specification-body> + ;; + ;; This is the standard HTML stylesheet, which deviates only a little bit + ;; from the plain version. + ;; + (define %html-ext% ".html") + (define %body-attr% '()) + (define %shade-verbatim% #t) + (define %use-id-as-filename% #t) + + (define %graphic-default-extension% "gif") + (define %admon-graphics% #t) + (define %gentext-nav-tblwidth% "100%") +</style-specification-body> +</style-specification> + +<style-specification id="onehtml" use="html"> +<style-specification-body> + ;; + ;; Spit out a single file. + ;; + (define nochunks #t) +</style-specification-body> +</style-specification> + +<style-specification id="howto" use="html"> +<style-specification-body> + ;; + ;; This stylesheet tries to get a bit closer to what people are used to from + ;; SGMLtools 1.0. + ;; + (define %generate-article-toc% #t) +</style-specification-body> +</style-specification> + +<external-specification id="docbook" document="docbook.dsl"> +</style-sheet> diff --git a/gnu/dist/sgmltools-lite/dsssl/ld2db.dsl b/gnu/dist/sgmltools-lite/dsssl/ld2db.dsl new file mode 100644 index 00000000..15bdb980 --- /dev/null +++ b/gnu/dist/sgmltools-lite/dsssl/ld2db.dsl @@ -0,0 +1,874 @@ +<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" > + +<style-sheet> +<style-specification id="params"> +<style-specification-body> +;; +;; linuxdoc to docbook transformation stylesheet +;; +;; Charles Bozeman +;; +;; $Id: ld2db.dsl,v 1.1 2000/03/24 09:16:05 cdegroot Exp $ +;; +;; This transformation stylesheet attempts to "pretty print" the +;; resulting sgml document. +;; +;; Several of the procedure are copied from other sources such as +;; Norm Walsh's docbook stylesheets, Paul Prescod's transform.dsl, +;; and Mulberry Technologies DSSSL pages. +;; +;; Invocation example: +;; jade -t sgml -d ld2db.dsl#db in.sgm >out.sgm + +;; ============================ PARAMETERS ============================== + +(define %transform-element-BF% "Emphasis") +(define %transform-element-SL% "Emphasis") +(define %transform-element-TT% "Literal") +(define %transform-element-SF% "Emphasis") +(define %ids-repl-list% `("0" "i-0" "1" "i-1" "2" "i-2" "3" "i-3" + "4" "i-4" "5" "i-5" "6" "i-6" "7" "i-7" + "8" "i-8" "9" "i-9")) + +</style-specification-body> +</style-specification> + +<style-specification id="library" > +<style-specification-body> + +(define debug + (external-procedure "UNREGISTERED::James Clark//Procedure::debug")) + +;(declare-characteristic preserve-sdata? +; "UNREGISTERED::James Clark//Characteristic::preserve-sdata?" +; #f) + + +;; ====================== Library Functions ======================== + +(define (node-list-first-element nodelist) + ;; REFENTRY lib-node-list-first-element + ;; PURP Return the first element node in a node list + ;; DESC + ;; This function returns the first node in a node list which is + ;; an element (as opposed to a PI or anything else that might appear + ;; in a node list). + ;; /DESC + ;; /REFENTRY + (let loop ((nl nodelist)) + (if (node-list-empty? nl) + (empty-node-list) + (if (gi (node-list-first nl)) + (node-list-first nl) + (loop (node-list-rest nl)))))) + +(define (ipreced nl) + ;; REFENTRY lib-ipreced + ;; PURP Implements ipreced as per ISO/IEC 10179:1996 + ;; DESC + ;; Implements 'ipreced' as per ISO/IEC 10179:1996 + ;; /DESC + ;; AUTHOR From ISO/IEC 10179:1996 + ;; /REFENTRY + (node-list-map (lambda (snl) + (let loop ((prev (empty-node-list)) + (rest (siblings snl))) + (cond ((node-list-empty? rest) + (empty-node-list)) + ((node-list=? (node-list-first rest) snl) + prev) + (else + (loop (node-list-first rest) + (node-list-rest rest)))))) + nl)) + + +(define (ifollow nl) + ;; REFENTRY + ;; PURP Implements ifollow as per ISO/IEC 10179:1996 + ;; DESC + ;; Implements 'ifollow' as per ISO/IEC 10179:1996 + ;; /DESC + ;; AUTHOR From ISO/IEC 10179:1996 + ;; /REFENTRY + (node-list-map (lambda (snl) + (let loop ((rest (siblings snl))) + (cond ((node-list-empty? rest) + (empty-node-list)) + ((node-list=? (node-list-first rest) snl) + (node-list-first (node-list-rest rest))) + (else + (loop (node-list-rest rest)))))) + nl)) + +(define (siblings snl) + ;; REFENTRY + ;; PURP Implements siblings as per ISO/IEC 10179:1996 + ;; DESC + ;; Implements 'siblings' as per ISO/IEC 10179:1996 + ;; /DESC + ;; AUTHOR From ISO/IEC 10179:1996 + ;; /REFENTRY + (children (parent snl))) + +;; ====================================================================== + +(define (sgml-root-element) + ;; REFENTRY + ;; PURP Returns the node that is the root element of the current document + ;; DESC + ;; Return the root element of the document by walking up from + ;; wherever we are. (Isn't this built-in to DSSSL somehow???) + ;; /DESC + ;; /REFENTRY + (let loop ((root (current-node))) + (if (node-list-empty? (parent root)) + root + (loop (parent root))))) + +;; ====================================================================== + +(define (repl-substring? string target pos) + ;; REFENTRY lib-repl-substring-p + ;; PURP Returns true if the specified substring can be replaced + ;; DESC + ;; Returns '#t' if 'target' occurs at 'pos' in 'string'. + ;; /DESC + ;; /REFENTRY + (let* ((could-match (<= (+ pos (string-length target)) + (string-length string))) + (match (if could-match + (substring string pos (+ pos (string-length target))) ""))) + (and could-match (string=? match target)))) + +(define (repl-substring string target repl pos) + ;; REFENTRY lib-repl-substring + ;; PURP Replace substring in a string + ;; DESC + ;; Replaces 'target' with 'repl' in 'string' at 'pos'. + ;; /DESC + ;; /REFENTRY + (let ((matches (repl-substring? string target pos))) + (if matches + (string-append + (substring string 0 pos) + repl + (substring string + (+ pos (string-length target)) + (string-length string))) + string))) + +(define (repl-substring-list? string replace-list pos) + ;; REFENTRY lib-repl-substring-list-p + ;; PURP Perform repl-substring? with a list of target/replacement pairs + ;; DESC + ;; Returns '#t' if any target in 'replace-list' occurs at 'pos' in 'string'. + ;; ARGS + ;; ARG 'string' + ;; The string in which replacement should be tested. + ;; /ARG + ;; ARG 'replace-list' + ;; A list of target/replacement pairs. This list is just a list of + ;; strings, treated as pairs. For example, '("was" "x" "is" "y")'. + ;; In this example, 'was' may be replaced by 'x' and 'is' may be + ;; replaced by 'y'. + ;; /ARG + ;; ARG 'pos' + ;; The location within 'string' where the test will occur. + ;; /ARG + ;; /ARGS + ;; /DESC + ;; EXAMPLE + ;; '(repl-substring-list? "this is it" ("was" "x" "is" "y") 2)' + ;; returns '#t': "is" could be replaced by "y". + ;; /EXAMPLE + ;; /REFENTRY + (let loop ((list replace-list)) + (let ((target (car list)) + (repl (car (cdr list))) + (rest (cdr (cdr list)))) + (if (repl-substring? string target pos) + #t + (if (null? rest) + #f + (loop rest)))))) + +(define (repl-substring-list-target string replace-list pos) + ;; REFENTRY lib-repl-substring-list-target + ;; PURP Return the target that matches in a string + ;; DESC + ;; Returns the target in 'replace-list' that matches in 'string' at 'pos' + ;; See also 'repl-substring-list?'. + ;; /DESC + ;; /REFENTRY + (let loop ((list replace-list)) + (let ((target (car list)) + (repl (car (cdr list))) + (rest (cdr (cdr list)))) + (if (repl-substring? string target pos) + target + (if (null? rest) + #f + (loop rest)))))) + +(define (repl-substring-list-repl string replace-list pos) + ;; REFENTRY lib-repl-substring-list-repl + ;; PURP Return the replacement that would be used in the string + ;; DESC + ;; Returns the replacement in 'replace-list' that would be used for the + ;; target that matches in 'string' at 'pos' + ;; See also 'repl-substring-list?'. + ;; /DESC + ;; /REFENTRY + (let loop ((list replace-list)) + (let ((target (car list)) + (repl (car (cdr list))) + (rest (cdr (cdr list)))) + (if (repl-substring? string target pos) + repl + (if (null? rest) + #f + (loop rest)))))) + +(define (repl-substring-list string replace-list pos) + ;; REFENTRY lib-repl-substring-list + ;; PURP Replace the first target in the replacement list that matches + ;; DESC + ;; Replaces the first target in 'replace-list' that matches in 'string' + ;; at 'pos' with its replacement. + ;; See also 'repl-substring-list?'. + ;; /DESC + ;; /REFENTRY + (if (repl-substring-list? string replace-list pos) + (let ((target (repl-substring-list-target string replace-list pos)) + (repl (repl-substring-list-repl string replace-list pos))) + (repl-substring string target repl pos)) + string)) + +(define (string-replace string target repl) + ;; REFENTRY lib-string-replace + ;; PURP Replace all occurances of a target substring in a string + ;; DESC + ;; Replaces all occurances of 'target' in 'string' with 'repl'. + ;; /DESC + ;; /REFENTRY + (let loop ((str string) (pos 0)) + (if (>= pos (string-length str)) + str + (loop (repl-substring str target repl pos) + (if (repl-substring? str target pos) + (+ (string-length repl) pos) + (+ 1 pos)))))) + +(define (node-list-first-element-after-match nodelist match-el) + ;; REFENTRY lib-node-list-first-element + ;; PURP Return the first element node in a node list after given element + ;; DESC + ;; This function returns the first node in a node list which appears + ;; after the given match element n element (as opposed to a PI or + ;; aanything else that might appear n a node list). + ;; /DESC + ;; /REFENTRY + (let loop ((nl nodelist)) + (if (node-list-empty? nl) + (empty-node-list) + (if (equal? (gi (node-list-first nl)) match-el) + (let loop-2 ((nl (node-list-rest nl))) + (if (node-list-empty? nl) + (empty-node-list) + (if (gi (node-list-first nl)) + (node-list-first nl) + (loop-2 (node-list-rest nl))))) + (loop (node-list-rest nl)))))) + +</style-specification-body> +</style-specification> + +<style-specification id="common" > +<style-specification-body> + +;; ============================ TOP LEVEL ============================== + +(declare-flow-object-class formatting-instruction + "UNREGISTERED::James Clark//Flow Object Class::formatting-instruction") +(declare-flow-object-class element + "UNREGISTERED::James Clark//Flow Object Class::element") +(declare-flow-object-class empty-element + "UNREGISTERED::James Clark//Flow Object Class::empty-element") +(declare-flow-object-class document-type + "UNREGISTERED::James Clark//Flow Object Class::document-type") +(declare-flow-object-class processing-instruction + "UNREGISTERED::James Clark//Flow Object Class::processing-instruction") +(declare-flow-object-class entity + "UNREGISTERED::James Clark//Flow Object Class::entity") +(declare-flow-object-class entity-ref + "UNREGISTERED::James Clark//Flow Object Class::entity-ref") + +(declare-characteristic preserve-sdata? + "UNREGISTERED::James Clark//Characteristic::preserve-sdata?" #t) + + +(define (start-tag str) + (string-append "<" str ">" )) + +(define (end-tag str) + (string-append "</" str ">")) + +(define (comment-tag str) + (string-append "<" "--" str "--" ">")) + +; newline +;(define %RE% "\U-000D") +(define %RE% "&#RE;") + +(define (write-string str) + (make formatting-instruction + data: str)) + +(define (write-string-RE str) + (make formatting-instruction + data: (string-append str %RE%))) + +(define (RE-write-string str) + (make formatting-instruction + data: (string-append %RE% str))) + +(define (RE-write-string-RE str) + (make formatting-instruction + data: (string-append %RE% str %RE%))) + +; procedure for enclosing inline data between pre and aft text +(define ($make-inline$ pre aft) + (sosofo-append + (write-string pre) + (process-children) + (write-string aft))) + +; procedure for enclosing a block of data between pre and aft text +; Note: always terminates with a newline +(define ($make-block$ pre aft) + (sosofo-append + (write-string pre) + (process-children) + (write-string-RE aft))) + +(define ($remap-attr$ el) + (cons (list "REMAP" el) `())) + +(define (attr-name lis) + (car (car lis))) + +(define (attr-value lis) + (car (cdr (car lis)))) + +; given a list of attribute pairs, output them +(define ($out-attributes$ attlist) + (let loop ((rest attlist)) + (if (equal? rest `()) + (write-string ">") + (make sequence + (write-string (string-append " " + (attr-name rest) + "=\"" ; open quote + (attr-value rest) + "\"")) ; close quote + (loop (cdr rest)))))) + + +(define (make-block-element #!optional #!key gind attributes + (sosofo (process-children))) + (let ((gi-nd (if gind gind (gi (current-node))))) + (sosofo-append + (RE-write-string (string-append "<" gi-nd)) + (if attributes + ($out-attributes$ attributes) + (write-string-RE ">")) + sosofo + (RE-write-string-RE (end-tag gi-nd))))) + +(define (make-comment-element #!optional #!key gind attributes + (sosofo (process-children))) + (let ((gi-nd (if gind gind (gi (current-node))))) + (sosofo-append + (RE-write-string (string-append "<" "!--" gi-nd "--" ">")) + (if attributes + ($out-attributes$ attributes) + (write-string-RE ">")) + sosofo + (RE-write-string-RE (string-append "<" "!--" "/" gi-nd "--" ">"))))) + +(define (make-inline-element #!optional #!key gind attributes + (sosofo (process-children))) + (let ((gi-nd (if gind gind (gi (current-node))))) + (sosofo-append + (write-string (string-append "<" gi-nd)) + (if attributes + ($out-attributes$ attributes) + (write-string ">")) + sosofo + (write-string (end-tag gi-nd))))) + +(define (make-empty-inline-element #!optional #!key gind attributes + (sosofo (process-children))) + (let ((gi-nd (if gind gind (gi (current-node))))) + (sosofo-append + (write-string (string-append "<" gi-nd)) + (if attributes + ($out-attributes$ attributes) + (write-string ">")) + sosofo))) + +(define (make-line-element #!optional #!key gind attributes + (sosofo (process-children))) + (let ((gi-nd (if gind gind (gi (current-node))))) + (sosofo-append + (RE-write-string (string-append "<" gi-nd)) + (if attributes + ($out-attributes$ attributes) + (write-string ">")) + sosofo + (write-string-RE (end-tag gi-nd))))) + +(define (make-empty-line-element #!optional #!key gind attributes + (sosofo (process-children))) + (let ((gi-nd (if gind gind (gi (current-node))))) + (sosofo-append + (RE-write-string (string-append "<" gi-nd)) + (if attributes + ($out-attributes$ attributes) + (write-string ">")) + sosofo))) + +</style-specification-body> +</style-specification> + +<style-specification id="db" use="common library params"> +<style-specification-body> + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; From the DSSSL Cookbook +;; http://www.mulberrytech.com/dsssl/dsssldoc/cookbook/cookbook.html +;; Default rule + +(default (output-element)) + +(define (output-element #!optional (node (current-node))) + (if (node-property "must-omit-end-tag?" node) + (make empty-element + attributes: (copy-attributes)) + (make element + attributes: (copy-attributes)))) + +(define (copy-attributes #!optional (nd (current-node))) + (let loop ((atts (named-node-list-names (attributes nd)))) + (if (null? atts) + '() + (let* ((name (car atts)) + (value (attribute-string name nd))) + (if value + (cons (list name value) + (loop (cdr atts))) + (loop (cdr atts))))))) + + +(element LINUXDOC (process-children)) + +(element ARTICLE + (make sequence + (make document-type name: "Article" + public-id: "-//Davenport//DTD DocBook V3.0//EN") + (make-block-element gind: "Article"))) + +(element BOOK + (make sequence + (make document-type name: "Book" + public-id: "-//Davenport//DTD DocBook V3.0//EN" ) + (make-block-element gind: "Book"))) + +(element REPORT + (make sequence + (make document-type name: "Book" + public-id: "-//Davenport//DTD DocBook V3.0//EN" ) + (make-block-element gind: "Book" attributes: `(("remap" "report"))))) + +(element TITLEPAG + (if (equal? (gi (parent (current-node))) "ARTICLE") + (make-block-element gind: "ArtHeader") + (make-block-element + gind: "BookInfo" + sosofo: (make-block-element + gind: "BookBiblio")))) + +(element DATE (make-line-element gind: "PubDate")) + +; this may need to be fixed-up manually +(element NAME + (let ((htmlurl-nl (select-elements (children (current-node)) "HTMLURL"))) + (make sequence + (make-line-element gind: "FirstName") + (if (node-list-empty? htmlurl-nl) + (empty-sosofo) + (make-block-element gind: "AuthorBlurb" + sosofo: (make-line-element gind: "Para" + sosofo: (with-mode name-htmlurl + (process-node-list htmlurl-nl)))))))) + +;; does'nt work well, correct by hand +;(element INST (make element gi: "OrgName")) +(element INST (empty-sosofo)) + +(element ABSTRACT + (make-block-element + gind: "Abstract" + sosofo: (make-block-element gind: "Para"))) + +;; Norm's stylesheets build this stuff +(element TOC (empty-sosofo)) +(element LOT (empty-sosofo)) +(element LOF (empty-sosofo)) + +(element TITLE (make-line-element gind: "Title")) + +;; ========================== BLOCK ELEMENTS ============================ + +(element P + (let ((para-empty (if (and (equal? 0 (string-length (data (current-node)))) + (node-list-empty? (children (current-node)))) + #t #f))) + (if para-empty + (empty-sosofo) ; don't leave empty paragraphs lying around! + (make-block-element gind: "Para" )))) + +(element APPENDIX + (let* ((follow-nd (ifollow (current-node))) + (chapt-next (if (equal? (gi follow-nd) "CHAPT") #t #f))) + (if chapt-next + (empty-sosofo) + (make-empty-line-element + sosofo: (make-line-element + gind: "Title" + sosofo: (literal "Appendix")))))) + +(element CHAPT + (let* ((preced-nd (ipreced (current-node))) + (apdx-prev (if (equal? (gi preced-nd) "APPENDIX") #t #f))) + (if apdx-prev + ($make-sect$ "Appendix") + ($make-sect$ "Chapter")))) + +(element SECT ($make-sect$ "Sect1")) +(element SECT1 ($make-sect$ "Sect2")) +(element SECT2 ($make-sect$ "Sect3")) +(element SECT3 ($make-sect$ "Sect4")) +(element SECT4 ($make-sect$ "Sect5")) + +;; build a section (or chapter) +(define ($make-sect$ gi-name) + (let ((attrs ($get-sect-id$ (current-node)))) + (make-block-element gind: gi-name attributes: attrs))) + + +;; look for a label element in a heading element then put the 'id' in +;; the section (or chapter) attribute +(define ($get-sect-id$ nd) + (let* ((heading (node-list-first + (select-elements (children nd) "HEADING"))) + (label (select-elements (children heading) "LABEL")) + (label-id (if (node-list-empty? label) + #f + ($fix-ids$ + (attribute-string "id" (node-list-first label))))) + (attrs (if label-id + (cons (list "id" ($fix-ids$ label-id)) (copy-attributes)) + (copy-attributes)))) + attrs)) + +;; look for a label element in a child elements +(define ($get-child-id$ nd) + (let* ((label (select-elements (children nd) "LABEL"))) + (if (node-list-empty? label) + #f + ($fix-ids$ (attribute-string "id" (node-list-first label)))))) + +(element HEADING (make-line-element gind: "Title" )) + +(element HEADER (empty-sosofo)) +(element LHEAD (empty-sosofo)) +(element RHEAD (empty-sosofo)) + +;; ============================== LISTS ================================= + +(element ITEM + (let ((para-nl (select-elements (children (current-node)) "P")) + (item-empty (if (equal? 0 (string-length (data (current-node)))) + #t #f))) + (make sequence + (write-string-RE (start-tag "ListItem")) + (if (node-list-empty? para-nl) + (make-block-element gind: "Para") + (if item-empty + (process-children) + (make sequence + (write-string-RE (start-tag "Para")) + (process-children)))) + (write-string-RE (end-tag "ListItem"))))) + +(element ENUM (make-block-element gind: "OrderedList" )) +(element ITEMIZE (make-block-element gind: "ItemizedList" )) + +(element DESCRIP + (make sequence + (write-string-RE (start-tag "VariableList")) + (process-children) + (write-string-RE (end-tag "VarListEntry")) + (write-string (end-tag "VariableList")))) + +(element TAG + (let ((END-ENTRY (cond ((> (child-number) 1) + (end-tag "VarListEntry")) + (else "")))) + (make sequence + (write-string END-ENTRY) + (RE-write-string (start-tag "VarListEntry")) + (make-line-element gind: "Term") + (write-string (start-tag "ListItem"))))) + +;; =========================== FONT CHANGES ============================= + +(element EM + (if (equal? (gi (parent)) "TT") + (process-children) + (make-inline-element gind: "Emphasis"))) + +(element TT + (make-inline-element gind: %transform-element-TT% + attributes: `(("remap" "tt")))) + +(element BF + (if (equal? (gi (parent)) "TT") + (process-children) + (make-inline-element gind: %transform-element-BF% + attributes: `(("remap" "bf"))))) + +(element IT + (if (equal? (gi (parent)) "TT") + (process-children) + (make-inline-element gind: "Emphasis" + attributes: `(("remap" "it"))))) + +(element SL + (make-inline-element gind: %transform-element-SL% + attributes: `(("remap" "sl")))) + +(element SF + (make-inline-element gind: %transform-element-SF% + attributes: `(("remap" "sf")))) + +(element CODE (make-block-element gind: "ProgramListing")) + +(element TSCREEN (make-block-element gind: "Screen")) +(element VERB + (if (equal? (gi (parent)) "TSCREEN") + (process-children) + (make-block-element gind: "Screen"))) + +;============================ Linking ================================== + +;; ID and IDREF cannot begin with a number and cannot have embedded spaces +;; or under bars. +(define ($fix-ids$ string) + (let* ((nw-str (string-replace string " " "-")) + (ub-str (string-replace nw-str "_" "-"))) + (repl-substring-list ub-str %ids-repl-list% 0))) + + +(element REF + (make-empty-inline-element + gind: "XRef" + attributes: `(("LinkEnd" ,($fix-ids$ (attribute-string "id")))))) + +(element HTMLURL + (if (equal? (gi (parent (current-node))) "NAME") + (empty-sosofo) + (make element gi: "ULink" + attributes: `(("URL" ,(attribute-string "URL"))) + (if (attribute-string "NAME") + (literal (attribute-string "NAME")) + (literal (attribute-string "URL")) )))) + +(element URL + (make element gi: "ULink" + attributes: `(("URL" ,(attribute-string "URL"))) + (if (attribute-string "NAME") + (literal (attribute-string "NAME")) + (literal (attribute-string "URL")) ))) + ; FIXME: Name attribute + +(element LABEL + (if (equal? (gi (parent (current-node))) "P") + (make-empty-inline-element + gind: "Anchor" + attributes: `(("id" ,($fix-ids$ (attribute-string "id"))))) + (empty-sosofo))) + +;; for when htmlurl is a child of name +(mode name-htmlurl + (element HTMLURL + (make-block-element + gind: "ULink" + attributes: `(("URL" ,(attribute-string "URL"))) + sosofo: (if (attribute-string "NAME") + (literal (attribute-string "NAME")) + (literal (attribute-string "URL")) )))) + +;; ======================== FIGURES and TABLES ========================== + +(define (make-graphic-el fileref) + (make-line-element gind: "Graphic" attributes: `(("FileRef" ,fileref)))) + +(element FIGURE + (let* ((caption-nl (select-elements (descendants (current-node)) "CAPTION")) + (label-id ($get-child-id$ caption-nl)) + (eps (select-elements (children (current-node)) "EPS")) + (file (attribute-string "file" (node-list-first eps)))) + (make-block-element + gind: "Figure" + attributes: (if label-id `(("id" ,($fix-ids$ label-id))) `()) + sosofo: (if (not (node-list-empty? caption-nl)) + (make sequence + (with-mode caption-to-title + (process-node-list caption-nl)) + (make-graphic-el (if file file "dummy"))) + (make-graphic-el (if file file "dummy")))))) + +(element EPS (empty-sosofo)) +(element PH (empty-sosofo)) + +(element CAPTION (empty-sosofo)) + +(mode caption-to-title + (element CAPTION + (make-line-element gind: "Title"))) + +;; currently the frame attribute must be set manually +(element TABLE + (let* ((caption-nl (select-elements (descendants (current-node)) "CAPTION")) + (label-id ($get-child-id$ caption-nl))) + (if (node-list-empty? caption-nl) + (make-block-element gind: "InformalTable") + (make-block-element gind: "Table" + attributes: (if label-id + `(("id" ,($fix-ids$ label-id))) + `()) + sosofo: (make sequence + (with-mode caption-to-title + (process-node-list caption-nl)) + (process-children)))))) + +(define ($count-cols$ ca-str) + (let loop ((cnt 0) (str ca-str)) + (if (equal? (string-length str) 0) + cnt + (if (equal? (substring str 0 1) "|") + (loop cnt (substring str 1 (string-length str))) + (loop (+ 1 cnt) (substring str 1 (string-length str))))))) + +(define ($make-colspecs$ ca-str) + (if (equal? (string-length ca-str) 0) + (empty-sosofo) + (if (equal? (substring ca-str 0 1) "|") + ($make-colspecs$ (substring ca-str 1 (string-length ca-str))) + (let loop ((str ca-str)) + (if (equal? (string-length str) 0) + (empty-sosofo) + (let* ((col-sep (if (> (string-length str) 1) + (if (equal? (substring str 1 2) "|") + #t + #f) + #f)) + (pos (if col-sep 2 1))) + (make sequence + ($build-colspec$ (substring str 0 1) col-sep) + (loop (substring str pos (string-length str)))))))))) + +(define ($build-colspec$ cell-align col-sep) + (let* ((cellalign (case cell-align + (("l") "Left") + (("c") "Center") + (("r") "Right") + (else "Left"))) + (attrs (cons (list "Align" cellalign) (cons + (if col-sep + (list "Colsep" "1") + (list "Colsep" "0")) + `())))) + (make-empty-line-element + gind: "ColSpec" + attributes: attrs + sosofo: (empty-sosofo)))) + +(element TABULAR + (let* ((col-attr (attribute-string "CA")) + (colcnt ($count-cols$ col-attr))) + (make-block-element + gind: "TGroup" + attributes: `(("Cols" ,(number->string colcnt))) + sosofo: (make sequence + ($make-colspecs$ col-attr) + (RE-write-string-RE (start-tag "TBody")) + (row-check-border (node-list-first (children (current-node)))) + (write-string (start-tag "Entry")) + (process-children) + (write-string-RE (end-tag "Entry")) + (write-string-RE (end-tag "Row")) + (write-string-RE (end-tag "TBody")))))) + +(element COLSEP + (make sequence + (write-string (end-tag "Entry")) + (RE-write-string (start-tag "Entry")))) + +;; find the next "rowsep" then check if a "hline" immediatly follows +(define (row-check-border nd) + (let* ((follow-nl (follow nd)) + (af-nl (node-list-first-element-after-match follow-nl "ROWSEP")) + (hline-next (if (equal? (gi af-nl) "HLINE") #t #f))) + (if hline-next + (make sequence + (write-string (string-append "<" "Row")) + (if attributes + (make sequence + ($out-attributes$ `(("RowSep" "1"))) + (write-string %RE%)) + (write-string-RE ">"))) + (write-string-RE (start-tag "Row"))))) + +(element ROWSEP + (make sequence + (write-string-RE (end-tag "Entry")) + (write-string-RE (end-tag "Row")) + (row-check-border (current-node)) + (write-string-RE (start-tag "Entry")))) + +; for now +(element HLINE (empty-sosofo)) + +; don't do any math +(element DM (empty-sosofo)) + +; for now ignore index elements +(element CDX (empty-sosofo)) +(element IDX (empty-sosofo)) +(element NCDX (empty-sosofo)) +(element NIDX (empty-sosofo)) + +(element FOOTNOTE + (make-block-element + sosofo: (make-block-element gind: "Para"))) + +(element NEWLINE + (write-string %RE%)) + +</style-specification-body> +</style-specification> +</style-sheet> diff --git a/gnu/dist/sgmltools-lite/dsssl/print.dsl.in b/gnu/dist/sgmltools-lite/dsssl/print.dsl.in new file mode 100644 index 00000000..e8f73ac9 --- /dev/null +++ b/gnu/dist/sgmltools-lite/dsssl/print.dsl.in @@ -0,0 +1,106 @@ +<!-- + print.dsl.in - stylesheets for hardcopy output. + + $Id: print.dsl.in,v 1.3 2000/04/26 17:06:02 cdegroot Exp $ + + SGMLtools - an SGML toolkit. + Copyright (C) 1998 Cees A. de Groot + + 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. + + 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + --> +<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [ +<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN" CDATA dsssl> +]> +<style-sheet> + +<style-specification id="print" use="docbook"> +<style-specification-body> + + ;; this is necessary because right now jadetex does not understand + ;; symbolic entities, whereas things work well with numeric entities. + (declare-characteristic preserve-sdata? + "UNREGISTERED::James Clark//Characteristic::preserve-sdata?" + #f) + + (define %two-side% #f) + (define %section-autolabel% #t) + (define %visual-acuity% "normal") + + ;; + ;; Graphical admonitions. + ;; + (define %admon-graphics% #t) + (define %admon-graphics-path% + "@dbimages@") + (define ($admon-graphic$ #!optional (nd (current-node))) + (cond ((equal? (gi nd) (normalize "tip")) + (string-append %admon-graphics-path% "tip." + %graphic-default-extension%)) + ((equal? (gi nd) (normalize "note")) + (string-append %admon-graphics-path% "note." + %graphic-default-extension%)) + ((equal? (gi nd) (normalize "important")) + (string-append %admon-graphics-path% "important." + %graphic-default-extension%)) + ((equal? (gi nd) (normalize "caution")) + (string-append %admon-graphics-path% "caution." + %graphic-default-extension%)) + ((equal? (gi nd) (normalize "warning")) + (string-append %admon-graphics-path% "warning." + %graphic-default-extension%)) + (else (error (string-append (gi nd) " is not an admonition."))))) + +</style-specification-body> +</style-specification> + +<style-specification id="print.ps" use="print"> +<style-specification-body> + (define %graphic-default-extension% "eps") +</style-specification-body> +</style-specification> + +<style-specification id="print.pdf" use="print"> +<style-specification-body> + (define %graphic-default-extension% "pdf") +</style-specification-body> +</style-specification> + +<style-specification id="howto" use="print"> +<style-specification-body> + ;; + ;; A paper-saving stylesheet that mimics the SGMLtools 1.0 howto style. + ;; Not two-sided, because most people won't print two-sided. + ;; + (define %visual-acuity% "normal") + (define %two-side% #f) + (define %left-margin% 3pi) + (define %right-margin% 4pi) + (define %body-start-indent% 2pi) + (define %generate-article-toc% #t) + ;; + ;; Gnuishly correct fonts... + ;; + (define %body-font-family% "Computer Modern Roman") + (define %mono-font-family% "Computer Modern Typewriter") + (define %title-font-family% "Computer Modern Sans"); + (define %admon-font-family% "Computer Modern Sans"); + (define %guilabel-font-family% "Computer Modern Sans"); + +</style-specification-body> +</style-specification> + +<external-specification id="docbook" document="docbook.dsl"> +</style-sheet> diff --git a/gnu/dist/sgmltools-lite/dsssl/sgmltools.cat b/gnu/dist/sgmltools-lite/dsssl/sgmltools.cat new file mode 100644 index 00000000..96d22b33 --- /dev/null +++ b/gnu/dist/sgmltools-lite/dsssl/sgmltools.cat @@ -0,0 +1,36 @@ + + -- Catalog file for SGMLtools -- + + -- $Id: sgmltools.cat,v 1.2 2000/10/25 06:00:05 cdegroot Exp $ -- + + -- SGMLtools - an SGML toolkit. -- + -- Copyright (C) 1998 Cees A. de Groot -- + + -- 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. -- + + -- 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- + + + -- -- + -- Common generic driver files -- + -- -- +PUBLIC "-//SGMLtools//DOCUMENT Docbook Style Sheet for HTML//EN" html.dsl +PUBLIC "-//SGMLtools//DOCUMENT Docbook Style Sheet for Print//EN" print.dsl +PUBLIC "-//SGMLtools//DOCUMENT Docbook Style Sheet for Lynx Text//EN" ascii-lynx.dsl +PUBLIC "-//SGMLtools//DOCUMENT Docbook Style Sheet for w3m Text//EN" ascii-w3m.dsl + + -- -- + -- Conversion stylesheet -- + -- -- +PUBLIC "-//SGMLtools//DOCUMENT Linuxdoc Style Sheet for Docbook//EN" ld2db.dsl + diff --git a/gnu/dist/sgmltools-lite/dtd/catalog b/gnu/dist/sgmltools-lite/dtd/catalog new file mode 100644 index 00000000..c8361a67 --- /dev/null +++ b/gnu/dist/sgmltools-lite/dtd/catalog @@ -0,0 +1,20 @@ +-- ==================================================== -- +-- $Id: catalog,v 1.1 2000/03/24 09:16:45 cdegroot Exp $ -- + +-- This is the catalog for the old linuxdoc DTD, which -- +-- is included for conversion purposes only. -- + + +-- Linuxdoc96.dtd, frozen orignal Linuxdoc DTD -- +DOCTYPE "LINUXDOC" "linuxdoc96.dtd" +PUBLIC "-//LinuxDoc//DTD LinuxDoc 96//EN" linuxdoc96.dtd + +-- Linuxdoc97 Strict DTD -- +PUBLIC "-//LinuxDoc//DTD LinuxDoc 97//EN" linuxdoc97.dtd + +-- outdated and shared entities -- +ENTITY %common "common" +ENTITY %isoent "isoent" + +ENTITY %deprec96 "deprec96" + diff --git a/gnu/dist/sgmltools-lite/dtd/common b/gnu/dist/sgmltools-lite/dtd/common new file mode 100644 index 00000000..e4a2b114 --- /dev/null +++ b/gnu/dist/sgmltools-lite/dtd/common @@ -0,0 +1,98 @@ +<!-- This is a DTD, but will be read as -*- sgml -*- --> +<!-- ================================================= --> +<!-- $Id: common,v 1.1 2000/03/24 09:16:45 cdegroot Exp $ + + This is COMMON ENTITY for SGML-Tools. + + The definitions herein are used by both + LINUXDOC97 Strict DTD and SGMLTOOL DTD. + + Initial revision May 16, 1997, by B. Kreimeier + + &Log:$ + + --> +<!-- ================================================= --> +<!-- Revision Comments --> + +<!-- BK/97/05/16: created from linuxdoc97.dtd --> +<!-- BK/97/07/17: Moved <descrip> to linuxdoc97.dtd. --> +<!-- BK/97/05/18: removed quote and code back from + "common", as I want to modify them (caption) --> +<!-- ================================================= --> + + + + + +<!-- ================================================= --> +<!-- TITLE, TITLEPAGE --> +<!-- MDW: hacked, abstract now part of titlepag --> +<!-- ================================================= --> + +<!element titlepag o o (title, author, date?, abstract?)> +<!element title - o (%inline) > + +<!usemap oneline titlepag> + +<!element author - o + (name, (and, name )*)> + +<!element name o o (%inline) > +<!element and - o empty> +<!element date - o (#pcdata) > + + +<!element abstract - o (%inline)> +<!usemap oneline abstract> + +<!element toc - o empty> + +<!-- ================================================= --> +<!-- SECTion - section hierarchy --> +<!-- ================================================= --> + +<!element header - - (lhead, rhead) > +<!element lhead - o (%inline)> +<!element rhead - o (%inline)> + +<!entity % sect "heading, header?, p* " > + +<!element heading o o (%inline)> +<!element sect - o (%sect, sect1*)> +<!element sect1 - o (%sect, sect2*)> +<!element sect2 - o (%sect, sect3*)> +<!element sect3 - o (%sect, sect4*)> +<!element sect4 - o (%sect)> + +<!usemap oneline (sect,sect1,sect2,sect3,sect4)> + +<!-- ================================================= --> +<!-- LIST elements --> +<!-- Group of all list elements, except descrip --> +<!-- ================================================= --> + +<!element itemize - - (item+)> +<!element enum - - (item+)> +<!element item o o ((%inline; | %sectpar;)*, p*) > + +<!usemap global (itemize,enum)> + + + +<!-- ================================================= --> +<!-- P - paragraph, smallest block of text --> +<!-- ================================================= --> + +<!element p o o (( %inline | %sectpar )+) > +<!usemap pmap p> + + + +<!-- ================================================= --> +<!-- end of COMMON ENTITY --> +<!-- + Local Variables: + mode: sgml + End: --> +<!-- ================================================= -->
\ No newline at end of file diff --git a/gnu/dist/sgmltools-lite/dtd/deprec96 b/gnu/dist/sgmltools-lite/dtd/deprec96 new file mode 100644 index 00000000..3416c516 --- /dev/null +++ b/gnu/dist/sgmltools-lite/dtd/deprec96 @@ -0,0 +1,22 @@ + +<!-- ================================================= --> +<!-- Former verbose environments: tscreen, verb. --> +<!-- BK: a redundant, confusing mess? --> +<!-- ================================================= --> + +<!element verb - - rcdata> +<!element tscreen - - ((%inline; | %sectpar;)*, p*)+ > + + +<!-- ================================================= --> +<!-- FONT ELEMENTS for highlighting --> +<!-- BK: deprecated, + but unfortunately part of Linuxdoc --> +<!-- ================================================= --> + +<!element em - - (%inline)> +<!element bf - - (%inline)> + +<!element tt - - (%inline)> + +<!usemap ttmap tt> diff --git a/gnu/dist/sgmltools-lite/dtd/isoent b/gnu/dist/sgmltools-lite/dtd/isoent new file mode 100644 index 00000000..05fd19c9 --- /dev/null +++ b/gnu/dist/sgmltools-lite/dtd/isoent @@ -0,0 +1,61 @@ +<!-- This is a DTD, but will be read as -*- sgml -*- --> +<!-- ================================================= --> +<!-- $Id: isoent,v 1.1 2000/03/24 09:16:45 cdegroot Exp $ + + This is dtd/isoent for SGML-Tools. + + Initial revision June 23st, 1997, by B. Kreimeier + + $Log: isoent,v $ + Revision 1.1 2000/03/24 09:16:45 cdegroot + * Import from SGML-tools 2.0.2. + + Revision 1.1 1998/06/26 21:12:10 cg + * Add linuxdoc->docbook conversion DSL by Charlie Bozeman. (CdG) + + Revision 1.1 1997/07/09 13:27:16 cg + * Completely new DTD setup by Bernd (BK). + + + --> +<!-- ================================================= --> +<!-- Revision Comments --> +<!-- BK/97/06/22: installed 0.99.12, applied changes + made for new entity mapping. --> +<!-- ================================================= --> + + +<!-- ================================================= --> +<!-- ISO entities --> +<!-- ================================================= --> + + +<!ENTITY % ISOdia PUBLIC + "ISO 8879:1986//ENTITIES Diacritical Marks//EN"> +%ISOdia; + +<!ENTITY % ISOgrk3 PUBLIC + "ISO 8879:1986//ENTITIES Greek Symbols//EN"> +%ISOgrk3; + +<!ENTITY % ISOlat1 PUBLIC + "ISO 8879:1986//ENTITIES Added Latin 1//EN"> +%ISOlat1; + +<!ENTITY % ISOnum PUBLIC + "ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN"> +%ISOnum; + +<!ENTITY % ISOpub PUBLIC + "ISO 8879:1986//ENTITIES Publishing//EN"> +%ISOpub; + + + +<!-- ================================================= --> +<!-- end of dtd/isoent --> +<!-- + Local Variables: + mode: sgml + End: --> +<!-- ================================================= -->
\ No newline at end of file diff --git a/gnu/dist/sgmltools-lite/dtd/linuxdoc96.dtd b/gnu/dist/sgmltools-lite/dtd/linuxdoc96.dtd new file mode 100644 index 00000000..f02d086a --- /dev/null +++ b/gnu/dist/sgmltools-lite/dtd/linuxdoc96.dtd @@ -0,0 +1,642 @@ +<!-- This is a DTD, but will be read as -*- sgml -*- --> +<!-- ================================================= --> +<!-- $Id: linuxdoc96.dtd,v 1.1 2000/03/24 09:16:45 cdegroot Exp $ + + This is LINUXDOC96 DTD for SGML-Tools. + + This was LINUXDOC.DTD, + a hacked version of QWERTZ.DTD v1.3 by Matt Welsh, + Greg Hankins, Eric Raymond, Marc Baudoin and + Tristan Debeaupuis; modified from QWERTZ.DTD by + Tom Gordon. + + $Log: linuxdoc96.dtd,v $ + Revision 1.1 2000/03/24 09:16:45 cdegroot + * Import from SGML-tools 2.0.2. + + Revision 1.1 1998/06/26 21:12:11 cg + * Add linuxdoc->docbook conversion DSL by Charlie Bozeman. (CdG) + + Revision 1.8 1998/06/26 19:41:11 cg + * Add (La)TeX logos. (NJ) + + Revision 1.7 1998/03/22 10:39:08 cg + * Corrected "isoent" entity reference in DTD. (CdG) + + Revision 1.6 1998/01/08 19:48:20 cg + * Added "invisible" index tags <nidx> and <ncdx>. (SM/CdG) + + Revision 1.5 1997/11/23 21:04:37 cg + * Added <file> tag to all DTDs and documented it (ESR) + + * Added <idx> and <cdx> to linuxdoc97 and sgmltool DTDs (ESR) + + * Arrange for <htmlurl> to call \url in the LaTeX back end (ESR) + + Revision 1.4 1997/11/21 22:58:13 cg + * Allow [ and ] to be used inside <tag></tag>. (ESR) + + Revision 1.3 1997/11/12 21:47:24 cg + * Manually modified the Log entry in linuxdoc96.dtd. It contained SGML + comments, and nested comments won't go... (CdG) + + Revision 1.2 1997/11/11 20:50:22 cg + * First pass at conditionals. This version is implemented with magic comments + <!- if -> and <!- unless ->. (ESR) + + * The generic options processing now includes the -D option to pass in an + attribute/value pair for conditionals. This meant the -D option in + sgml2html had to be changed, it's now -h. (ESR) + + Revision 1.1 1997/07/09 13:27:19 cg + * Completely new DTD setup by Bernd (BK). + + + --> +<!-- ================================================= --> +<!-- Revision Comments --> + +<!-- ESR/97/11/17: Added file tag. --> +<!-- ESR/97/11/11: Removed the crude and undocumented + conditionalization features in this DTD. They + weren't in the original linuxdoc 1.3 DTD, and are + superseded by the new if/unless facility. --> +<!-- BK/97/05/09: this is the original Linuxdoc DTD, + as of SGML Tools 0.99.0. It is not longer + supported. Use only if in dire need, for backwards + compabitlity. Backend support for undocumented + QWERTZ leftovers not in the strict Linuxdoc DTD's + is not guaranteed. --> +<!-- BK/97/06/06: finally applied changes proposed by + Ken MacLeod to dtd/catalog (PUBLIC). Removed + the duplicated linuxdoc96 element name. --> +<!-- BK/97/06/22: replaced entire content with DTD + from 0.99.12 release - I am not going to maintain + any changes to this, just replacing. --> +<!-- ================================================= --> + +<!entity % emph + " em|it|bf|sf|sl|tt|cparam " > + +<!entity % index "idx|cdx|nidx|ncdx" > + +<!-- url added by HG; htmlurl added by esr --> +<!entity % xref + " label|ref|pageref|cite|url|htmlurl|ncite " > + +<!entity % inline + " (#pcdata | f| x| %emph; |sq| %xref | %index | file )* " > + +<!entity % list + " list | itemize | enum | descrip " > + +<!entity % par + " %list; | comment | lq | quote | tscreen " > + +<!entity % mathpar " dm | eq " > + +<!entity % thrm + " def | prop | lemma | coroll | proof | theorem " > + +<!entity % litprog " code | verb " > + +<!entity % sectpar + " %par; | figure | tabular | table | %mathpar; | + %thrm; | %litprog; "> +<!element linuxdoc o o + (sect | chapt | article | report | + book | letter | telefax | slides | notes | manpage ) > + +<!-- `general' entity replaced with ISO entities - kwm --> +<!entity % isoent system "isoent"> +%isoent; + +<!entity urlnam sdata "urlnam" > +<!entity refnam sdata "refnam" > +<!entity tex sdata "[tex ]" > +<!entity latex sdata "[latex ]" > +<!entity latexe sdata "[latexe]" > +<!entity tm sdata "[trade ]" > +<!entity dquot sdata "[quot ]" > +<!entity ero sdata "[amp ]" > +<!entity etago '</' > +<!entity Ae 'Ä' > +<!entity ae 'ä' > +<!entity Oe 'Ö' > +<!entity oe 'ö' > +<!entity Ue 'Ü' > +<!entity ue 'ü' > +<!entity sz 'ß' > +<!element p o o (( %inline | %sectpar )+) +(newline) > +<!entity ptag '<p>' > +<!entity psplit '</p><p>' > + +<!shortref pmap + "&#RS;B" null + "&#RS;B&#RE;" psplit + "&#RS;&#RE;" psplit +-- '"' qtag -- + "[" lsqb + "~" nbsp + "_" lowbar + "#" num + "%" percnt + "^" circ + "{" lcub + "}" rcub + "|" verbar > + +<!usemap pmap p> +<!element em - - (%inline)> +<!element bf - - (%inline)> +<!element it - - (%inline)> +<!element sf - - (%inline)> +<!element sl - - (%inline)> +<!element tt - - (%inline)> +<!element sq - - (%inline)> +<!element cparam - - (%inline)> + +<!entity ftag '<f>' -- formula begin -- > +<!entity qendtag '</sq>'> + +<!shortref sqmap + "&#RS;B" null +-- '"' qendtag -- + "[" lsqb + "~" nbsp + "_" lowbar + "#" num + "%" percnt + "^" circ + "{" lcub + "}" rcub + "|" verbar > + +<!usemap sqmap sq > + +<!element lq - - (p*)> +<!element quote - - ((%inline; | %sectpar;)*, p*)+ > +<!element tscreen - - ((%inline; | %sectpar;)*, p*)+ > +<!element itemize - - (item+)> +<!element enum - - (item+)> +<!element list - - (item+)> + +<!-- What a mess. The following is here to clean up problems with + paragraph breaks in a descrip. I can think of cases where this might + break, but it seems to work. mdw --> + +<!shortref desmap + "&#RS;B" null + "&#RS;B&#RE;" ptag + "&#RS;&#RE;" ptag + "~" nbsp + "_" lowbar + "#" num + "%" percnt + "^" circ + "[" lsqb + "]" rsqb + "{" lcub + "}" rcub + "|" verbar > + +<!element descrip - - (tag?, p+)+ > +<!usemap desmap descrip> + +<!element item o o ((%inline; | %sectpar;)*, p*) > + +<!element tag - o (%inline)> +<!usemap desmap tag> + +<!usemap global (list,itemize,enum)> +<!entity space " "> +<!entity null ""> + +<!-- +<!shortref bodymap + "&#RS;B&#RE;" ptag + "&#RS;&#RE;" ptag + '"' qtag + "[" lsqb + "~" nbsp + "_" lowbar + "#" num + "%" percnt + "^" circ + "{" lcub + "}" rcub + "|" verbar> +--> + +<!element figure - - ((eps | ph ), img*, caption?)> +<!attlist figure + loc cdata "tbp" + caption cdata "Caption"> + +<!-- eps attributes added by mb and td --> +<!element eps - o empty > +<!attlist eps + file cdata #required + height cdata "5cm" + angle cdata "0"> + +<!element ph - o empty > +<!attlist ph + vspace cdata #required> + +<!element img - o empty> +<!attlist img + src cdata #required> + +<!element caption - o (%inline)> + +<!shortref oneline + "B&#RE;" space + "&#RS;&#RE;" null + "&#RS;B&#RE;" null +-- '"' qtag -- + "[" ftag + "~" nbsp + "_" lowbar + "#" num + "%" percnt + "^" circ + "{" lcub + "}" rcub + "|" verbar> + +<!usemap oneline tag> +<!usemap oneline caption> + +<!entity % tabrow "(%inline, (colsep, %inline)*)" > +<!element tabular - - + (hline?, %tabrow, (rowsep, hline?, %tabrow)*, caption?) > + +<!attlist tabular + ca cdata #required> + +<!element rowsep - o empty> +<!element colsep - o empty> +<!element hline - o empty> + +<!entity rowsep "<rowsep>"> +<!entity colsep "<colsep>"> + +<!shortref tabmap + "&#RE;" null + "&#RS;&#RE;" null + "&#RS;B&#RE;" null + "&#RS;B" null + "B&#RE;" null + "BB" space + "@" rowsep + "|" colsep + "[" ftag +-- '"' qtag -- + "_" thinsp + "~" nbsp + "#" num + "%" percnt + "^" circ + "{" lcub + "}" rcub > + +<!usemap tabmap tabular> +<!element table - - (tabular, caption?) > +<!attlist table + loc cdata "tbp"> + +<!element code - - rcdata> +<!element verb - - rcdata> + +<!shortref ttmap -- also on one-line -- + "B&#RE;" space + "&#RS;&#RE;" null + "&#RS;B&#RE;" null + "&#RS;B" null + '#' num + '%' percnt + '~' tilde + '_' lowbar + '^' circ + '{' lcub + '}' rcub + '|' verbar > + +<!usemap ttmap tt> +<!element mc - - cdata > +<!entity % sppos "tu" > +<!entity % fcs "%sppos;|phr" > +<!entity % fcstxt "#pcdata|mc|%fcs;" > +<!entity % fscs "rf|v|fi" > +<!entity % limits "pr|in|sum" > +<!entity % fbu "fr|lim|ar|root" > +<!entity % fph "unl|ovl|sup|inf" > +<!entity % fbutxt "(%fbu;) | (%limits;) | + (%fcstxt;)|(%fscs;)|(%fph;)" > +<!entity % fphtxt "p|#pcdata" > +<!element f - - ((%fbutxt;)*) > + +<!entity fendtag '</f>' -- formula end -- > + +<!shortref fmap + "&#RS;B" null + "&#RS;B&#RE;" null + "&#RS;&#RE;" null + "_" thinsp + "~" nbsp + "]" rsqb + "#" num + "%" percnt + "^" circ + "{" lcub + "}" rcub + "|" verbar> + +<!usemap fmap f > + +<!element dm - - ((%fbutxt;)*)> +<!element eq - - ((%fbutxt;)*)> + +<!shortref dmmap + "&#RE;" space + "_" thinsp + "~" nbsp + "]" rsqb + "#" num + "%" percnt + "^" circ + "{" lcub + "}" rcub + "|" verbar> + +<!usemap dmmap (dm,eq)> +<!element fr - - (nu,de) > +<!element nu o o ((%fbutxt;)*) > +<!element de o o ((%fbutxt;)*) > +<!element ll o o ((%fbutxt;)*) > +<!element ul o o ((%fbutxt;)*) > +<!element opd - o ((%fbutxt;)*) > +<!element pr - - (ll,ul,opd?) > +<!element in - - (ll,ul,opd?) > +<!element sum - - (ll,ul,opd?) > +<!element lim - - (op,ll,ul,opd?) > +<!element op o o (%fcstxt;|rf|%fph;) -(tu) > +<!element root - - ((%fbutxt;)*) > +<!attlist root + n cdata ""> +<!element col o o ((%fbutxt;)*) > +<!element row o o (col, (arc, col)*) > + +<!element ar - - (row, (arr, row)*) > +<!attlist ar + ca cdata #required > +<!element arr - o empty > +<!element arc - o empty > +<!entity arr "<arr>" > +<!entity arc "<arc>" > + +<!shortref arrmap + "&#RE;" space + "@" arr + "|" arc + "_" thinsp + "~" nbsp + "#" num + "%" percnt + "^" circ + "{" lcub + "}" rcub > + +<!usemap arrmap ar > +<!element sup - - ((%fbutxt;)*) -(tu) > +<!element inf - - ((%fbutxt;)*) -(tu) > +<!element unl - - ((%fbutxt;)*) > +<!element ovl - - ((%fbutxt;)*) > +<!element rf - o (#pcdata) > +<!element phr - o ((%fphtxt;)*) > +<!element v - o ((%fcstxt;)*) + -(tu|%limits;|%fbu;|%fph;) > +<!element fi - o (#pcdata) > +<!element tu - o empty > + +<!usemap global (rf,phr)> +<!element def - - (thtag?, p+) > +<!element prop - - (thtag?, p+) > +<!element lemma - - (thtag?, p+) > +<!element coroll - - (thtag?, p+) > +<!element proof - - (p+) > +<!element theorem - - (thtag?, p+) > +<!element thtag - - (%inline)> + +<!usemap global (def,prop,lemma,coroll,proof,theorem)> +<!usemap oneline thtag> +<!entity qtag '<sq>' > + +<!shortref global + "&#RS;B" null -- delete leading blanks -- + -- '"' qtag -- + "[" ftag + "~" nbsp + "_" lowbar + "#" num + "%" percnt + "^" circ + "{" lcub + "}" rcub + "|" verbar> + +<!usemap global linuxdoc> +<!element label - o empty> +<!attlist label id cdata #required> + +<!-- ref modified to have an optional name field HG --> +<!element ref - o empty> +<!attlist ref + id cdata #required + name cdata "&refnam"> + +<!-- url entity added to have direct url references HG --> +<!element url - o empty> +<!attlist url + url cdata #required + name cdata "&urlnam" > + +<!-- htmlurl entity added to have quieter url references esr --> +<!element htmlurl - o empty> +<!attlist htmlurl + url cdata #required + name cdata "&urlnam" > + +<!element pageref - o empty> +<!attlist pageref + id cdata #required> +<!element comment - - (%inline)> +<!element x - - ((#pcdata | mc)*) > +<!usemap #empty x > + +<!-- Hacked by mdw to exclude abstract; abstract now part of titlepag --> +<!element article - - + (titlepag, header?, + toc?, lof?, lot?, p*, sect*, + (appendix, sect+)?, biblio?) +(footnote)> + +<!attlist article + opts cdata "null"> + +<!-- Hacked by mdw to exclude abstract; abstract now part of titlepag --> +<!element report - - + (titlepag, header?, toc?, lof?, lot?, p*, + chapt*, (appendix, chapt+)?, biblio?) +(footnote)> + +<!attlist report + opts cdata "null"> +<!element book - - + (titlepag, header?, toc?, lof?, lot?, p*, chapt*, + (appendix, chapt+)?, biblio?) +(footnote) > + +<!attlist book + opts cdata "null"> + +<!-- Hacked by mdw, abstract now part of titlepag --> +<!element titlepag o o (title, author, date?, abstract?)> +<!element title - o (%inline, subtitle?) +(newline)> +<!element subtitle - o (%inline)> +<!usemap oneline titlepag> +<!element author - o (name, thanks?, inst?, + (and, name, thanks?, inst?)*)> +<!element name o o (%inline) +(newline)> +<!element and - o empty> +<!element thanks - o (%inline)> +<!element inst - o (%inline) +(newline)> +<!element date - o (#pcdata) > + +<!usemap global thanks> + +<!element newline - o empty > +<!entity nl "<newline>"> + +<!-- Hacked by mdw --> +<!element abstract - o (%inline)> +<!usemap oneline abstract> + + +<!element toc - o empty> +<!element lof - o empty> +<!element lot - o empty> +<!element header - - (lhead, rhead) > +<!element lhead - o (%inline)> +<!element rhead - o (%inline)> +<!entity % sect "heading, header?, p* " > +<!element heading o o (%inline)> +<!element chapt - o (%sect, sect*) +(footnote)> +<!element sect - o (%sect, sect1*) +(footnote)> +<!element sect1 - o (%sect, sect2*)> +<!element sect2 - o (%sect, sect3*)> +<!element sect3 - o (%sect, sect4*)> +<!element sect4 - o (%sect)> +<!usemap oneline (chapt,sect,sect1,sect2,sect3,sect4)> +<!element appendix - o empty > +<!element footnote - - (%inline)> +<!usemap global footnote> +<!element cite - o empty> +<!attlist cite + id cdata #required> + +<!element ncite - o empty> +<!attlist ncite + id cdata #required + note cdata #required> + +<!element file - - (#pcdata)> + +<!element idx - - (#pcdata)> +<!element cdx - - (#pcdata)> +<!element nidx - - (#pcdata)> +<!element ncdx - - (#pcdata)> + +<!element biblio - o empty> +<!attlist biblio + style cdata "linuxdoc" + files cdata ""> +<!element slides - - (slide*) > + +<!attlist slides + opts cdata "null"> +<!element slide - o (title?, p+) > +<!entity % addr "(address?, email?, phone?, fax?)" > + +<!element letter - - + (from, %addr, to, %addr, cc?, subject?, sref?, rref?, + rdate?, opening, p+, closing, encl?, ps?)> + +<!attlist letter + opts cdata "null"> + +<!element from - o (#pcdata) > +<!element to - o (#pcdata) > + +<!usemap oneline (from,to)> + +<!element address - o (#pcdata) +(newline) > +<!element email - o (#pcdata) > +<!element phone - o (#pcdata) > +<!element fax - o (#pcdata) > + +<!element subject - o (%inline;) > +<!element sref - o (#pcdata) > +<!element rref - o (#pcdata) > +<!element rdate - o (#pcdata) > + +<!element opening - o (%inline;) > +<!usemap oneline opening> + +<!element closing - o (%inline;) > +<!element cc - o (%inline;) +(newline) > +<!element encl - o (%inline;) +(newline) > + +<!element ps - o (p+) > + +<!element telefax - - + (from, %addr, to, address, email?, + phone?, fax, cc?, subject?, + opening, p+, closing, ps?)> + +<!attlist telefax + opts cdata "null" + length cdata "2"> + +<!element notes - - (title?, p+) > +<!attlist notes + opts cdata "null" > +<!element manpage - - (sect1*) + -(sect2 | f | %mathpar | figure | tabular | + table | %xref | %thrm )> + + +<!attlist manpage + opts cdata "null" + title cdata "" + sectnum cdata "1" > +<!shortref manpage + "&#RS;B" null +-- '"' qtag -- + "[" ftag + "~" nbsp + "_" lowbar + "#" num + "%" percnt + "^" circ + "{" lcub + "}" rcub + "|" verbar> + +<!usemap manpage manpage > + +<!-- ================================================= --> +<!-- end of LINUXDOC DTD --> +<!-- + Local Variables: + mode: sgml + End: --> +<!-- ================================================= --> diff --git a/gnu/dist/sgmltools-lite/dtd/linuxdoc97.dtd b/gnu/dist/sgmltools-lite/dtd/linuxdoc97.dtd new file mode 100644 index 00000000..353d41f2 --- /dev/null +++ b/gnu/dist/sgmltools-lite/dtd/linuxdoc97.dtd @@ -0,0 +1,360 @@ +<!-- This is a DTD, but will be read as -*- sgml -*- --> +<!-- ================================================= --> +<!-- $Id: linuxdoc97.dtd,v 1.1 2000/03/24 09:16:45 cdegroot Exp $ + + This is LINUXDOC97 STRICT DTD for SGML-Tools. + + It is based on the original LINUXDOC DTD, which + was in turn derived from QWERTZ DTD. + Look at those DTD's for the respective authors + and revision history. + + Initial revision May 1st, 1997, by B. Kreimeier + + $Log: linuxdoc97.dtd,v $ + Revision 1.1 2000/03/24 09:16:45 cdegroot + * Import from SGML-tools 2.0.2. + + Revision 1.1 1998/06/26 21:12:12 cg + * Add linuxdoc->docbook conversion DSL by Charlie Bozeman. (CdG) + + Revision 1.5 1998/06/26 19:41:11 cg + * Add (La)TeX logos. (NJ) + + Revision 1.4 1998/03/22 10:39:09 cg + * Corrected "isoent" entity reference in DTD. (CdG) + + Revision 1.3 1997/11/27 21:07:41 cg + * Fix comment buglet. (CdG) + + Revision 1.2 1997/11/23 21:04:38 cg + * Added <file> tag to all DTDs and documented it (ESR) + + * Added <idx> and <cdx> to linuxdoc97 and sgmltool DTDs (ESR) + + * Arrange for <htmlurl> to call \url in the LaTeX back end (ESR) + + Revision 1.1 1997/07/09 13:27:21 cg + * Completely new DTD setup by Bernd (BK). + + + --> +<!-- ================================================= --> +<!-- Revision Comments --> + +<!-- ESR/97/11/17: Added file, idx, cdx tags. --> +<!-- BK/97/05/01: I removed all elements not used in + guide.sgml and example.sgml. I removed newline, + was used once in guide, but not documented. + Removed sl,sf,it, these were mentioned in example, + but use was discouraged in guide. Removed everal + occurences of qtag and qendtag that have been + commented out earlier on. --> +<!-- BK/97/05/16: removed font highlighting, + these are now in the system entity "deprecated96" --> +<!-- BK/97/05/18: moved quote and code back from + "common", as I want to modify them (caption) --> +<!-- BK/97/06/06: finally applied changes proposed by + Ken MacLeod to dtd/catalog (PUBLIC). Changed + the linuxdoc97 element name to linuxdoc. --> +<!-- BK/97/06/22: installed 0.99.12, applied changes + made for new entity mapping. --> +<!-- ================================================= --> + + + +<!-- ================================================= --> +<!-- Contents: + - general purpose character definitions + - usemap shortrefs + - parameter/group entities + - top-down list of elements --> +<!-- ================================================= --> + + +<!-- ================================================= --> +<!-- GENERAL PURPOSE CHARACTER definitions --> +<!-- BK: general was included for refnam/urlnam. + Is this really the right way to do it? --> +<!-- KWM: `general' entity replaced with ISO entities --> +<!-- ================================================= --> + + +<!-- `general' entity replaced with ISO entities - kwm --> +<!entity % isoent system "isoent"> +%isoent; + +<!entity urlnam sdata "urlnam" > +<!entity refnam sdata "refnam" > + +<!entity tex sdata "[tex ]" > +<!entity latex sdata "[latex ]" > +<!entity latexe sdata "[latexe]" > +<!entity tm sdata "[trade ]" > +<!entity dquot sdata "[quot ]" > +<!entity ero sdata "[amp ]" > +<!entity etago '</' > + +<!entity Ae 'Ä' > +<!entity ae 'ä' > +<!entity Oe 'Ö' > +<!entity oe 'ö' > +<!entity Ue 'Ü' > +<!entity ue 'ü' > +<!entity sz 'ß' > + + +<!entity space " "> +<!entity null ""> +<!-- entity ptag '<p>' --> +<!-- entity psplit '</p><p>' --> + + +<!-- ================================================= --> +<!-- SHORTREF maps --> +<!-- Referenced in "usemap" statements --> +<!-- BK: are some of these redundant? --> +<!-- ================================================= --> + + +<!shortref global + "&#RS;B" null -- delete leading blanks --> + + +<!shortref oneline + "B&#RE;" space + "&#RS;&#RE;" null + "&#RS;B&#RE;" null > + + +<!shortref ttmap -- also on one-line -- + "B&#RE;" space + "&#RS;&#RE;" null + "&#RS;B&#RE;" null + "&#RS;B" null > + + +<!-- MDW: What a mess. + The following desmap is here to clean up problems + with paragraph breaks in a descrip. + I can think of cases where this might break, + but it seems to work. --> + +<!shortref desmap + "&#RS;B" null + -- "&#RS;B&#RE;" ptag + "&#RS;&#RE;" ptag -- > + + +<!shortref pmap + "&#RS;B" null + -- "&#RS;B&#RE;" psplit + "&#RS;&#RE;" psplit --> + + + + + +<!-- ================================================= --> +<!-- PARAMETER or group ENTITIES --> +<!-- SGML requires us to set up the parameter entities + referenced in elements first. --> +<!-- ================================================= --> + + + +<!-- ================================================= --> +<!-- HIGHLIGHTING --> +<!-- Group of all highlighting elements. --> +<!-- The actual elements have to be defined below, + as the inline entity is referenced there. --> +<!-- BK: deprecated, + but unfortunately part of Linuxdoc --> +<!-- ================================================= --> + +<!entity % emph + " em | bf | tt " > + +<!-- ================================================= --> +<!-- INDEXING --> +<!-- All elements having to do with generating indices --> +<!-- ================================================= --> + +<!entity % index "idx|cdx" > + +<!element idx - - (#pcdata)> +<!element cdx - - (#pcdata)> + +<!-- ================================================= --> +<!-- XREF --> +<!-- Group of references of all kind --> +<!-- HG: url added --> +<!-- ESR: htmlurl added --> +<!-- BK: the Label/Ref pair is conceptually different, + perhaps it should be treated differently? --> +<!-- ================================================= --> + +<!entity % xref + " label|ref|url|htmlurl " > + +<!-- ================================================= --> +<!-- LISTS - itemize, enum, descrip --> +<!-- Group of all list elements --> +<!-- BK: the descrip glossary is conceptually + different, perhaps it should be treated + differently? --> +<!-- ================================================= --> + +<!entity % list + " itemize | enum | descrip " > + +<!-- ================================================= --> +<!-- PARagraph --> +<!-- Group of all elements that are text blocks --> +<!-- Includes literal programming and figures. --> +<!-- ================================================= --> + +<!entity % par + " %list; | quote | tscreen " > + +<!entity % litprog + " code | verb " > + +<!entity % sectpar + " %par; | figure | %litprog; "> + +<!-- ================================================= --> +<!-- INLINE - all simple text --> +<!-- ================================================= --> + +<!entity % inline + " (#pcdata | %emph; | %xref | %index | file )* " > + + +<!-- ================================================= --> +<!-- TOP-DOWN (more or less) ELEMENTS --> +<!-- This section gives the actual structure + of the document. --> +<!-- ================================================= --> + + + +<!-- ================================================= --> +<!-- LINUXDOC - top level definition --> +<!-- ================================================= --> + +<!-- BK: forced article. sect does not work, removed. --> +<!element linuxdoc o o ( article ) > +<!usemap global linuxdoc> + + + +<!-- ================================================= --> +<!-- ARTICLE --> +<!-- MDW: hacked, abstract now part of titlepag --> +<!-- ================================================= --> + +<!element article - - + (titlepag, header?, toc?, p*, sect* ) > + +<!attlist article + opts cdata "null"> + +<!-- ================================================= --> +<!-- COMMON definitions. --> +<!-- These are used by multiple DTD's. --> +<!-- ================================================= --> + +<!entity % common system + -- definitions common to SGML Tools --> +%common; + + +<!-- ================================================= --> +<!-- LIST - descrip and tag element --> +<!-- BK: it seems that using the item element here + would be straightforward (empty entries, + paragraph handling), at the prize of loosing + the shorthand omission --> +<!-- ================================================= --> + +<!element descrip - - (tag?, p+)+ > +<!element tag - o (%inline)> + +<!usemap desmap descrip> +<!usemap oneline tag> + + +<!-- ================================================= --> +<!-- CODE, QUOTE: paragraph elements --> +<!-- ================================================= --> + +<!element quote - - ( quotep ) > + +<!-- quote paragraph only used internally --> +<!element quotep o o ((%inline; | %sectpar;)*, p*)+ > + +<!element code - - rcdata> + +<!-- ================================================= --> +<!-- REFERENCES - cross references --> +<!-- HG: ref modified to have an optional name field --> +<!-- ================================================= --> + +<!-- REF needed to state destination --> +<!element ref - o empty> +<!attlist ref + id cdata #required + name cdata "&refnam"> + +<!-- LABEL needed to mark destination --> +<!element label - o empty> +<!attlist label id cdata #required> + + +<!-- ================================================= --> +<!-- REFERENCES - URL links --> +<!-- HG: url entity added + to have direct url references --> +<!-- ESR: htmlurl entity added + to have quieter url references --> +<!-- BK: the htmlurl/url elements seem to confuse + annotated bookmark vs. direct hidden link? --> +<!-- ================================================= --> + +<!element url - o empty> +<!attlist url + url cdata #required + name cdata "&urlnam" > + +<!element htmlurl - o empty> +<!attlist htmlurl + url cdata #required + name cdata "&urlnam" > + + + +<!-- ================================================= --> +<!-- JUSTIFICATION CONTROL --> +<!-- ================================================= --> + +<!element file - - (#pcdata)> + +<!-- ================================================= --> +<!-- DEPRECATED definitions. --> +<!-- These are deprecated Linuxdoc96 DTD elements, + provided only for backward compatibility. --> +<!-- ================================================= --> + +<!entity % deprec96 system + -- deprecated Linuxdoc96 --> +%deprec96; + + +<!-- ================================================= --> +<!-- end of LINUXDOC STRICT DTD --> +<!-- + Local Variables: + mode: sgml + End: --> +<!-- ================================================= --> diff --git a/gnu/dist/sgmltools-lite/index.html b/gnu/dist/sgmltools-lite/index.html new file mode 100644 index 00000000..c88bce8c --- /dev/null +++ b/gnu/dist/sgmltools-lite/index.html @@ -0,0 +1,35 @@ +<!-- + $Id: index.html,v 1.1 2000/03/24 09:14:37 cdegroot Exp $ + --> +<HTML> +<HEAD> + <TITLE>SGMLtools/packages/cvs/sgmltools</TITLE> + <LINK rel="stylesheet" href="../../../sgmltools.css" type="text/css"> +</HEAD> +<BODY> +<DIV align="right"><IMG src="../../../images/sgmltools-logo-sm.gif" border=0></DIV> +<H1>SGMLtools Package Directory</H1> +<P>This is the top level of the actual SGMLtools package. SGMLtools, the +package, contains wrapper scripts and DSSSL stylesheets that provide +out-of-the-box DocBook support. This package, normally distributed with +other packages as SGMLtools-x.y.z.tar.gz can also be used stand-alone, +provided the required supporting packages are available.</P> +<HR> +<H1>packages/cvs/sgmltools</H1> +<P>Files in this directory: +<UL> +<LI><A href="aliases">SGML alias file</A>, installed as /etc/sgml/aliases +by default. +</UL> +<P>Subdirectories: +<UL> +<LI><A href="bin">User-callable scripts</A> (sgmltools and buildcat) +<LI><A href="doc">Documentation</A> (empty...) +<LI><A href="dsssl">DSSSL stylesheets</A> +<LI><A href="dtd">DTD's</A> (Linuxdoc DTD's for conversion purposes). +<LI><A href="man">Manual pages</A> +<LI><A href="python">Python modules</A> (This is where you hack SGMLtools + behaviour) +</UL> +</BODY> +</HTML> diff --git a/gnu/dist/sgmltools-lite/install.sh b/gnu/dist/sgmltools-lite/install.sh new file mode 100755 index 00000000..31420aba --- /dev/null +++ b/gnu/dist/sgmltools-lite/install.sh @@ -0,0 +1,236 @@ +#!/bin/sh +# +# install - install a program, script, or datafile +# This comes from X11R5. +# +# $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $ +# +# This script is compatible with the BSD install script, but was written +# from scratch. +# + + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +tranformbasename="" +transform_arg="" +instcmd="$mvprog" +chmodcmd="$chmodprog 0755" +chowncmd="" +chgrpcmd="" +stripcmd="" +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src="" +dst="" +dir_arg="" + +while [ x"$1" != x ]; do + case $1 in + -c) instcmd="$cpprog" + shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + -s) stripcmd="$stripprog" + shift + continue;; + + -t=*) transformarg=`echo $1 | sed 's/-t=//'` + shift + continue;; + + -b=*) transformbasename=`echo $1 | sed 's/-b=//'` + shift + continue;; + + *) if [ x"$src" = x ] + then + src=$1 + else + # this colon is to work around a 386BSD /bin/sh bug + : + dst=$1 + fi + shift + continue;; + esac +done + +if [ x"$src" = x ] +then + echo "install: no input file specified" + exit 1 +else + true +fi + +if [ x"$dir_arg" != x ]; then + dst=$src + src="" + + if [ -d $dst ]; then + instcmd=: + else + instcmd=mkdir + fi +else + +# Waiting for this to be detected by the "$instcmd $src $dsttmp" command +# might cause directories to be created, which would be especially bad +# if $src (and thus $dsttmp) contains '*'. + + if [ -f $src -o -d $src ] + then + true + else + echo "install: $src does not exist" + exit 1 + fi + + if [ x"$dst" = x ] + then + echo "install: no destination specified" + exit 1 + else + true + fi + +# If destination is a directory, append the input filename; if your system +# does not like double slashes in filenames, you may need to add some logic + + if [ -d $dst ] + then + dst="$dst"/`basename $src` + else + true + fi +fi + +## this sed command emulates the dirname command +dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + +# Make sure that the destination directory exists. +# this part is taken from Noah Friedman's mkinstalldirs script + +# Skip lots of stat calls in the usual case. +if [ ! -d "$dstdir" ]; then +defaultIFS=' +' +IFS="${IFS-${defaultIFS}}" + +oIFS="${IFS}" +# Some sh's can't handle IFS=/ for some reason. +IFS='%' +set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` +IFS="${oIFS}" + +pathcomp='' + +while [ $# -ne 0 ] ; do + pathcomp="${pathcomp}${1}" + shift + + if [ ! -d "${pathcomp}" ] ; + then + $mkdirprog "${pathcomp}" + else + true + fi + + pathcomp="${pathcomp}/" +done +fi + +if [ x"$dir_arg" != x ] +then + $doit $instcmd $dst && + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi +else + +# If we're going to rename the final executable, determine the name now. + + if [ x"$transformarg" = x ] + then + dstfile=`basename $dst` + else + dstfile=`basename $dst $transformbasename | + sed $transformarg`$transformbasename + fi + +# don't allow the sed command to completely eliminate the filename + + if [ x"$dstfile" = x ] + then + dstfile=`basename $dst` + else + true + fi + +# Make a temp file name in the proper directory. + + dsttmp=$dstdir/#inst.$$# + +# Move or copy the file name to the temp name + + $doit $instcmd $src $dsttmp && + + trap "rm -f ${dsttmp}" 0 && + +# and set any options; do chmod last to preserve setuid bits + +# If any of these fail, we abort the whole thing. If we want to +# ignore errors from any of these, just make sure not to ignore +# errors from the above "$doit $instcmd $src $dsttmp" command. + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && + +# Now rename the file to the real destination. + + $doit $rmcmd -f $dstdir/$dstfile && + $doit $mvcmd $dsttmp $dstdir/$dstfile + +fi && + + +exit 0 diff --git a/gnu/dist/sgmltools-lite/man/sgmltools-lite.1 b/gnu/dist/sgmltools-lite/man/sgmltools-lite.1 new file mode 100644 index 00000000..bc8bbdac --- /dev/null +++ b/gnu/dist/sgmltools-lite/man/sgmltools-lite.1 @@ -0,0 +1,138 @@ +.\" +.\" sgmltools.1 +.\" +.\" $Id +.\" +.\" Manpage for sgmltools. +.\" +.\" SGMLtools - an SGML toolkit. +.\" Copyright (C) 1998 Cees A. de Groot +.\" +.\" 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. +.\" +.\" 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +.\" +.TH SGMLTOOLS 1 "SGMLtools" " " \" -*- nroff -*- +.SH NAME +sgmltools \- process sgml files. +.SH SYNOPSIS +.B sgmltools +[\-b backend] [\-d] [\-v] [\-V] [\-h] [\-l] [\-s dsssl_spec] [\-j jadeopt] +[\-\-backend={html,ps,dvi,rtf,txt,ld2db,jadetex,pdb,lynx,w3m}] [\-\-debug] +[\-\-verbose] +[\-\-dsssl\-spec=dsssl_spec] [\-\-jade\-opt=jadeopt] +[\-\-version] [\-\-help] [\-\-license] +.SH DESCRIPTION +.B sgmltools +is the central driver of SGMLtools. You can use it to convert SGML input +files to various formats, as indicated by the +.I \-\-backend +switch. +.SS OPTIONS +.TP +.I "\-b, \-\-backend" +Select the backend to use. Currently, there are five different backends to +choose from. +.B ps +expects a DocBook SGML file and will convert it into PostScript. +.B dvi +expects a DocBook SGML file and will convert it into DVI. +.B rtf +expects a DocBook SGML file and will convert it into RTF. +.B html +expects a DocBook SGML file and will convert it into HTML; the resulting +files will be put in a subdirectory (default). +.B txt +expects a DocBook SGML file and will convert it into ASCII. Note that this +backend actually uses the w3m (preferred) or lynx (if w3m not found) backends. +.B ld2db +expects a LinuxDoc-SGML file and will convert it into DocBook SGML. +.B jadetex +expects a DocBook SGML file and will convert it into JadeTeX input. Only +use this if you know what you're doing. +.B pdb +expects a DocBook SGML file and will convert it into the iSilo format used +on Palm devices. +.B w3m +expects a DocBook SGML file and will convert it into ASCII. w3m does a better +job of exporting HTML as ASCII text than Lynx, since w3m understands tables. +One should normally use the txt backend and let sgmltools decide which ASCII +exporter is available. +.B lynx +expects a DocBook SGML file and will convert it into ASCII. One should normally +use the txt backend and let sgmltools decide which ASCII exporter is available. +.TP +.I "\-d, \-\-debug" +Enable debugging. All temporary files will be left as is and possibly extra +information on the processing steps is printed to stderr. +.TP +.I "\-v, \-\-verbose" +Be verbose. Information on commands executed, etcetera, will be printed to +stdout. +.TP +.I "\-s, \-\-dsssl-spec" +Specify the DSSSL stylesheet to apply (see STYLESHEETS, below). +.TP +.I "\-j, \-\-jade-opt" +Pass additional options directly to Jade. +.TP +.I "\-h, \-\-help" +Print a usage message on standard output and exit successfully (tbd). +.TP +.I "\-V, \-\-version" +Print version information on standard output then exit successfully (tbd). +.TP +.I "\-l, \-\-license" +Print license information +.SH STYLESHEETS +The DSSSL specification may be either a filename, a public identifier or +a DSSSL alias (resolved via one of the alias files +.B /etc/sgml/aliases +and +.B ~/.sgmlaliases +to either a filename or a public identifier). +.SH ENVIRONMENT VARIABLES +.TP +.B TMPDIR +Temporary directory. If it is on a local filesystem, a lot of copying will +be avoided. Furthermore, setting this will prevent SGMLtools from using +/tmp and thus will prevent people trying to make use of race conditions. +.TP +.B SGML_CATALOG_FILES +The SGML Open catalog files to use for resolving public identifiers into +system identifiers. +.SH BUGS +This is an early developer release, so don't expect it to behave in any +useful way. It won't make coffee or tea. +.SH SOURCES +.SS +sgmltools-lite +http://sgmltools-lite.sourceforge.net +.SS +w3m +http://ei5nazha.yz.yamagata-u.ac.jp/~aito/w3m/eng +.SS +iSilo Tools +iSilo Palm readers and Linux encoders are available from: +.PP +http://www.isilo.com +.SS +DocBook Documentation +The online version of 'DocBook: The Definitive Guide' can be found at: +.PP +http://www.docbook.org +.SS +OpenJade +http://openjade.sourceforge.net +.SH AUTHOR +Copyright (c)2000, Cees A. de Groot <cg@sgmltools.org>. diff --git a/gnu/dist/sgmltools-lite/python/Backend.py b/gnu/dist/sgmltools-lite/python/Backend.py new file mode 100644 index 00000000..de9e54d2 --- /dev/null +++ b/gnu/dist/sgmltools-lite/python/Backend.py @@ -0,0 +1,136 @@ +# +# Backend.py - Backend interface +# +# $Id: Backend.py,v 1.1 2000/03/24 09:16:45 cdegroot Exp $ +# +# SGMLtools - an SGML toolkit. +# Copyright (C)1998 Cees A. de Groot +# +# 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. +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + +""" + This module defines base classes for backend modules. + Backends need to inherit from this. +""" + +class Backend: + """Base backend class. + + This class is actually a backend _process_, one is instantiated + for every file processed. Therefore, the class may store + information between passes to facilitate work. + """ + + _filename = '' + _fileparts = () + + def __init__(self, filename, fileparts, globs, tracer, autoconf): + """Create a new instance. + + The filename is the file that will be parsed, the globs + argument is a pointer to the BackendGlobals class + associated with this object. Fileparts is a 3-tuple + containing (name, path, extension) + + This base constructor stores the arguments in corresponding + fields (with underscore-prefix). + """ + + self._filename = filename + self._fileparts = fileparts + self._globs = globs + self._tracer = tracer + self._autoconf = autoconf + + def preJade(self, fh): + """Execute actions that need to take place before Jade is invoked. + + This method receives a filehandle that points to the main + input file as indicated on the command line. + + The method should return a filehandle that needs to be + passed as input to Jade (the base implementation simply + returns its input filehandle). + """ + + return fh + + def postJade(self, outfile, stdoutfile): + """Execute actions that need to take place after Jade has run. + + The method receives two filenames: the first is the filename + that was given to Jade as a '-o' parameter, the second is the + filename where stdout was redirected to. + + """ + + pass + + +class BackendGlobals: + """A class containing backend-global stuff. + + This base class will be instantiated exactly once per backend. It + is used to handle and store options, etcetera. + """ + + def getName(self): + """Get the name for this backend. + + This returns the name which can be used on the command + line --backend option to invoke this backend. + """ + + return 'base' + + def getMoreOptions(self): + """Get extra options for this backend. + + This method should return, in the same form as the global + options in utils.py, a list containing any extra options + defined by this backend. Each element contains a tuple + (short, long, helptext) + """ + + return [] + + + def setOptions(self, options): + """Communicate optoins back to the backend. + + This method is called after option processing so that the + backend may do anything it wants with the options as passed + on the command line. + """ + + pass + + def getJadeSettings(self): + """Return stylesheet/backend information for Jade. + + This method returns a tuple containing two elements: + 1. The Jade backend to use for this backend + 2. The stylesheet to use. + """ + + return ('', '') + + def printHelp(self, fh): + """Print help information on the backend.""" + + pass + + diff --git a/gnu/dist/sgmltools-lite/python/SGMLtools.py b/gnu/dist/sgmltools-lite/python/SGMLtools.py new file mode 100644 index 00000000..9c14a8b4 --- /dev/null +++ b/gnu/dist/sgmltools-lite/python/SGMLtools.py @@ -0,0 +1,272 @@ +# +# SGMLtools.py - SGMLtools main routine. +# +# $Id: SGMLtools.py,v 1.4 2000/10/25 06:00:05 cdegroot Exp $ +# +# SGMLtools - an SGML toolkit. +# Copyright (C)1998 Cees A. de Groot +# +# 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. +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + +""" + This module contains the main logic for SGMLtools. It is wrapped + in a class so that once somebody cooks up a use for it, you can + actually have multiple copies active (although we'd need to factor + initialization into repeatable and non-repeatable parts, then). +""" + +import sys, os, glob, imp, getopt +import Backend, utils + +class SGMLtools: + _globals = {} + _classes = {} + _autoconf = {} + + def __init__(self, autoconf): + """Create an SGMLtools object. + + This method hunts for backend modules and does some other + assorted initialization things. The autoconf argument + contains some assorted settings that are passed down from + autoconf. + + """ + + self._autoconf = autoconf + + # + # Expand path + # + sys.path.append(os.path.join(autoconf['shrdir'], 'python')) + sys.path = sys.path + autoconf['backends'] + + # + # Import backends, instantiate a BackendGlobals object for + # each of them, and stash it away. + # + files = [] + for dir in autoconf['backends']: + pattern = os.path.join(dir, '*.py') + files = files + glob.glob(pattern) + for file in files: + name, junk = os.path.splitext(file) + dir, module = os.path.split(name) + cmd = 'from %s import %s, %s' % (module, module, module + 'Globals') + exec cmd + cmd = 'glob = %sGlobals()' % module + exec cmd + self._globals[glob.getName()] = glob + cmd = 'cls = %s' % module + exec cmd + self._classes[glob.getName()] = cls + + # + # Read alias file + # + self._aliases = utils.readAliases(autoconf) + + + # + # Setup SGML environment + # + if not os.environ.has_key('SGML_CATALOG_FILES'): + os.environ['SGML_CATALOG_FILES'] = \ + os.path.join(autoconf['etcdir'], 'catalog') \ + + ":" + "/usr/share/sgml/stylesheets/sgmltools/sgmltools.cat" \ + + ":" + "/usr/share/sgml/CATALOG.docbkdsl" + + + def processOptions(self, args): + """Process command line options. + + Process command line options, dynamically expanding them + based on the --backend option, and returning the list of + files that's left. + """ + + # + # Hunt down the backend option. The first test tests for + # "-b x", the second for "-bx" (or the equivalend long versions). + # + numArgs = len(args) + for i in range(numArgs): + arg = args[i] + if arg in ["-b", "--backend"]: + if i+1 >= numArgs: + raise getopt.error, "option %s requires an argument" % arg + miniargs = [arg, args[i+1]] + break + if arg[:2] == "-b" or arg[:10] == "--backend=": + miniargs = [arg] + break + else: + # + # Default to the HTML backend. + # + miniargs = [ "--backend=onehtml" ]; + + # + # We should have a backend option now. Ask getopt to parse it. Once + # we have it, ask the backend for extra options so we can get + # down to business. + # + opt, junk = getopt.getopt(miniargs, 'b:', ['backend=']) + # + # if opt = 'txt', check for 'w3m' else fallback to 'lynx' + # + if opt[0][1] == "txt": + if not self._autoconf['progs']['w3m'] == 'N/A': + self._curbackend = "w3m" + else: + self._curbackend = "lynx" + else: + self._curbackend = opt[0][1] + + try: + self._curglobal = self._globals[self._curbackend] + except KeyError: + utils.usage(None, "Unknown backend " + self._curbackend) + if not self._globals.has_key(self._curbackend): + utils.usage(None, "Unknown backend " + self._curbackend) + + # + # Merge all the options and parse them. Return whatever is + # left (the list of files we need to run). + # + shortopts, longopts = utils.makeOpts(self._curglobal) + try: + options, retval = getopt.getopt(args, shortopts, longopts) + except getopt.error, e: + utils.usage(self._curglobal, 'Error parsing arguments: ' + `e`) + + self._options = utils.normalizeOpts(self._curglobal, options) + + # + # Check for help/version/... options + # + if utils.findOption(self._options, 'help'): + utils.version(self._autoconf['shrdir']) + print + utils.usage(self._curglobal, None) + if utils.findOption(self._options, 'version'): + utils.version(self._autoconf['shrdir']) + sys.exit(0) + if utils.findOption(self._options, 'license'): + utils.license() + + return retval + + def processFile(self, file): + """Process the indicated file""" + + + # + # Some filename munching so the user can invoke us with our + # without the .sgml/.SGML extension. + # + filepath, filename = os.path.split(file) + filename, fileext = os.path.splitext(filename) + if filepath == '': + filepath = '.' + if os.path.isfile(file): + self._fileinfo = (filename, filepath, fileext) + elif os.path.isfile(os.path.join(filepath, filename + '.sgml')): + self._fileinfo = (filename, filepath, '.sgml') + elif os.path.isfile(os.path.join(filepath, filename + '.SGML')): + self._fileinfo = (filename, filepath, '.SGML') + elif os.path.isfile(os.path.join(filepath, filename)): + self._fileinfo = (filename, filepath, '') + else: + raise IOError, "file %s not found" % file + + self._filename = os.path.join(self._fileinfo[1], + self._fileinfo[0] + self._fileinfo[2]) + + # + # Create a backend instance. + # + if utils.findOption(self._options, 'verbose') != None: + dotrace = 1 + else: + dotrace = 0 + self._tracer = utils.Tracer(dotrace) + be = self._classes[self._curbackend](self._filename, self._fileinfo, + self._curglobal, self._tracer, self._autoconf) + + # + # Make SGML_SEARCH_PATH absolute. + # + savdir = os.getcwd() + os.chdir(filepath) + envname = 'SGML_SEARCH_PATH' + if os.environ.has_key(envname): + os.environ[envname] = os.environ[envname] + ':' + os.getcwd() + else: + os.environ[envname] = os.getcwd() + os.chdir(savdir) + + # + # Get the Jade parameters and see whether the stylesheet was + # overriden. Translate the stylesheet to an absolute filename + # + stylesheet, jadebe = self._curglobal.getJadeSettings() + userSheet = utils.findOption(self._options, 'dsssl-spec') + if userSheet != None: + stylesheet = userSheet + dssslfile = utils.findStylesheet(stylesheet, self._aliases) + addJadeOpt = '' + userJadeOpt = utils.findOption(self._options, 'jade-opt') + if userJadeOpt != None: + addJadeOpt = ' ' + userJadeOpt + + # + # Open the input file and give the pre-Jade routine a shot. + # + infile = open(self._filename, 'r') + nextfile = be.preJade(infile) + + # + # Run Jade attached to a pipe + # + jadecmd = self._autoconf['progs']['jade'] + jadecmd = jadecmd + ' -t ' + jadebe + jadecmd = jadecmd + ' -d ' + dssslfile + jadeoutfile = utils.makeTemp() + jadecmd = jadecmd + ' -o ' + jadeoutfile + jadecmd = jadecmd + addJadeOpt + jadestdoutfile = utils.makeTemp() + jadecmd = jadecmd + ' >' + jadestdoutfile + self._tracer.trace(jadecmd) + jadepipe = os.popen(jadecmd, 'w') + + # + # Pump nextfile->jadepipe, and close all files. + # + jadepipe.writelines(nextfile.readlines()) + try: + jadepipe.close(); + infile.close(); + nextfile.close(); + except: + pass + + # + # Run the postJade stage. + # + be.postJade(jadeoutfile, jadestdoutfile) + + diff --git a/gnu/dist/sgmltools-lite/python/backends/Dvi.py b/gnu/dist/sgmltools-lite/python/backends/Dvi.py new file mode 100644 index 00000000..dc2692d6 --- /dev/null +++ b/gnu/dist/sgmltools-lite/python/backends/Dvi.py @@ -0,0 +1,87 @@ +# +# backends/Dvi.py +# +# $Id: Dvi.py,v 1.2 2000/08/03 12:38:57 cdegroot Exp $ +# +# SGMLtools DVI backend driver. +# +# SGMLtools - an SGML toolkit. +# Copyright (C) 1998 Cees A. de Groot +# +# 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. +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +from Backend import Backend, BackendGlobals +from utils import registerTemp +import os + +class Dvi(Backend): + + def postJade(self, outfile, stdoutfile): + + # + # Looks like that from 1.1.8, jadetex writes output in cwd + # instead of TMPDIR. No matter what jadetex chooses to do, + # this will make sure it lands in TMPDIR. We set TEXINPUTS + # so that included graphics are found. + # + savdir = os.getcwd() + envname = 'TEXINPUTS' + if os.environ.has_key(envname): + os.environ[envname] = '.:%s:%s' % (savdir, os.environ[envname]) + else: + os.environ[envname] = '.:%s:' % (savdir) + (tmpdir, junk) = os.path.split(outfile) + self._tracer.chdir(tmpdir) + + # + # Run JadeTeX on the generated file, thrice. + # + (dvibase, junk) = os.path.splitext(outfile) + destfile = dvibase + '.dvi' + cmdline = 'jadetex ' + outfile + for run in range(3): + try: + os.unlink(destfile) + except: + pass + self._tracer.system(cmdline) + if not os.path.isfile(destfile): + raise IOError, 'JadeTeX run failed' + + # + # Write generated DVI file to destination if we're the final + # backend. If we're nested, leave the file hanging around. + # + self._tracer.chdir(savdir) + if self._globs.getName() == 'dvi': + finalfile = os.path.join (self._fileparts[1], + self._fileparts[0] + '.dvi') + self._tracer.mv(destfile, finalfile) + + # + # Make sure that the temporary files are unlinked, later on. + # + registerTemp(os.path.join(tmpdir, dvibase + '.log')) + registerTemp(os.path.join(tmpdir, dvibase + '.aux')) + + + +class DviGlobals(BackendGlobals): + + def getName(self): + return 'dvi' + + def getJadeSettings(self): + return ('sgmltools-dvi', 'tex') diff --git a/gnu/dist/sgmltools-lite/python/backends/Html.py b/gnu/dist/sgmltools-lite/python/backends/Html.py new file mode 100644 index 00000000..bf57ab17 --- /dev/null +++ b/gnu/dist/sgmltools-lite/python/backends/Html.py @@ -0,0 +1,88 @@ +# +# backends/Html.py +# +# $Id: Html.py,v 1.5 2000/10/26 06:20:23 cdegroot Exp $ +# +# SGMLtools HTML backend driver. +# +# SGMLtools - an SGML toolkit. +# Copyright (C) 1998 Cees A. de Groot +# +# 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. +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +from Backend import Backend, BackendGlobals +import utils, os, string, stat + +class Html(Backend): + + def preJade(self, fh): + # + # Make a temporary directory, and change in there. Correct the + # filename if it wasn't absolute by prepending the old working + # directory. + # + self._savdir = os.getcwd(); + self._tempdir, junk = os.path.splitext(utils.makeTemp()) + self._tracer.mkdir(self._tempdir, 0700) + self._tracer.chdir(self._tempdir) + + return fh + + def postJade(self, outfile, stdoutfile): + # + # If we land here, everything worked out fine. Below the + # original working directory, create a subdirectory, and copy + # the results from the temporary directory over there. + # + # We clean the destination directory first so that old parts + # don't hang around, and we make a symlink named "index.html" + # pointing to the logical starting point of the resulting html + # set. + # + self._tracer.chdir(self._savdir) # so relative names work ok. + (srcdir, junk) = os.path.split(outfile) + destdir = os.path.join(self._fileparts[1], self._fileparts[0]) + + if os.path.exists(destdir): + self._tracer.system('rm -rf ' + destdir + '/*') + else: + self._tracer.mkdir(destdir) + + self._tracer.mv(self._tempdir + '/*', destdir) + self._tracer.rmdir(self._tempdir) + + # + # The first file in the manifest is what we'll see as index.html + # + self._tracer.chdir(destdir) + try: + fh = open('HTML.manifest', 'r') + indexfile = string.strip(fh.readline()) + fh.close() + self._tracer.symlink(indexfile, 'index.html') + except: + pass + + + self._tracer.chdir(self._savdir) + + +class HtmlGlobals(BackendGlobals): + + def getName(self): + return 'html' + + def getJadeSettings(self): + return ('sgmltools-html', 'sgml') diff --git a/gnu/dist/sgmltools-lite/python/backends/JadeTeX.py b/gnu/dist/sgmltools-lite/python/backends/JadeTeX.py new file mode 100644 index 00000000..87c50555 --- /dev/null +++ b/gnu/dist/sgmltools-lite/python/backends/JadeTeX.py @@ -0,0 +1,46 @@ +# +# backends/JadeTeX.py +# +# $Id: JadeTeX.py,v 1.3 2000/08/03 12:38:57 cdegroot Exp $ +# +# SGMLtools JadeTeX backend driver. +# +# SGMLtools - an SGML toolkit. +# Copyright (C) 1998 Cees A. de Groot +# +# 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. +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +from Backend import Backend, BackendGlobals +from utils import registerTemp +import os + +class JadeTeX(Backend): + + def postJade(self, outfile, stdoutfile): + + savdir = os.getcwd() + (tmpdir, junk) = os.path.split(outfile) + self._tracer.chdir(savdir) + finalfile = os.path.join(self._fileparts[1], + self._fileparts[0] + '.tex') + self._tracer.mv(outfile, finalfile) + +class JadeTeXGlobals(BackendGlobals): + + def getName(self): + return 'jadetex' + + def getJadeSettings(self): + return ('sgmltools-tex', 'tex') diff --git a/gnu/dist/sgmltools-lite/python/backends/Ld2db.py b/gnu/dist/sgmltools-lite/python/backends/Ld2db.py new file mode 100644 index 00000000..7787fc87 --- /dev/null +++ b/gnu/dist/sgmltools-lite/python/backends/Ld2db.py @@ -0,0 +1,71 @@ +# +# backends/Ld2db.py +# +# $Id: Ld2db.py,v 1.2 2000/08/03 12:38:57 cdegroot Exp $ +# +# SGMLtools LinuxDoc conversion backend driver. +# +# SGMLtools - an SGML toolkit. +# Copyright (C) 1998 Cees A. de Groot +# +# 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. +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +from Backend import Backend, BackendGlobals +import os, string + +class Ld2db(Backend): + + def preJade(self, fh): + # + # We need to patch up the SGML_CATALOG_FILES so that + # just the elements we need are in there. Otherwise, we + # have trouble with finding the wrong SGML declaration. + # + pathelems = string.split(os.environ["SGML_CATALOG_FILES"], ':') + newcatfiles = [] + for i in pathelems: + if string.find(i, 'dtd/sgmltools') != -1: + newcatfiles.append(i) + elif string.find(i, 'stylesheets/sgmltools') != -1: + newcatfiles.append(i) + elif string.find(i, 'dtd/jade') != -1: + newcatfiles.append(i) + elif string.find(i, 'entities/iso-entities-8879.1986') != -1: + newcatfiles.append(i) + + os.environ["SGML_CATALOG_FILES"] = string.join(newcatfiles, ':') + self._tracer.trace('SGML_CATALOG_FILES=' + + os.environ["SGML_CATALOG_FILES"]) + + return fh + + def postJade(self, outfile, stdoutfile): + # + # Write generated DVI file to destination if we're the final + # backend. Note that Jade spits stuff to stdoutfile in this + # case. + # + destfile = os.path.join(self._fileparts[1], + self._fileparts[0] + '.db-sgml') + self._tracer.mv(stdoutfile, destfile) + + +class Ld2dbGlobals(BackendGlobals): + + def getName(self): + return 'ld2db' + + def getJadeSettings(self): + return ('sgmltools-db', 'sgml') diff --git a/gnu/dist/sgmltools-lite/python/backends/Lynx.py b/gnu/dist/sgmltools-lite/python/backends/Lynx.py new file mode 100644 index 00000000..3436af78 --- /dev/null +++ b/gnu/dist/sgmltools-lite/python/backends/Lynx.py @@ -0,0 +1,59 @@ +# +# backends/Lynx.py +# +# $Id: Lynx.py,v 1.2 2000/10/25 06:00:05 cdegroot Exp $ +# +# SGMLtools Lynx-based text backend driver. +# +# SGMLtools - an SGML toolkit. +# Copyright (C) 1998 Cees A. de Groot +# +# 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. +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +from Backend import Backend, BackendGlobals +import os + +class Lynx(Backend): + + def preJade(self, fh): + # + # Check whether Lynx is there, if not: die + # + if self._autoconf['progs']['lynx'] == 'N/A': + raise Exception, 'Lynx not configured, cannot produce output' + else: + return fh + + def postJade(self, outfile, stdoutfile): + # + # Jade wrote HTML, run it through lynx. + # + destfile = os.path.join(self._fileparts[1], self._fileparts[0] + '.txt') + self._tracer.system ("lynx -dump -nolist -force_html %s >%s" \ + % (stdoutfile, destfile)) + + +class LynxGlobals(BackendGlobals): + + def getName(self): + # + # Now that there is more than one txt backend, we pose as 'lynx', not + # as 'txt' + # + return 'lynx' + + def getJadeSettings(self): + return ('sgmltools-lynx', 'sgml') + diff --git a/gnu/dist/sgmltools-lite/python/backends/OneHtml.py b/gnu/dist/sgmltools-lite/python/backends/OneHtml.py new file mode 100644 index 00000000..c3a30d0c --- /dev/null +++ b/gnu/dist/sgmltools-lite/python/backends/OneHtml.py @@ -0,0 +1,46 @@ +# +# backends/OneHtml.py +# +# $Id: OneHtml.py,v 1.2 2000/08/03 12:38:57 cdegroot Exp $ +# +# SGMLtools DVI backend driver. +# +# SGMLtools - an SGML toolkit. +# Copyright (C) 1998 Cees A. de Groot +# +# 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. +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +from Backend import Backend, BackendGlobals +from utils import registerTemp +import os, string + +class OneHtml(Backend): + + def postJade(self, outfile, stdoutfile): + + # + # Write generated HTML file to destination. + # + destfile = os.path.join(self._fileparts[1], + self._fileparts[0] + '.html') + self._tracer.mv(stdoutfile, destfile) + +class OneHtmlGlobals(BackendGlobals): + + def getName(self): + return 'onehtml' + + def getJadeSettings(self): + return ('sgmltools-onehtml', 'sgml') diff --git a/gnu/dist/sgmltools-lite/python/backends/Pdf.py b/gnu/dist/sgmltools-lite/python/backends/Pdf.py new file mode 100644 index 00000000..256c607c --- /dev/null +++ b/gnu/dist/sgmltools-lite/python/backends/Pdf.py @@ -0,0 +1,87 @@ +# +# backends/Pdf.py +# +# $Id: Pdf.py,v 1.2 2000/08/03 12:38:57 cdegroot Exp $ +# +# SGMLtools DVI backend driver. +# +# SGMLtools - an SGML toolkit. +# Copyright (C) 1998 Cees A. de Groot +# +# 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. +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +from Backend import Backend, BackendGlobals +from utils import registerTemp +import os + +class Pdf(Backend): + + def postJade(self, outfile, stdoutfile): + + # + # Looks like that from 1.1.8, jadetex writes output in cwd + # instead of TMPDIR. No matter what jadetex chooses to do, + # this will make sure it lands in TMPDIR. We set TEXINPUTS + # so that included graphics are found. + # + savdir = os.getcwd() + envname = 'TEXINPUTS' + if os.environ.has_key(envname): + os.environ[envname] = '.:%s:%s' % (savdir, os.environ[envname]) + else: + os.environ[envname] = '.:%s:' % (savdir) + (tmpdir, junk) = os.path.split(outfile) + self._tracer.chdir(tmpdir) + + # + # Run JadeTeX on the generated file, thrice. + # + (pdfbase, junk) = os.path.splitext(outfile) + destfile = pdfbase + '.pdf' + cmdline = 'pdfjadetex ' + outfile + for run in range(3): + try: + os.unlink(destfile) + except: + pass + self._tracer.system(cmdline) + if not os.path.isfile(destfile): + raise IOError, 'JadeTeX run failed' + + # + # Write generated PDF file to destination if we're the final + # backend. If we're nested, leave the file hanging around. + # + self._tracer.chdir(savdir) + if self._globs.getName() == 'pdf': + finalfile = os.path.join (self._fileparts[1], + self._fileparts[0] + '.pdf') + self._tracer.mv(destfile, finalfile) + + # + # Make sure that the temporary files are unlinked, later on. + # + registerTemp(os.path.join(tmpdir, pdfbase + '.log')) + registerTemp(os.path.join(tmpdir, pdfbase + '.aux')) + + + +class PdfGlobals(BackendGlobals): + + def getName(self): + return 'pdf' + + def getJadeSettings(self): + return ('sgmltools-pdf', 'tex') diff --git a/gnu/dist/sgmltools-lite/python/backends/Ps.py b/gnu/dist/sgmltools-lite/python/backends/Ps.py new file mode 100644 index 00000000..b63aee15 --- /dev/null +++ b/gnu/dist/sgmltools-lite/python/backends/Ps.py @@ -0,0 +1,58 @@ +# +# backends/Ps.py +# +# $Id: Ps.py,v 1.1 2000/03/24 09:16:45 cdegroot Exp $ +# +# SGMLtools PostScript backend driver. +# +# SGMLtools - an SGML toolkit. +# Copyright (C) 1998 Cees A. de Groot +# +# 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. +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +from Backend import Backend, BackendGlobals +import os +from Dvi import Dvi + +class Ps(Dvi): + + def postJade(self, outfile, stdoutfile): + # + # Call the DVI postJade routine, this leaves a DVI file we + # can postprocess. + # + Dvi.postJade(self, outfile, stdoutfile) + + (tmpdir, junk) = os.path.split(outfile) + (dvibase, junk) = os.path.splitext(outfile) + dvifile = os.path.join(tmpdir, dvibase + '.dvi') + + destfile = os.path.join(self._fileparts[1], + self._fileparts[0] + '.ps') + + # + # Call dvips on the DVI file. + # + cmdline = 'dvips -o %s %s' % (destfile, dvifile) + self._tracer.system(cmdline) + + +class PsGlobals(BackendGlobals): + + def getName(self): + return 'ps' + + def getJadeSettings(self): + return ('sgmltools-ps', 'tex') diff --git a/gnu/dist/sgmltools-lite/python/backends/Rtf.py b/gnu/dist/sgmltools-lite/python/backends/Rtf.py new file mode 100644 index 00000000..ca8042e5 --- /dev/null +++ b/gnu/dist/sgmltools-lite/python/backends/Rtf.py @@ -0,0 +1,45 @@ +# +# backends/Rtf.py +# +# $Id: Rtf.py,v 1.2 2000/08/03 12:38:57 cdegroot Exp $ +# +# SGMLtools RTF backend driver. +# +# SGMLtools - an SGML toolkit. +# Copyright (C) 1998 Cees A. de Groot +# +# 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. +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +from Backend import Backend, BackendGlobals +import os + +class Rtf(Backend): + + def postJade(self, outfile, stdoutfile): + # + # Jade wrote RTF, send it to its final destination + # + destfile = os.path.join(self._fileparts[1], self._fileparts[0] + '.rtf') + self._tracer.mv(outfile, destfile) + + +class RtfGlobals(BackendGlobals): + + def getName(self): + return 'rtf' + + def getJadeSettings(self): + return ('sgmltools-rtf', 'rtf') + diff --git a/gnu/dist/sgmltools-lite/python/backends/W3m.py b/gnu/dist/sgmltools-lite/python/backends/W3m.py new file mode 100644 index 00000000..f327ae72 --- /dev/null +++ b/gnu/dist/sgmltools-lite/python/backends/W3m.py @@ -0,0 +1,71 @@ +# +# backends/W3m.py +# +# $Id: W3m.py,v 1.2 2000/11/27 20:11:57 dnedrow Exp $ +# +# SGMLtools W3m-based text backend driver. +# +# SGMLtools - an SGML toolkit. +# Copyright (C) 1998 Cees A. de Groot +# +# 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. +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +from Backend import Backend, BackendGlobals +import os + +class W3m(Backend): + + def preJade(self, fh): + # + # Check whether W3m is there, if not: die + # + if self._autoconf['progs']['w3m'] == 'N/A': + raise Exception, 'w3m not configured, cannot produce output' + else: + return fh + + def postJade(self, outfile, stdoutfile): + # + # Jade wrote HTML, run it through w3m. + # + destfile = os.path.join(self._fileparts[1], self._fileparts[0] + '.txt') + self._tracer.system ("w3m -T text/html -dump %s >%s" \ + % (stdoutfile, destfile)) + + +class W3mGlobals(BackendGlobals): + + def getName(self): + # + # As long as we're the only txt backend, we pose as 'txt', not + # as 'w3m' + # + return 'w3m' + + def getJadeSettings(self): + return ('sgmltools-w3m', 'sgml') + + def printHelp(self, fh): + """Not much help for w3m.""" + print '\n\n' + print 'w3m (http://ei5nazha.yz.yamagata-u.ac.jp/~aito/w3m/eng) is a' + print 'text-based pager that can be used to browse websites from a' + print 'console. It can also be used to generate text versions of' + print 'websites, generally with better output than the Lynx dump' + print 'facility. If w3m is found when sgmltools-lite is installed' + print 'it becomes the default parser for the txt backend.' + + pass + diff --git a/gnu/dist/sgmltools-lite/python/backends/iSilo.py b/gnu/dist/sgmltools-lite/python/backends/iSilo.py new file mode 100644 index 00000000..c3efa8b6 --- /dev/null +++ b/gnu/dist/sgmltools-lite/python/backends/iSilo.py @@ -0,0 +1,79 @@ +# +# backends/iSilo.py +# +# $Id: iSilo.py,v 1.2 2000/11/27 20:11:57 dnedrow Exp $ +# +# SGMLtools iSilo-based text backend driver. +# +# SGMLtools - an SGML toolkit. +# Copyright (C) 1998 Cees A. de Groot +# +# 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. +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +from Backend import Backend, BackendGlobals +import os + +class iSilo(Backend): + + def preJade(self, fh): + # + # Check whether iSilo is there, if not: die + # + if self._autoconf['progs']['iSilo'] == 'N/A': + raise Exception, 'iSilo not configured, cannot produce output' + else: + return fh + + def postJade(self, outfile, stdoutfile): + # + # Jade wrote HTML, run it through iSilo. + # + destfile = os.path.join(self._fileparts[1], self._fileparts[0] + '.pdb') + self._tracer.system ("%s -y -I %s %s" \ + % (self._autoconf['progs']['iSilo'], + stdoutfile, destfile)) + + +class iSiloGlobals(BackendGlobals): + + def getName(self): + # + # As long as we're the only txt backend, we pose as 'pdb', not + # as 'iSilo' + # + return 'pdb' + + def getJadeSettings(self): + return ('sgmltools-pdb', 'sgml') + + def printHelp(self, fh): + """Not much help for iSilo.""" + print '\n\n' + print 'iSilo (http://www.isilo.com) is an application that converts' + print 'HTML and ASCII to documents which can be viewed on Palm' + print 'compatible devices using the free iSilo reader.' + print '' + print 'While iSilo can parse HTML directly, the sgmltools' + print 'implementation uses a text backend to generate the input' + print 'to the iSilo encoder.' + print '' + print 'A future improvement to this backend will be input options' + print 'that will allow the user to specify pre-processing formats.' + print '' + print 'Free linux encoders and Palm readers are available from the' + print 'URL above.' + + pass + diff --git a/gnu/dist/sgmltools-lite/python/utils.py b/gnu/dist/sgmltools-lite/python/utils.py new file mode 100644 index 00000000..1bdc4fda --- /dev/null +++ b/gnu/dist/sgmltools-lite/python/utils.py @@ -0,0 +1,393 @@ +# +# utils.py - Assorted utilities +# +# $Id: utils.py,v 1.6 2001/02/05 01:18:37 dnedrow Exp $ +# +# SGMLtools - an SGML toolkit. +# Copyright (C)1998 Cees A. de Groot +# +# 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. +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + +""" + This module defines assorted utility functions. +""" + +import sys, tempfile, os, string, re + +# +# Global options and associated help text. +# +globalOptions = [ + ('v', 'verbose', 'Print verbose output'), + ('d', 'debug', 'Do not remove temporary files'), + ('b:', 'backend=', 'Backend to use (default: onehtml)'), + ('j:', 'jade-opt=', 'Options passed on to jade'), + ('s:', 'dsssl-spec=', 'DSSSL spec to use'), + ('V', 'version', 'Print version number and exit'), + ('h', 'help', 'Print usage and exit'), + ('l', 'license', 'Print license information') +] + +usagePre = """ sgmltools [OPTION...] [INPUT-FILE...] + +Convert SGML files into various output formats. + +Options:""" + +usagePost = """ +For help on a specific backend, use "--backend xyz --help". +""" + + +def makeOpts(backendOpts): + """Merge the global options with the backend options. + + This function merges the global options with the backend + options and returns a tuple usable for getopt. + """ + + retshort = '' + retlong = [] + optlist = globalOptions + backendOpts.getMoreOptions() + for opt in optlist: + retshort = retshort + opt[0] + retlong.append(opt[1]) + + return retshort, retlong + + +def normalizeOpts(backendGlobs, optList): + """Normalize the option list returned by getopt by converting short->long + + getopts() returns a mix of short and long options, which is a + bit unpractical. This function takes the result of getopts() and + normalizes it by replacing the option elements with the long + option without any add-on's like dashes and equals signs. + """ + + options = globalOptions + backendGlobs.getMoreOptions() + + # + # Build translation table from short->long. + # + shortToLong = {} + for opt in options: + if opt[0][-1] == ':': + short = opt[0][:-1] + else: + short = opt[0] + if opt[1][-1] == '=': + long = opt[1][:-1] + else: + long = opt[1] + + shortToLong[short] = long + + # + # Normalist list. + # + retval = [] + for opt in optList: + if opt[0][:2] == '--': + newval = (opt[0][2:], opt[1]) + else: + newval = (shortToLong[opt[0][1:]], opt[1]) + retval.append(newval) + + return retval + + +def findOption(optlist, optname): + """Look for an option in an option list and return optval. + + This method checks whether an option appears in an option + list and returns optval (or '1' if no optval was set) if + the option was found. Otherwise, it returns None. + """ + + for curopt in optlist: + if curopt[0] == optname: + if curopt[1] != '': + return curopt[1] + else: + return 1 + return None + + +def usage(backendGlobs, message): + """Print a usage string, the message, and exit. + + This method prints out all possible options and their help + texts (including those from the backend, if available), then + prints the message, and finally exits. + """ + + print "Usage:\n" + print usagePre + if backendGlobs != None: + optlist = globalOptions + backendGlobs.getMoreOptions() + else: + optlist = globalOptions + for opt in optlist: + print ' -%s, --%-15s %s' % (opt[0][0], opt[1], opt[2]) + + if backendGlobs != None: + backendGlobs.printHelp(sys.stderr) + + print usagePost + print + if message != None: + print message + print + sys.exit(1) + else: + sys.exit(0) + + +def version(sharedir): + """This procedure prints a version identifier to stdout""" + + fh = open(os.path.join(sharedir, 'VERSION')) + print 'SGMLtools-Lite version ' + string.rstrip(fh.readline()) + fh.close() + + +tempfiles = [] +def makeTemp(): + """Make a temporary file which is cleaned up at exit + + This method calls mktemp() to create a temporary filename and + stashes the returned file in an array that will be checked at + exit time by exitHandler(). + """ + + newname = tempfile.mktemp() + global tempfiles + tempfiles.append(newname) + return newname + +def registerTemp(file): + """Register a temporary file for cleaning up at exit + + This method registers a temporary file for cleanup at + exit. This can be used in order to deal with temporary + files whose names are not generated by us (but by, say, + TeX). + """ + tempfiles.append(file) + +def exitHandler(): + """Cleaning lady for makeTemp() + + This method walks over the tempfiles list and attempts to remove + each element in it. + """ + + for file in tempfiles: + try: + os.remove(file) + except: + pass + +# +# Register us as an exit function +# +sys.exitfunc = exitHandler + + +def readAliases(autoconf): + """Read %(etcdir)/aliases and ~/.sgmlaliases + + This function reads the SGML alias files and returns a hash + containing the merged contents of these files. + """ + + retval = {} + for file in [ os.path.join(autoconf['etcdir'], 'aliases'), + os.path.expanduser('~/.sgmlaliases') ]: + if not os.path.isfile(file): + continue + + fh = open(file, 'r') + for line in fh.readlines(): + line = string.strip(line) + if len(line) == 0: + continue + if line[0] == '#': + continue + + key, rest = string.split(line, ' ', 1) + retval[key] = string.lstrip(rest) + fh.close() + + return retval + +# +# Search our path, SGML_CATALOG_FILES, by reading all them files +# and looking for our pubid. We really need a catalog file parser... +# +def _searchInCat(curcat, id, section): + fh = open(curcat, 'r') + for line in fh.readlines(): + # + # Check for nested catalogs, recurse if yes. + # + mo = re.compile(r'CATALOG\s*"([^"]+)"').match(line) + if mo != None: + retval = _searchInCat(mo.group(1), id, section) + if retval != None: + return retval; + + if not re.compile(r'^\s*PUBLIC').match(line): + continue + if string.find(line, id) == -1: + continue + + fh.close() + + # + # Looks like a good one - extract the relevant parts. If the + # sysid is not absolute, prepend the current catalog's + # location to it. + # + retval = re.compile(r'^.*\s\"?([^"\s]+)\"?$').match(line).group(1) + if not os.path.isabs(retval): + catdir, junk = os.path.split(curcat) + retval = os.path.join(catdir, retval) + if not os.path.exists(retval): + raise IOError, \ + "Found catalog file %s but it doesn't exist" % retval + + if len(section) > 0: + retval = retval + '#' + section + return retval + + fh.close() + return None + + +def findStylesheet(name, aliases): + """Searches for the stylesheet indicated by name + + This function translates a public stylesheet identifier into a + system identifier. It uses the alias list to expand aliases. + """ + + # + # Test whether it is already a system identifier + # + try: + (id, section) = string.split(name, '#', 1) + except: + id = name + section = '' + if os.path.isfile(id): + return name + + # + # Expand alias, and retest. + # + if aliases.has_key(id): + name = aliases[id] + if len(section) > 0: + name = name + '#' + section + return findStylesheet(name, aliases) + + for curcat in string.split(os.environ['SGML_CATALOG_FILES'], ':'): + if not os.path.isfile(curcat): + continue + + retval = _searchInCat(curcat, id, section); + if retval != None: + return retval; + + raise IOError, "Couldn't resolve pubid [%s]" % id + +def shellProtect(file): + """Protects a filename against shell interpretation. + This is done by putting the name in single quotes, and by + escaping single quotes in the filename. If the last character + is an asterisk, the asterisk is NOT quoted and is appended + after the final single quote. + """ + if file[-1] != '*': + return "'%s'" % string.replace(file, "'", "'\\''") + else: + return "'%s'*" % string.replace(file[:-1], "'", "'\\''") + +class Tracer: + """Simple tracer class.""" + + def __init__(self, doTrace): + self._isTracing = doTrace + + def trace(self, message): + if self._isTracing: + print ('+' + message) + + def system(self, cmd): + """Shorthand for the pattern trace(x);os.system(x)""" + self.trace(cmd) + os.system(cmd) + + def mkdir(self, dir, mode=0755): + """Shorthand for the pattern trace('mkdir ' + x);os.mkdir(x)""" + self.trace('mkdir ' + dir) + os.mkdir(dir, mode) + + def chdir(self, dir): + """Shorthand for the pattern trace('chdir ' + x);os.chdir(x)""" + self.trace('chdir ' + dir) + os.chdir(dir) + + def rmdir(self, dir): + """Shorthand for the pattern trace('rmdir ' + x);os.rmdir(x)""" + self.trace('rmdir ' + dir) + os.rmdir(dir) + + def symlink(self, src, dest): + """Shorthand for the pattern trace('symlink... );os.symlink(...)""" + self.trace('ln -s ' + src + ' ' + dest) + os.symlink(src, dest) + + def mv(self, src, dest): + """Shorthand for the pattern trace('mv...);os.system("mv...).""" + self.system("mv %s %s" % (shellProtect(src), shellProtect(dest))) + +# +# License information printer +# +def license(): + print """ + SGMLtools - an SGML toolkit. + Copyright (C)1998 Cees A. de Groot + + 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. + + 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +""" + sys.exit(0) diff --git a/gnu/dist/sgmltools-lite/rpm/sgmltools-lite.spec b/gnu/dist/sgmltools-lite/rpm/sgmltools-lite.spec new file mode 100644 index 00000000..fae7c117 --- /dev/null +++ b/gnu/dist/sgmltools-lite/rpm/sgmltools-lite.spec @@ -0,0 +1,118 @@ +Summary: Transforms SGML DocBook files to various formats. +Name: sgmltools-lite +Version: 3.0.3 +Release: 1 +Copyright: GPL +Group: Applications/Text +Requires: sgml-common docbook-style-dsssl docbook-dtd41-sgml openjade docbook-utils python w3m +Packager: David Nedrow <dnedrow@usa.net> +Source: sgmltools-lite-%{version}.tar.gz +BuildRoot: /var/tmp/sgmltools-lite-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE} +Buildarch: noarch + +%define sysconfdir /etc/sgml +%define INSTALL install -m755 -s +%define INSTALL_SCRIPT install -m755 +%define INSTALL_DIR install -d -m755 +%define INSTALL_DATA install -m644 + +%description +This package contains some scripts to transform SGML DocBook source code +to various formats, including PDF, PostScript, DVI, HTML, ASCII, iSilo, +and RTF. + +Install sgmltools-lite if you'd like to work with the DocBook DTD. + +%prep +%setup -q + +%build +CFLAGS=$RPM_OPT_FLAGS \ +./configure --prefix=%{_prefix} --with-etcsgml=%{sysconfdir} --datadir=%{_datadir} --mandir=%{_mandir} --with-dbimages=%{_datadir}/sgml/docbook/dsssl-stylesheets-1.59/images/ +make + +%install + +if [ ! "x" = "x$RPM_BUILD_ROOT" ] ; then + rm -fr $RPM_BUILD_ROOT + %{INSTALL_DIR} $RPM_BUILD_ROOT +fi +#make install prefix=$RPM_BUILD_ROOT/usr +# make install.man +mkdir -p $RPM_BUILD_ROOT%{_bindir} +%{INSTALL_SCRIPT} bin/sgmltools $RPM_BUILD_ROOT%{_bindir} +%{INSTALL_SCRIPT} bin/gensgmlenv $RPM_BUILD_ROOT%{_bindir} +%{INSTALL_SCRIPT} bin/buildcat $RPM_BUILD_ROOT%{_bindir} + +%define sgmldir %{_datadir}/sgml +%define sgmltoolsdir %{sgmldir}/stylesheets/sgmltools +%define sgmltoolsdtddir %{sgmldir}/dtd/sgmltools +%define sgmltoolspythondir %{sgmldir}/misc/sgmltools/python +%define sgmltoolspythonbackendsdir %{sgmltoolspythondir}/backends + +mkdir -p $RPM_BUILD_ROOT%{sgmltoolsdir} +for i in dsssl/*.dsl dsssl/*.cat; do \ + %{INSTALL_DATA} $i $RPM_BUILD_ROOT%{sgmltoolsdir}; \ +done + +mkdir -p $RPM_BUILD_ROOT%{sgmltoolsdtddir} +for i in dtd/[a-z]*; do \ + %{INSTALL_DATA} $i $RPM_BUILD_ROOT%{sgmltoolsdtddir}; \ +done + +mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 +%{INSTALL_DATA} man/sgmltools-lite.1 $RPM_BUILD_ROOT%{_mandir}/man1 + +mkdir -p $RPM_BUILD_ROOT%{sgmltoolspythonbackendsdir} +for i in python/*.py; do \ + %{INSTALL_DATA} $i $RPM_BUILD_ROOT%{sgmltoolspythondir}; \ +done +for i in python/backends/*.py; do \ + %{INSTALL_DATA} $i $RPM_BUILD_ROOT%{sgmltoolspythonbackendsdir}; \ +done +%{INSTALL_DATA} VERSION $RPM_BUILD_ROOT%{sgmldir}/misc/sgmltools + +mkdir -p $RPM_BUILD_ROOT%{sysconfdir} +%{INSTALL_DATA} aliases $RPM_BUILD_ROOT%{sysconfdir}/aliases + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root) +%doc README POSTINSTALL index.html COPYING README.rpm +%config %{sysconfdir}/aliases +%{_bindir}/* +%{_mandir}/*/* +%{sgmldir}/* + +%changelog +* Mon May 07 2001 David Nedrow <dnedrow@usa.net> +- Changes to Requires so that proper packages are selected for RedHat 7.1. +- Changed architecture to "noarch" + +* Thu Nov 02 2000 David Nedrow <dnedrow@usa.net> +- Structural changes to spec file per suggestion of Karl Eichwalder. This + should make the spec file work properly under RedHat 6.2 and 7.0 as far + as file layout is concerned. + +* Wed Oct 25 2000 David Nedrow <dnedrow@usa.net> +- Minor update to handle gzip'd man pages if built under RedHat 7.0 + +* Fri Jun 30 2000 Marc André Selig <mas@seligma.com> +- prepared for 3.0.2 +- removed patch for catalogue file, which now comes with the source + +* Sun Jun 25 2000 Marc André Selig <mas@seligma.com> +- update to 3.0.1 from cvs copy downloaded 20000625 +- include a patch to add a catalog file +- change installation path of shared files to /usr/lib/sgml + (to conform with the RH file system standard) +- several minor fixes to the .spec file +- include old sgmltools dtd + +* Thu Jun 15 2000 Marc André Selig <mas@seligma.com> +- fix stupid bug (must not build for prefix /var/tmp/xxx/usr, but for /usr) +- built package + + diff --git a/gnu/dist/sgmltools-lite/rpm/sgmltools-lite.spec.rh62 b/gnu/dist/sgmltools-lite/rpm/sgmltools-lite.spec.rh62 new file mode 100644 index 00000000..245ae9a9 --- /dev/null +++ b/gnu/dist/sgmltools-lite/rpm/sgmltools-lite.spec.rh62 @@ -0,0 +1,113 @@ +Summary: Transforms SGML DocBook files to various formats. +Name: sgmltools-lite +Version: 3.0.2 +Release: 3 +Copyright: GPL +Group: Applications/Text +Requires: sgml-common stylesheets docbook jade +Packager: David Nedrow <dnedrow@usa.net> +Source: cvs://:pserver:anonymous@cvs.sgmltools-lite.sourceforge.net:/cvsroot/sgmltools-lite/src/sgmltools-lite-%{version}.tar.gz +BuildRoot: /var/tmp/sgmltools-lite-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE} +%define sysconfdir /etc/sgml +%define INSTALL install -m755 -s +%define INSTALL_SCRIPT install -m755 +%define INSTALL_DIR install -d -m755 +%define INSTALL_DATA install -m644 + +%description +This package contains some scripts to transform SGML DocBook source code +to various formats, including PDF, PostScript, DVI, HTML, ASCII, iSilo, +and RTF. + +Install sgmltools-lite if you'd like to work with the DocBook DTD. + +%prep +%setup -q + +%build +CFLAGS=$RPM_OPT_FLAGS \ +./configure --prefix=%{_prefix} --with-etcsgml=%{sysconfdir} --datadir=%{_libdir} --mandir=%{_mandir} --with-dbimages=%{_libdir}/sgml/stylesheets/nwalsh-modular/images/ +make + +%install + +if [ ! "x" = "x$RPM_BUILD_ROOT" ] ; then + rm -fr $RPM_BUILD_ROOT + %{INSTALL_DIR} $RPM_BUILD_ROOT +fi +#make install prefix=$RPM_BUILD_ROOT/usr +# make install.man +mkdir -p $RPM_BUILD_ROOT%{_bindir} +%{INSTALL_SCRIPT} bin/sgmltools $RPM_BUILD_ROOT%{_bindir} +%{INSTALL_SCRIPT} bin/sgmlwhich $RPM_BUILD_ROOT%{_bindir} + +%define sgmldir %{_libdir}/sgml +%define sgmltoolsdir %{sgmldir}/stylesheets/sgmltools +%define sgmltoolsdtddir %{sgmldir}/dtd/sgmltools +%define sgmltoolspythondir %{sgmldir}/misc/sgmltools/python +%define sgmltoolspythonbackendsdir %{sgmltoolspythondir}/backends + +mkdir -p $RPM_BUILD_ROOT%{sgmltoolsdir} +for i in dsssl/*.dsl dsssl/*.cat; do \ + %{INSTALL_DATA} $i $RPM_BUILD_ROOT%{sgmltoolsdir}; \ +done + +mkdir -p $RPM_BUILD_ROOT%{sgmltoolsdtddir} +for i in dtd/[a-z]*; do \ + %{INSTALL_DATA} $i $RPM_BUILD_ROOT%{sgmltoolsdtddir}; \ +done + +mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 +%{INSTALL_DATA} man/sgmltools.1 $RPM_BUILD_ROOT%{_mandir}/man1 + +mkdir -p $RPM_BUILD_ROOT%{sgmltoolspythonbackendsdir} +for i in python/*.py; do \ + %{INSTALL_DATA} $i $RPM_BUILD_ROOT%{sgmltoolspythondir}; \ +done +for i in python/backends/*.py; do \ + %{INSTALL_DATA} $i $RPM_BUILD_ROOT%{sgmltoolspythonbackendsdir}; \ +done +%{INSTALL_DATA} VERSION $RPM_BUILD_ROOT%{sgmldir}/misc/sgmltools + +mkdir -p $RPM_BUILD_ROOT%{sysconfdir} +%{INSTALL_DATA} aliases $RPM_BUILD_ROOT%{sysconfdir}/aliases +install -m 644 catalog.rh62 $RPM_BUILD_ROOT%{sysconfdir}/catalog + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root) +%doc README POSTINSTALL index.html COPYING README.rpm +%config %{sysconfdir}/aliases +%config %{sysconfdir}/catalog +%{_bindir}/* +%{_mandir}/*/* +%{sgmldir}/* + +%changelog +* Thu Nov 02 2000 David Nedrow <dnedrow@usa.net> +- Structural changes to spec file per suggestion of Karl Eichwalder. This + should make the spec file work properly under RedHat 6.2 and 7.0 as far + as file layour is concerned. + +* Wed Oct 25 2000 David Nedrow <dnedrow@usa.net> +- Minor update to handle gzip'd man pages if built under RedHat 7.0 + +* Fri Jun 30 2000 Marc André Selig <mas@seligma.com> +- prepared for 3.0.2 +- removed patch for catalogue file, which now comes with the source + +* Sun Jun 25 2000 Marc André Selig <mas@seligma.com> +- update to 3.0.1 from cvs copy downloaded 20000625 +- include a patch to add a catalog file +- change installation path of shared files to /usr/lib/sgml + (to conform with the RH file system standard) +- several minor fixes to the .spec file +- include old sgmltools dtd + +* Thu Jun 15 2000 Marc André Selig <mas@seligma.com> +- fix stupid bug (must not build for prefix /var/tmp/xxx/usr, but for /usr) +- built package + + diff --git a/gnu/dist/sgmltools-lite/rpm/sgmltools-lite.spec.rh71 b/gnu/dist/sgmltools-lite/rpm/sgmltools-lite.spec.rh71 new file mode 100644 index 00000000..fae7c117 --- /dev/null +++ b/gnu/dist/sgmltools-lite/rpm/sgmltools-lite.spec.rh71 @@ -0,0 +1,118 @@ +Summary: Transforms SGML DocBook files to various formats. +Name: sgmltools-lite +Version: 3.0.3 +Release: 1 +Copyright: GPL +Group: Applications/Text +Requires: sgml-common docbook-style-dsssl docbook-dtd41-sgml openjade docbook-utils python w3m +Packager: David Nedrow <dnedrow@usa.net> +Source: sgmltools-lite-%{version}.tar.gz +BuildRoot: /var/tmp/sgmltools-lite-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE} +Buildarch: noarch + +%define sysconfdir /etc/sgml +%define INSTALL install -m755 -s +%define INSTALL_SCRIPT install -m755 +%define INSTALL_DIR install -d -m755 +%define INSTALL_DATA install -m644 + +%description +This package contains some scripts to transform SGML DocBook source code +to various formats, including PDF, PostScript, DVI, HTML, ASCII, iSilo, +and RTF. + +Install sgmltools-lite if you'd like to work with the DocBook DTD. + +%prep +%setup -q + +%build +CFLAGS=$RPM_OPT_FLAGS \ +./configure --prefix=%{_prefix} --with-etcsgml=%{sysconfdir} --datadir=%{_datadir} --mandir=%{_mandir} --with-dbimages=%{_datadir}/sgml/docbook/dsssl-stylesheets-1.59/images/ +make + +%install + +if [ ! "x" = "x$RPM_BUILD_ROOT" ] ; then + rm -fr $RPM_BUILD_ROOT + %{INSTALL_DIR} $RPM_BUILD_ROOT +fi +#make install prefix=$RPM_BUILD_ROOT/usr +# make install.man +mkdir -p $RPM_BUILD_ROOT%{_bindir} +%{INSTALL_SCRIPT} bin/sgmltools $RPM_BUILD_ROOT%{_bindir} +%{INSTALL_SCRIPT} bin/gensgmlenv $RPM_BUILD_ROOT%{_bindir} +%{INSTALL_SCRIPT} bin/buildcat $RPM_BUILD_ROOT%{_bindir} + +%define sgmldir %{_datadir}/sgml +%define sgmltoolsdir %{sgmldir}/stylesheets/sgmltools +%define sgmltoolsdtddir %{sgmldir}/dtd/sgmltools +%define sgmltoolspythondir %{sgmldir}/misc/sgmltools/python +%define sgmltoolspythonbackendsdir %{sgmltoolspythondir}/backends + +mkdir -p $RPM_BUILD_ROOT%{sgmltoolsdir} +for i in dsssl/*.dsl dsssl/*.cat; do \ + %{INSTALL_DATA} $i $RPM_BUILD_ROOT%{sgmltoolsdir}; \ +done + +mkdir -p $RPM_BUILD_ROOT%{sgmltoolsdtddir} +for i in dtd/[a-z]*; do \ + %{INSTALL_DATA} $i $RPM_BUILD_ROOT%{sgmltoolsdtddir}; \ +done + +mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 +%{INSTALL_DATA} man/sgmltools-lite.1 $RPM_BUILD_ROOT%{_mandir}/man1 + +mkdir -p $RPM_BUILD_ROOT%{sgmltoolspythonbackendsdir} +for i in python/*.py; do \ + %{INSTALL_DATA} $i $RPM_BUILD_ROOT%{sgmltoolspythondir}; \ +done +for i in python/backends/*.py; do \ + %{INSTALL_DATA} $i $RPM_BUILD_ROOT%{sgmltoolspythonbackendsdir}; \ +done +%{INSTALL_DATA} VERSION $RPM_BUILD_ROOT%{sgmldir}/misc/sgmltools + +mkdir -p $RPM_BUILD_ROOT%{sysconfdir} +%{INSTALL_DATA} aliases $RPM_BUILD_ROOT%{sysconfdir}/aliases + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root) +%doc README POSTINSTALL index.html COPYING README.rpm +%config %{sysconfdir}/aliases +%{_bindir}/* +%{_mandir}/*/* +%{sgmldir}/* + +%changelog +* Mon May 07 2001 David Nedrow <dnedrow@usa.net> +- Changes to Requires so that proper packages are selected for RedHat 7.1. +- Changed architecture to "noarch" + +* Thu Nov 02 2000 David Nedrow <dnedrow@usa.net> +- Structural changes to spec file per suggestion of Karl Eichwalder. This + should make the spec file work properly under RedHat 6.2 and 7.0 as far + as file layout is concerned. + +* Wed Oct 25 2000 David Nedrow <dnedrow@usa.net> +- Minor update to handle gzip'd man pages if built under RedHat 7.0 + +* Fri Jun 30 2000 Marc André Selig <mas@seligma.com> +- prepared for 3.0.2 +- removed patch for catalogue file, which now comes with the source + +* Sun Jun 25 2000 Marc André Selig <mas@seligma.com> +- update to 3.0.1 from cvs copy downloaded 20000625 +- include a patch to add a catalog file +- change installation path of shared files to /usr/lib/sgml + (to conform with the RH file system standard) +- several minor fixes to the .spec file +- include old sgmltools dtd + +* Thu Jun 15 2000 Marc André Selig <mas@seligma.com> +- fix stupid bug (must not build for prefix /var/tmp/xxx/usr, but for /usr) +- built package + + |
