--- libtemplates-parser-11.5.orig/debian/build.gpr +++ libtemplates-parser-11.5/debian/build.gpr @@ -0,0 +1,22 @@ +-- Project file to build Templates Parser +-- Copyright (c) 2006 Ludovic Brenta +project Build is + for Source_Dirs use ("..", "../src", "../include"); + for Object_Dir use "../" & External ("obj"); + for Main use ("build"); + package Compiler is + for Default_Switches ("Ada") use ("-O2", "-gnatafno", "-gnatVa"); + + -- Work around a bug in GCC 4.1 (ICE in tree-dfa.c at -O1, -O2): + for Switches ("templates_parser.adb") use + ("-O0", "-gnatafno", "-gnatVa"); + end Compiler; + package Naming is + for Specification ("Templates_Parser.Configuration") + use "templates_parser-configuration__standalone.ads"; + for Implementation ("Templates_Parser.Input") + use "templates_parser-input__standalone.adb"; + for Implementation ("Templates_Parser.Tasking") + use "templates_parser-tasking__standard_tasking.adb"; + end Naming; +end Build; --- libtemplates-parser-11.5.orig/debian/changelog +++ libtemplates-parser-11.5/debian/changelog @@ -0,0 +1,123 @@ +libtemplates-parser (11.5-3) unstable; urgency=medium + + * debian/control (Architectures): + - temporarily disable mips due to #566234. + - add armel. Closes: #568444. + - s/docs/doc/. Closes: #568474. + + -- Ludovic Brenta Sun, 7 Feb 2010 22:55:42 +0100 + +libtemplates-parser (11.5-2) unstable; urgency=low + + * templates_parser.gpr: new Naming package to let applications + find templates_parser-configuration__standalone.ads. + * Split the documentation into a new package. + * debian/control (Build-Depends-Indep): new. + * debian/rules: support dpkg-buildpackage -A, -B. + * debian/patches/GPL.patch: new, the GPL also applies to the doc. + + -- Ludovic Brenta Thu, 31 Dec 2009 23:51:53 +0100 + +libtemplates-parser (11.5-1) unstable; urgency=low + + * New upstream version (Subversion revision 145737). + * Set aliversion=11.5, soversion=11.5 per Debian Policy for Ada. + * Package renamings: + libtemplates-parser-dev -> libtemplates-parser11.5-dev + (with Conflicts: and Replaces:) + libtemplates-parser11 -> libtemplates-parser11.5 + libtemplates-parser11-dbg -> libtemplates-parser11.5-dbg + * Build-Depend and Depend on gnat-4.4 instead of gnat-4.3. + * Build-Depend on libxmlada3.2-dev instead of libxmlada-dev. + * Drop support for alpha due to http://gcc.gnu.org/PR42073. + * debian/rules: parse the aliversion and soversion from debian/control. + * debian/patches/GPL.patch: remove; merged into the .orig.tar.gz. + * debian/patches/library_version.patch: adjust. + + -- Ludovic Brenta Tue, 1 Dec 2009 22:19:20 +0100 + +libtemplates-parser (11.1-3) unstable; urgency=low + + * Tighten build-dependency on libxmlada-dev to (>= 3.0-6) to force + a recompile. + + -- Ludovic Brenta Sun, 13 Sep 2009 16:22:42 +0200 + +libtemplates-parser (11.1-2) unstable; urgency=low + + * debian/control (Architecture): add kfreebsd-amd64. Closes: #542415. + (Depends): add ${misc:Depends} for proper support for debhelper. + s/source:Version/binary:Version/g. + (Standards-Version): bump to 3.8.3. + (libtemplates_parser11-dbg): new package containing the detached + debugging symbols. + * debian/compat: bump to 7. + * patches: move to debian/patches; adjust all patches to quilt -p ab. + * debian/rules: adjust to source format 3.0 (quilt). + * debian/clean: new. + + -- Ludovic Brenta Sun, 13 Sep 2009 15:20:22 +0200 + +libtemplates-parser (11.1-1) unstable; urgency=low + + * New upstream release. + * Change soname to libtemplates_parser.so.11, and binary package name + to match. + * debian/control: update Standards-Version to 2.7.3 with no changes. + Migrate to gnat-4.3. Migrate to texlive-{generic,fonts}-recommended + and texlive-latex-base. Add support for mips, mipsel and ppc64. + * debian/compat: new. + * debian/rules: do not export DH_COMPAT anymore. Use upstream's library + project files to build, instead of our own. + * debian/templates_parser.gpr: turn into a library project file. + * patches/make.patch: new; when executing programs compiled as + part of the doc, look for libtemplates_parser.so in the proper place. + * patches/library-version.patch: new; specify the soname of the + shared library. + * debian/templates2ada.1, debian/templatespp.1: new. + * patches/GPL.patch: new; remove the GMGPL special exception text from + generated documentation, too. + + -- Ludovic Brenta Wed, 14 May 2008 21:42:30 +0200 + +libtemplates-parser (10.0+20080424-1) unstable; urgency=low + + * compilation with last svn sources and gnat-4.3 + + -- Xavier Grave Thu, 24 Apr 2008 10:38:00 +0200 + +libtemplates-parser (10.0+20060522-5) unstable; urgency=low + + * debian/rules: add an empty binary-indep target. Closes: #395713. + + -- Ludovic Brenta Sun, 29 Oct 2006 00:58:25 +0200 + +libtemplates-parser (10.0+20060522-4) unstable; urgency=low + + * debian/control: add alpha and s390, as libgnat now exists on these + archs. Closes: #380572. + * debian/rules: use /bin/bash explicitly. Closes: #380615. + + -- Ludovic Brenta Mon, 7 Aug 2006 18:19:32 +0200 + +libtemplates-parser (10.0+20060522-3) unstable; urgency=low + + * debian/control build-depend on texinfo. + + -- Ludovic Brenta Fri, 28 Jul 2006 20:39:39 +0200 + +libtemplates-parser (10.0+20060522-2) unstable; urgency=low + + * debian/rules: chmod docs/gentexifiles to be executable, fixes FTBFS. + + -- Ludovic Brenta Fri, 28 Jul 2006 20:13:50 +0200 + +libtemplates-parser (10.0+20060522-1) unstable; urgency=low + + * Initial version, to be used in both AWS and GPS. + + -- Ludovic Brenta Thu, 20 Jul 2006 01:14:04 +0200 + +Local variables: +left-margin: 2 +End: --- libtemplates-parser-11.5.orig/debian/clean +++ libtemplates-parser-11.5/debian/clean @@ -0,0 +1,73 @@ +docs/templates_parser.pdf +docs/templates_parser.txt +docs/templates_parser.html +docs/templates_parser.info +docs/templates_parser-xml.ads.texi +docs/genout +docs/templates_parser-utils.ads.texi +docs/templates_parser-debug.ads.texi +docs/templates_parser.ads.texi +docs/if_inline.tmplt.texi +docs/table_inline.tmplt.texi +docs/table_block.tmplt.texi +docs/matrix.tmplt.texi +docs/table_if.tmplt.texi +docs/table_section.tmplt.texi +docs/table.tmplt.texi +docs/user.tmplt.texi +docs/demo.tmplt.texi +docs/if_inline.adb.texi +docs/if_inline.adb.res +docs/table_inline.adb.texi +docs/table_inline.adb.res +docs/matrix.adb.texi +docs/matrix.adb.res +docs/table_if.adb.texi +docs/table_if.adb.res +docs/table_section.adb.texi +docs/table_section.adb.res +docs/table.adb.texi +docs/table.adb.res +docs/user2.adb.texi +docs/user2.adb.res +docs/user1.adb.texi +docs/user1.adb.res +docs/demo.adb.texi +docs/demo.adb.res +docs/ada.sed +docs/if_inline +docs/if_inline.o +docs/if_inline.ali +docs/table_inline +docs/table_inline.o +docs/table_inline.ali +docs/matrix +docs/matrix.o +docs/matrix.ali +docs/table_if +docs/table_if.o +docs/table_if.ali +docs/table_section +docs/table_section.o +docs/table_section.ali +docs/table +docs/table.o +docs/table.ali +docs/user2 +docs/user2.o +docs/user2.ali +docs/user1 +docs/user1.o +docs/user1.ali +docs/demo +docs/demo.o +docs/demo.ali +docs/if_inline.adb +docs/matrix.adb +docs/table.adb +docs/table_if.adb +docs/table_inline.adb +docs/table_section.adb +docs/user2.adb +docs/demo.adb +docs/user1.adb --- libtemplates-parser-11.5.orig/debian/compat +++ libtemplates-parser-11.5/debian/compat @@ -0,0 +1 @@ +7 --- libtemplates-parser-11.5.orig/debian/control +++ libtemplates-parser-11.5/debian/control @@ -0,0 +1,69 @@ +Source: libtemplates-parser +Section: libdevel +Priority: optional +Maintainer: Ludovic Brenta +Build-Depends: debhelper (>= 7), gnat, gnat-4.4, quilt, libxmlada3.2-dev +Build-Depends-Indep: texinfo, + texlive-generic-recommended, texlive-fonts-recommended, texlive-latex-base +Standards-Version: 3.8.3 + +Package: libtemplates-parser11.5-dev +Section: libdevel +Architecture: amd64 armel hppa i386 ia64 kfreebsd-amd64 kfreebsd-i386 mipsel powerpc ppc64 s390 sparc +Depends: libtemplates-parser11.5 (= ${binary:Version}), gnat-4.4, ${shlibs:Depends}, ${misc:Depends} +Conflicts: libtemplates-parser-dev +Replaces: libtemplates-parser-dev +Recommends: libtemplates-parser-doc +Description: Ada library to parse files and replace variables with their values + The main goal is to ease the development of Web servers. In CGI + (Common Gateway Interface) applications, you have to write HTML pages in + the program (in Ada or whatever other language) by using some specific + libraries or by using only basic output functions. This is of course not + mandatory but by lack of a good library every Web development ends up doing + just that. Templates Parser takes that burden off of you. + . + This package contains the static libraries, documentation, tools and Ada + specification files. + +Package: libtemplates-parser11.5 +Section: libs +Architecture: amd64 armel hppa i386 ia64 kfreebsd-amd64 kfreebsd-i386 mipsel powerpc ppc64 s390 sparc +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Ada library to parse files and replace variables with their values + The main goal is to ease the development of Web servers. In CGI + (Common Gateway Interface) applications, you have to write HTML pages in + the program (in Ada or whatever other language) by using some specific + libraries or by using only basic output functions. This is of course not + mandatory but by lack of a good library every Web development ends up doing + just that. Templates Parser takes that burden off of you. + . + This package contains the runtime shared library. + +Package: libtemplates-parser11.5-dbg +Section: debug +Priority: extra +Architecture: amd64 armel hppa i386 ia64 kfreebsd-amd64 kfreebsd-i386 mipsel powerpc ppc64 s390 sparc +Depends: libtemplates-parser11.5 (=${binary:Version}), ${misc:Depends} +Recommends: libtemplates-parser11.5-dev (=${binary:Version}) +Description: Ada library to parse files and replace variables with their values + The main goal is to ease the development of Web servers. In CGI + (Common Gateway Interface) applications, you have to write HTML pages in + the program (in Ada or whatever other language) by using some specific + libraries or by using only basic output functions. This is of course not + mandatory but by lack of a good library every Web development ends up doing + just that. Templates Parser takes that burden off of you. + . + This package contains the detached debugging symbols for the shared library. + +Package: libtemplates-parser-doc +Section: doc +Architecture: all +Description: Ada library to parse files and replace variables with their values + The main goal is to ease the development of Web servers. In CGI + (Common Gateway Interface) applications, you have to write HTML pages in + the program (in Ada or whatever other language) by using some specific + libraries or by using only basic output functions. This is of course not + mandatory but by lack of a good library every Web development ends up doing + just that. Templates Parser takes that burden off of you. + . + This package contains the documentation for developers using the library. --- libtemplates-parser-11.5.orig/debian/copyright +++ libtemplates-parser-11.5/debian/copyright @@ -0,0 +1,73 @@ +Templates Parser is Copyright (c) 1999-2004 Pascal Obry + Copyright (c) 2005-2006 AdaCore + +It is available from AdaCore's CVS server at http://libre.adacore.com. + +License terms for the documentation: + +This document may be copied, in whole or in part, in any form or by any +means, as is or with alterations, provided that (1) alterations are clearly +marked as alterations and (2) this copyright notice is included +unmodified in any copy. + + +License terms for the library: + +This library 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 library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 +USA + +On Debian GNU/Linux systems, the full text of the GPL is in the file +/usr/share/common-licenses/GPL. + + +Maintainer's note: + +If you obtain Templates Parser from AdaCore's CVS server, you might +notice that the source files still carry the following text: + + As a special exception, if other files instantiate generics from this + unit, or you link this unit with other files to produce an executable, + this unit does not by itself cause the resulting executable to be + covered by the GNU General Public License. This exception does not + however invalidate any other reasons why the executable file might + be covered by the GNU Public License. + +However, AdaCore insist that everything obtained from their web or CVS +servers is licensed under the terms of the pure GPL, explained above. +As a result, if you use Templates Parser in your program or libraries, +you have four options: + +- do not distribute your program at all (you can always use it for + yourself). + +- distribute your program under the terms of the GPL, i.e. with full + sources and the four freedoms: inspection, redistribution, + modification, and distribution of modified copies. + +- distribute your program in source form only, under licensing terms + of your choosing (perhaps under non-disclosure, non-redistribution + terms), and ask your licensees to recompile your program for + themselves. + +- contact AdaCore (sales@adacore.com) and purchase a GNAT-Modified + GPL which will allow you to distribute your program in binary-only + form without disclosing your sources. + +In order to reduce the potential for confusion, I have removed the +"special exception" text from all source files. + +-- +Ludovic Brenta, 2006-07-18 + --- libtemplates-parser-11.5.orig/debian/rules +++ libtemplates-parser-11.5/debian/rules @@ -0,0 +1,128 @@ +#!/usr/bin/make -f +# Build script for Templates_Parser in Debian. +# Copyright (c) 2003-2008 Ludovic Brenta + +# This build script 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 +# USA + +# On Debian systems, the full text of the GPL is in the file +# /usr/share/common-licenses/GPL. + +ALIVERSION := $(shell sed --quiet -r 's/^Package: libtemplates-parser([0-9.]+)-dev$$/\1/p' debian/control) +SOVERSION := $(shell sed --quiet -r 's/^Package: libtemplates-parser([0-9.]+)$$/\1/p' debian/control) +CPUS := $(shell getconf _NPROCESSORS_ONLN) +export CPUS + +file_to_spec := -e 's!.*/(.+)\.ads!\1!' -e 's!-!.!g' + +include /usr/share/quilt/quilt.make + +lib := libtemplates_parser + +build-arch: patch $(lib).a $(lib).so +build-indep: patch doc + +tp_xmlada.gpr: + $(MAKE) setup TP_XMLADA=Installed + +$(lib).a: .build/release/static/lib/$(lib).a +.PHONY: $(lib).a + +.build/release/static/lib/$(lib).a: tp_xmlada.gpr debian/rules + : # Build the static library + $(MAKE) build LIBRARY_TYPE=static SOVERSION=$(SOVERSION) + +$(lib).so: .build/release/relocatable/lib/$(lib).so.$(SOVERSION) +.PHONY: $(lib).so + +.build/release/relocatable/lib/$(lib).so.$(SOVERSION): tp_xmlada.gpr debian/rules + : # Build the shared library + $(MAKE) build LIBRARY_TYPE=relocatable SOVERSION=$(SOVERSION) + +doc: doc-stamp + +# Note: the recursive make in docs will build the static library +# because it needs it to generate the doc. +doc-stamp: + chmod u+x docs/gentexifile + $(MAKE) -C docs PRJ_BUILD=Release GNATMAKE=gnatmake + touch $@ + +clean: unpatch + dh_testdir + dh_testroot + rm -f doc-stamp tp_xmlada.gpr + rm -rf $(foreach ext,ps dvi,docs/templates_parser.$(ext)) docs/templates_parser.t2d + rm -rf .build + rm -f config/test_shared/foo.ali config/test_shared/foo.o + rm -f config/tp_config.gpr makefile.setup + dh_clean + +adainclude := usr/share/ada/adainclude/templates_parser +adalib := usr/lib/ada/adalib/templates_parser + +# Build architecture-dependent files here. +binary-arch: build-arch libtemplates-parser$(SOVERSION) libtemplates-parser$(ALIVERSION)-dev + dh_installchangelogs -a + dh_installdocs -a + dh_lintian -a + dh_compress -a + dh_fixperms -a + dh_installdeb -a + dh_shlibdeps -a + dh_gencontrol -a + dh_md5sums -a + dh_builddeb -a + +binary-indep: build-indep libtemplates-parser-doc + dh_installchangelogs -i + dh_installdocs -i + dh_lintian -i + dh_compress -i -X.pdf + dh_fixperms -i + dh_installdeb -i + dh_shlibdeps -i + dh_gencontrol -i + dh_md5sums -i + dh_builddeb -i + +libtemplates-parser$(SOVERSION): + : # The library package + dh_installdirs -p$@ usr/lib + dh_install -p$@ .build/release/relocatable/lib/$(lib).so.$(SOVERSION) usr/lib + dh_strip -p$@ --dbg-package=$@-dbg + dh_makeshlibs -p$@ + +libtemplates-parser$(ALIVERSION)-dev: + : # The -dev package + dh_installdirs -p$@ usr/lib $(adainclude) $(adalib) usr/share/doc/$@ + dh_install -p$@ .build/release/static/lib/$(lib).a usr/lib + dh_install -p$@ .build/release/relocatable/bin/* usr/bin + dh_link -p$@ usr/lib/$(lib).so.$(SOVERSION) usr/lib/$(lib).so + dh_install -p$@ .build/release/relocatable/lib/*.ali $(adalib) + dh_install -p$@ include/*.ad[bs] src/*.ad[bs] xsrc/*.ad[bs] $(adainclude) + dh_install -p$@ debian/templates_parser.gpr usr/share/ada/adainclude + dh_installman -p$@ debian/*.1 + dh_installexamples -p$@ tools/templates.tads + dh_strip -p$@ + +libtemplates-parser-doc: + : # The -doc package + dh_installdirs -p$@ usr/share/doc/$@ + dh_installdocs -p$@ docs/*.html docs/*.css docs/*.txt docs/*.pdf + dh_installinfo -p$@ docs/*.info + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- libtemplates-parser-11.5.orig/debian/templates2ada.1 +++ libtemplates-parser-11.5/debian/templates2ada.1 @@ -0,0 +1,95 @@ +.TH TEMPLATES2ADA 1 "2008-05-04" "GNU Ada Tools" "Templates Parser User's Guide" +.SH NAME +templates2ada \- generate Ada sources from a templates file +.SH SYNOPSIS +\fBtemplates2ada\fR [options] +.SH DESCRIPTION +\fBtemplates2ada\fR parses all the template files in a directory and +then generates an output file from these, based on a template file (a +default example of which is provided as +\fI/usr/share/doc/libtemplates-parser-dev/examples/templates.tads\fR). The +latter contains in fact two examples, depending on whether one Ada +package should be generated per template, or whether a single package +should be built. In the former case, if you are using the GNAT +compiler, you should run `gnatchop' on the resulting file. Here is an +example: + + $ rm -f src/templates/*.ads + $ templates2ada -d resources/ -o src/templates/generated -r + $ cd src/templates; gnatchop -w -q generated + $ rm -f src/templates/generated + +One of the goals of \fBtemplates2ada\fR is to ensure that you are only +setting tags that actually exist in the template (and thus prevent, as +much as possibly, typos in the name of tags); also, when combined with +other tools, to help ensure that all tags needed by the template are +properly set. + +\fBtemplates2ada\fR also has special knowledge about HTTP constructs +and will generate Ada constants for the HTTP parameters you might +receive in return. Once more the goal is to help avoid typos in the +Ada code. + +For instance, we will consider a simple template file, found in a +local file `resources/block1.thtml'. This template contains the +following simple html code: + +
+ + +
+ +When you run \fBtemplates2ada\fR, the following Ada package will be +generated. Note that this is only the default output of +\fBtemplates2ada\fR, which can be fully tailored to your needs. + + package Templates.Block1 is + pragma Style_Checks (Off); + Template : constant string := "resources/block1.thtml"; + Tag1 : constant String := "TAG1"; + Tag2 : constant String := "TAG2"; + package Http is + Param1 : constant String := "PARAM1"; + Param2 : constant String := "PARAM2"; + end Http; + end Templates.Block1; + +.SH OPTIONS +.IP "\fB-d\fR \fIdir\fR" +Search for template files in \fIdir\fR. + +.IP \fB-h\fR +Display a summary of options. + +.IP "\fB-o\fR \fIfile\fR" +Write the output to \fIfile\fR. + +.IP "\fB-e\fR \fIext\fR" +Process all files with extension \fIext\fR that are in the input +directory; consider these files as template files. + +.IP \fB-r\fR +Recurse into subdirectories. + +.IP "\fB-t\fR \fIfile\fR" +Use \fIfile\fR as the output template file. The templates parser comes +with an example for such a file, +\fI/usr/share/doc/templates-parser/examples/templates.tads\fR, that +you can adapt to your own needs. + +.IP \fB-v\fR +Verbose mode. This will output a warning when an http parameter has a +name made only of template parser tags, since no matching entry can +then be created for it in the output file. + +.SH "SEE ALSO" +.BR templatespp (1) + +The Template Parsers User's Guide in package libtemplates-parser-dev. + +.SH AUTHOR +\fBtemplates2ada\fR was written by Pascal Obry as +part of the Ada Web Server. + +This manual page was written by Ludovic Brenta +for Debian GNU/Linux. --- libtemplates-parser-11.5.orig/debian/templates_parser.gpr +++ libtemplates-parser-11.5/debian/templates_parser.gpr @@ -0,0 +1,35 @@ +-- Templates Parser library project file for use with GCC 4.4 +-- Copyright (c) 2006, 2009 Ludovic Brenta +-- +-- 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. +-- +-- This project file is designed to help build applications that use +-- Templates Parser. Here is an example of how to use this project file: +-- +-- with "templates_parser"; +-- project Example is +-- for Object_Dir use "obj"; +-- for Exec_Dir use "."; +-- for Main use ("example"); +-- end Example; + +library project Templates_Parser is + for Source_Dirs use ("/usr/share/ada/adainclude/templates_parser"); + for Library_Name use "templates_parser"; + for Library_ALI_Dir use "/usr/lib/ada/adalib/templates_parser"; + for Library_Dir use "/usr/lib"; + for Library_Kind use "dynamic"; + for Externally_Built use "true"; + package Naming is + for Specification ("Templates_Parser.Configuration") + use "templates_parser-configuration__standalone.ads"; + end Naming; +end Templates_Parser; --- libtemplates-parser-11.5.orig/debian/templatespp.1 +++ libtemplates-parser-11.5/debian/templatespp.1 @@ -0,0 +1,48 @@ +.TH TEMPLATESPP1 1 "2008-05-04" "GNU Ada Tools" "Templates Parser User's Guide" +.SH NAME +templatespp \- preprocessor based on templates parser +.SH SYNOPSIS +\fBtemplatespp\fR [-o \fIfile\fR] \fIfile\fR +.SH DESCRIPTION +\fBtemplatespp\fR is a pre-processor based on the template parser. It +is generally used from scripts to process files and generate other +files. One of the possible uses, for instance, is to write the CSS +(style-sheet) of a web site as a template file (for instance +`mycss.tcss'), and use template parser structures in there. This is a +good way to share colors for instance, or to name constants, as is +often done in Ada code. + +Here is a small example of such a CSS: + + @@SET@@ COLOR1=blue + @@SET@@ COLOR2=red + @@SET@@ LENGTH1=10 + + body {background:@_COLOR1_@} + div {background:@_COLOR2_@} + ul.class {background:@_COLOR1_@} /* same color as body */ + + ul {width:@_ADD(3):LENGTH1_@px} /* ul 3 pixels wider than li */ + li {width:@_LENGTH1_@px} + +Such a file would be processed with the following command line: + + templatespp -o mycss.css mycss.tcss + +.SH OPTIONS +.IP \fB-h\fR +Display a summary of options. + +.IP "\fB-o\fR \fIfile\fR" +Write the output to \fIfile\fR. +.SH "SEE ALSO" +.BR templates2ada (1) + +The Template Parsers User's Guide in package libtemplates-parser-dev. + +.SH AUTHOR +\fBtemplatespp\fR was written by Pascal Obry as +part of the Ada Web Server. + +This manual page was written by Ludovic Brenta +for Debian GNU/Linux. --- libtemplates-parser-11.5.orig/debian/libtemplates-parser11.5.lintian-overrides +++ libtemplates-parser-11.5/debian/libtemplates-parser11.5.lintian-overrides @@ -0,0 +1 @@ +libtemplates-parser11.5: shlib-with-executable-stack usr/lib/libtemplates_parser.so.11.5 --- libtemplates-parser-11.5.orig/debian/patches/info-dir-section.patch +++ libtemplates-parser-11.5/debian/patches/info-dir-section.patch @@ -0,0 +1,16 @@ +Index: docs/templates_parser.texi +=================================================================== +--- a/docs/templates_parser.texi ++++ b/docs/templates_parser.texi +@@ -35,6 +35,11 @@ + + @c ----------------------------------------- END MACRO + ++@dircategory GNU Ada tools ++@direntry ++* Templates Parser: (templates_parser). Parse files and replace variables with their values. ++@end direntry ++ + @titlepage + + @title Templates Parser User's Guide --- libtemplates-parser-11.5.orig/debian/patches/library_version.patch +++ libtemplates-parser-11.5/debian/patches/library_version.patch @@ -0,0 +1,29 @@ +--- a/makefile ++++ b/makefile +@@ -92,12 +94,14 @@ + + build: setup_config tp_xmlada.gpr + $(GNAT) make -p -j$(CJOBS) -XLIBRARY_TYPE=static \ +- -XPRJ_BUILD=$(PRJ_BUILD) -Ptemplates_parser ++ -XPRJ_BUILD=$(PRJ_BUILD) -Ptemplates_parser \ ++ -XSONAME=libtemplates_parser.so.$(SOVERSION) + $(GNAT) make -p -j$(CJOBS) -XLIBRARY_TYPE=static \ + -XPRJ_BUILD=$(PRJ_BUILD) -Ptools/tools + ifeq ($(ENABLE_SHARED), true) + $(GNAT) make -p -j$(CJOBS) -XLIBRARY_TYPE=relocatable \ +- -XPRJ_BUILD=$(PRJ_BUILD) -Ptemplates_parser ++ -XPRJ_BUILD=$(PRJ_BUILD) -Ptemplates_parser \ ++ -XSONAME=libtemplates_parser.so.$(SOVERSION) + endif + + tp_xmlada.gpr: setup +--- a/templates_parser.gpr ++++ b/templates_parser.gpr +@@ -38,6 +38,7 @@ + + for Library_Name use "templates_parser"; + for Library_Kind use TP_Shared.Library_Type; ++ for Library_Version use External ("SONAME"); + + case TP_Shared.XMLAda is + when "Installed" => --- libtemplates-parser-11.5.orig/debian/patches/series +++ libtemplates-parser-11.5/debian/patches/series @@ -0,0 +1,6 @@ +info-dir-section.patch +makefile_tail.patch +make.patch +library_version.patch +produce_tool_with_shared.patch +GPL.patch --- libtemplates-parser-11.5.orig/debian/patches/produce_tool_with_shared.patch +++ libtemplates-parser-11.5/debian/patches/produce_tool_with_shared.patch @@ -0,0 +1,11 @@ +--- a/makefile ++++ b/makefile +@@ -102,6 +102,8 @@ + $(GNAT) make -p -j$(CJOBS) -XLIBRARY_TYPE=relocatable \ + -XPRJ_BUILD=$(PRJ_BUILD) -Ptemplates_parser \ + -XSONAME=libtemplates_parser.so.$(SOVERSION) ++ $(GNAT) make -p -j$(CJOBS) -XLIBRARY_TYPE=relocatable \ ++ -XPRJ_BUILD=$(PRJ_BUILD) -Ptools/tools + endif + + tp_xmlada.gpr: setup --- libtemplates-parser-11.5.orig/debian/patches/make.patch +++ libtemplates-parser-11.5/debian/patches/make.patch @@ -0,0 +1,71 @@ +Index: b/docs/makefile +=================================================================== +--- a/docs/makefile ++++ b/docs/makefile +@@ -20,8 +20,6 @@ + # # + ############################################################################ + +-.SILENT: ada.sed doc clean +- + MAKEINFO = $(shell which makeinfo 2> /dev/null) + DVIPS = $(shell which dvips 2> /dev/null) + TEXI2DVI = $(shell which texi2dvi 2> /dev/null) +@@ -142,10 +140,14 @@ + + %.adb.res: %.adb + echo "@TPEXP{" > $<.res ++ LD_LIBRARY_PATH=../.build/debug/relocatable/lib; \ ++ export LD_LIBRARY_PATH; \ + ./`basename $@ .adb.res` >> $<.res + echo "}" >> $<.res + + %.adb.html: %.adb ++ LD_LIBRARY_PATH=../.build/debug/relocatable/lib; \ ++ export LD_LIBRARY_PATH; \ + `basename $@ .adb.html` >> $<.html + + %.ads.texi: %.ads ada.sed gentexifile +@@ -158,19 +160,17 @@ + ./gentexifile $< + + ada.sed: makefile +- echo "s/\([^@_]\)@\([^@_]\)/\1@@\2/" > ada.sed +- echo "s/-- \(.*\)$$/-- @i{\1}/" >> ada.sed +- echo "/--/!s/\([^-][^-][^\"]*\)\"\([^\"]*\)\"/\1\"@i{\2}\"/g" \ ++ echo 's/\([^@_]\)@\([^@_]\)/\\1@@\\2/' > ada.sed ++ echo 's/-- \(.*\)$$/-- @i{\\1}/' >> ada.sed ++ echo '/--/!s/\([^-][^-][^\"]*\)"\([^\"]*\)"/\\1"@i{\\2}"/g' \ + >> ada.sed +- echo "s/@@/@@@@/g" >> ada.sed +- echo "s/@_/@@_/g" >> ada.sed +- echo "s/_@/_@@/g" >> ada.sed +- for kw in $(ADA_KW); do \ +- echo "s/^\([^-]* \)$$kw/\1@b{$$kw}/g" >> ada.sed; \ +- echo "s/^\([^-]* \)$$kw/\1@b{$$kw}/g" >> ada.sed; \ +- echo "s/^\( *\)$$kw /\1@b{$$kw} /g" >> ada.sed; \ +- echo "s/^$$kw$$/@b{$$kw}/g" >> ada.sed; \ +- done ++ echo 's/@@/@@@@/g' >> ada.sed ++ echo 's/@_/@@_/g' >> ada.sed ++ echo 's/_@/_@@/g' >> ada.sed ++ $(foreach kw,$(ADA_KW),\ ++ echo 's/^\([^-]* \)$(kw)/\\1@b{$(kw)}/g' >> ada.sed; \ ++ echo 's/^\( *\)$(kw) /\\1@b{$(kw)} /g' >> ada.sed; \ ++ echo 's/^$(kw)$$/@b{$(kw)}/g' >> ada.sed; ) + + force: + +Index: b/makefile +=================================================================== +--- a/makefile ++++ b/makefile +@@ -19,8 +19,6 @@ + # # + ############################################################################ + +-.SILENT: +- + VERSION = 11.5 + GNAT = gnat + --- libtemplates-parser-11.5.orig/debian/patches/makefile_tail.patch +++ libtemplates-parser-11.5/debian/patches/makefile_tail.patch @@ -0,0 +1,22 @@ +Index: b/docs/makefile +=================================================================== +--- a/docs/makefile ++++ b/docs/makefile +@@ -27,6 +27,8 @@ + TEXI2DVI = $(shell which texi2dvi 2> /dev/null) + PDFTEX = $(shell which pdftex 2> /dev/null) + ++GNAT = gnat ++ + TMPLT = demo.tmplt user.tmplt table.tmplt table_section.tmplt \ + table_if.tmplt matrix.tmplt table_block.tmplt table_inline.tmplt \ + if_inline.tmplt +@@ -135,7 +137,7 @@ + cp ../config/tp_xmlada_dummy.gpr ../tp_xmlada.gpr + + $(EXEFILES): ../tp_xmlada.gpr $(ADBFILES) $(ADSFILES) +- $(GNAT) make -p -q -XLIBRARY_TYPE=static -XPRJ_BUILD=$(PRJ_BUILD) \ ++ $(GNAT) make -p -XLIBRARY_TYPE=static -XPRJ_BUILD=$(PRJ_BUILD) \ + -Pdocs $(EXEFILES) + + %.adb.res: %.adb --- libtemplates-parser-11.5.orig/debian/patches/GPL.patch +++ libtemplates-parser-11.5/debian/patches/GPL.patch @@ -0,0 +1,49 @@ +Index: b/docs/templates_parser.texi +=================================================================== +--- a/docs/templates_parser.texi ++++ b/docs/templates_parser.texi +@@ -6,6 +6,26 @@ + @setchapternewpage off + @syncodeindex fn cp + ++@copying ++Copyright @copyright{} 1999-2004, Pascal Obry ++ ++Copyright @copyright{} 2005-2008, AdaCore ++ ++This document is free; 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 document is distributed in the hope that it will be useful, ++but WITHOUT ANY WARRANTY; without even the implied warranty of ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++GNU General Public License for more details. ++ ++You should have received a copy of the GNU General Public License along ++with this program; if not, write to the Free Software Foundation, Inc., ++51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ++@end copying ++ + @iftex + @afourpaper + @end iftex +@@ -54,16 +74,10 @@ + + @page + +-Copyright @copyright{} 1999-2004, Pascal Obry +- +-Copyright @copyright{} 2005-2008, AdaCore ++@insertcopying + + @* + +-This document may be copied, in whole or in part, in any form or by any +-means, as is or with alterations, provided that (1) alterations are clearly +-marked as alterations and (2) this copyright notice is included +-unmodified in any copy. + + @end titlepage +