]> git.ipfire.org Git - people/ms/ipfire-3.x.git/commitdiff
Merge remote-tracking branch 'stevee/docbook2X'
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 20 Apr 2014 12:53:49 +0000 (14:53 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 20 Apr 2014 12:53:49 +0000 (14:53 +0200)
docbook2X/docbook2X.nm [new file with mode: 0644]
nftables/nftables.nm
nftables/patches/nftables-20140118-db2x_docbook2man.patch [new file with mode: 0644]
perl-XML-NamespaceSupport/perl-XML-NamespaceSupport.nm [new file with mode: 0644]
perl-XML-SAX-Base/perl-XML-SAX-Base.nm [new file with mode: 0644]
perl-XML-SAX/generate-tarball.sh [new file with mode: 0755]
perl-XML-SAX/patches/perl-XML-SAX-0.99-rt20126.patch [new file with mode: 0644]
perl-XML-SAX/perl-XML-SAX.nm [new file with mode: 0644]

diff --git a/docbook2X/docbook2X.nm b/docbook2X/docbook2X.nm
new file mode 100644 (file)
index 0000000..949f9ae
--- /dev/null
@@ -0,0 +1,55 @@
+###############################################################################
+# IPFire.org    - An Open Source Firewall Solution                            #
+# Copyright (C) - IPFire Development Team <info@ipfire.org>                   #
+###############################################################################
+
+name       = docbook2X
+version    = 0.8.8
+release    = 1
+
+groups     = Application/Text
+url        = http://docbook2x.sourceforge.net/
+license    = MIT
+summary    = Convert docbook into man and Texinfo.
+
+description
+       docbook2X converts DocBook documents into man pages and Texinfo
+       documents.
+end
+
+source_dl  = http://downloads.sourceforge.net/docbook2x/
+
+build
+       requires
+               %{bindir}/sgml2xml
+               libxslt
+               openjade
+               perl(Exporter)
+               perl(IO::File)
+               perl(Text::Wrap)
+               perl(XML::SAX::ParserFactory)
+               perl(vars)
+               texinfo
+       end
+
+       configure_options += \
+                       --program-transform-name='s/docbook2/db2x_docbook2/'
+
+       install_cmds
+               # Remove unsused files.
+               rm -rvf %{BUILDROOT}%{datadir}/doc
+               rm -rvf %{BUILDROOT}%{infodir}/dir
+       end
+end
+
+packages
+       package %{name}
+
+       package %{name}-devel
+               template DEVEL
+       end
+
+       package %{name}-debuginfo
+               template DEBUGINFO
+       end
+end
index 82eabcff17cb1feb4322d17c240a7cf144a6ca15..03030952fe63984c1463939ea8abfd0eb1582897 100644 (file)
@@ -6,7 +6,7 @@
 name       = nftables
 version    = 0.100
 snapshot   = 20140412
-release    = 1.%{snapshot}
+release    = 2.%{snapshot}
 thisapp    = %{name}-%{snapshot}
 
 groups     = Networking/Tools
@@ -27,7 +27,8 @@ build
                autogen
                automake
                bison
-               docbook-dtds
+               docbook2X
+               docbook-xsl
                flex
                gmp-devel
                libtool
diff --git a/nftables/patches/nftables-20140118-db2x_docbook2man.patch b/nftables/patches/nftables-20140118-db2x_docbook2man.patch
new file mode 100644 (file)
index 0000000..efec20d
--- /dev/null
@@ -0,0 +1,53 @@
+diff -Nur nftables-20140118.orig/configure nftables-20140118/configure
+--- nftables-20140118.orig/configure   2014-01-17 22:28:04.000000000 -0700
++++ nftables-20140118/configure        2014-01-18 15:42:10.427000000 -0700
+@@ -3310,8 +3310,8 @@
+   rm -f conftest.sed
+-# Extract the first word of "docbook2x-man", so it can be a program name with args.
+-set dummy docbook2x-man; ac_word=$2
++# Extract the first word of "db2x_docbook2man", so it can be a program name with args.
++set dummy db2x_docbook2man; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+ if test "${ac_cv_prog_CONFIG_MAN+set}" = set; then :
+@@ -3350,8 +3350,8 @@
+ if test "$CONFIG_MAN" != "y"
+ then
+-      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: docbookx2-man not found, no manpages will be built" >&5
+-$as_echo "$as_me: WARNING: docbookx2-man not found, no manpages will be built" >&2;}
++      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: db2x_docbook2man not found, no manpages will be built" >&5
++$as_echo "$as_me: WARNING: db2x_docbook2man not found, no manpages will be built" >&2;}
+ fi
+ # Extract the first word of "db2pdf", so it can be a program name with args.
+diff -Nur nftables-20140118.orig/configure.ac nftables-20140118/configure.ac
+--- nftables-20140118.orig/configure.ac        2014-01-17 22:28:00.000000000 -0700
++++ nftables-20140118/configure.ac     2014-01-18 15:42:24.483000000 -0700
+@@ -25,10 +25,10 @@
+ AC_PROG_INSTALL
+ AC_PROG_SED
+-AC_CHECK_PROG(CONFIG_MAN, docbook2x-man, y, n)
++AC_CHECK_PROG(CONFIG_MAN, db2x_docbook2man, y, n)
+ if test "$CONFIG_MAN" != "y"
+ then
+-      AC_MSG_WARN([docbookx2-man not found, no manpages will be built])
++      AC_MSG_WARN([db2x_docbook2man not found, no manpages will be built])
+ fi
+ AC_CHECK_PROG(CONFIG_PDF, db2pdf, y, n)
+diff -Nur nftables-20140118.orig/Makefile.rules.in nftables-20140118/Makefile.rules.in
+--- nftables-20140118.orig/Makefile.rules.in   2014-01-17 22:28:00.000000000 -0700
++++ nftables-20140118/Makefile.rules.in        2014-01-18 15:27:45.759000000 -0700
+@@ -37,7 +37,7 @@
+ %.8:                  %.xml   $(makedeps)
+                       @echo -e "  MAN\t\t$@"
+-                      (cd $(SUBDIR); docbook2x-man ../$<)
++                      (cd $(SUBDIR); db2x_docbook2man ../$<)
+ %.pdf:                        %.xml   $(makedeps)
+                       @echo -e "  PDF\t\t$@"
diff --git a/perl-XML-NamespaceSupport/perl-XML-NamespaceSupport.nm b/perl-XML-NamespaceSupport/perl-XML-NamespaceSupport.nm
new file mode 100644 (file)
index 0000000..fd4e8ed
--- /dev/null
@@ -0,0 +1,52 @@
+###############################################################################
+# IPFire.org    - An Open Source Firewall Solution                            #
+# Copyright (C) - IPFire Development Team <info@ipfire.org>                   #
+###############################################################################
+
+name       = perl-XML-NamespaceSupport
+version    = 1.11
+release    = 1
+arch       = noarch
+
+thisapp    = XML-NamespaceSupport-%{version}
+
+groups     = Development/Libraries
+url        = http://search.cpan.org/dist/XML-NamespaceSupport/
+license    = GPL+ or Artistic
+summary    = A simple generic namespace support class.
+
+description
+       This module offers a simple to process namespaced XML names (unames) from
+       within any application that may need them. It also helps maintain a prefix
+       to namespace URI map, and provides a number of basic checks.
+end
+
+source_dl  = http://www.cpan.org/authors/id/P/PE/PERIGRIN/
+
+build
+       requires
+               perl(constant)
+               perl(Cwd)
+               perl(ExtUtils::MakeMaker) >= 6.42
+               perl(File::Path)
+               perl(Test::More) >= 0.47
+       end
+
+       prepare_cmds
+               # Fix permissions.
+               chmod 644 lib/XML/NamespaceSupport.pm
+       end
+
+       build
+               perl Makefile.PL INSTALLDIRS=vendor
+               make %{PARALLELISMFLAGS}
+       end
+
+       test
+               make test
+       end
+end
+
+packages
+       package %{name}
+end
diff --git a/perl-XML-SAX-Base/perl-XML-SAX-Base.nm b/perl-XML-SAX-Base/perl-XML-SAX-Base.nm
new file mode 100644 (file)
index 0000000..092b0dd
--- /dev/null
@@ -0,0 +1,48 @@
+###############################################################################
+# IPFire.org    - An Open Source Firewall Solution                            #
+# Copyright (C) - IPFire Development Team <info@ipfire.org>                   #
+###############################################################################
+
+name       = perl-XML-SAX-Base
+version    = 1.08
+release    = 1
+arch       = noarch
+
+thisapp    = XML-SAX-Base-%{version}
+
+groups     = Development/Libraries
+url        = http://search.cpan.org/dist/XML-SAX-Base/
+license    = GPL+ or Artistic
+summary    = Base class SAX drivers and filters.
+
+description
+       This module has a very simple task - to be a base class for Perl SAX drivers
+       and filters. Its default behavior is to pass the input directly to the
+       output unchanged. It can be useful to use this module as a base class so
+       you don't have to, for example, implement the characters() callback.
+end
+
+source_dl  = http://www.cpan.org/authors/id/G/GR/GRANTM/
+
+build
+       requires
+               perl(base)
+               perl(Carp)
+               perl(ExtUtils::MakeMaker) >= 6.42
+               perl(Test)
+               perl(Test::More) >= 0.47
+       end
+
+       build
+               perl Makefile.PL INSTALLDIRS=vendor
+               make %{PARALLELISMFLAGS}
+       end
+
+       test
+               make test
+       end
+end
+
+packages
+       package %{name}
+end
diff --git a/perl-XML-SAX/generate-tarball.sh b/perl-XML-SAX/generate-tarball.sh
new file mode 100755 (executable)
index 0000000..15e644d
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+VERSION=$1
+
+tar -xzvf XML-SAX-$VERSION.tar.gz
+
+# xmltest.xml could not be distributed due to copyright
+rm XML-SAX-$VERSION/testfiles/xmltest.xml
+rm XML-SAX-$VERSION/t/16large.t
+sed -i -e '/testfiles\/xmltest.xml/ d' XML-SAX-$VERSION/MANIFEST
+sed -i -e '/t\/16large.t/ d' XML-SAX-$VERSION/MANIFEST
+
+tar -czvf XML-SAX-$VERSION-nopatents.tar.gz XML-SAX-$VERSION
+
diff --git a/perl-XML-SAX/patches/perl-XML-SAX-0.99-rt20126.patch b/perl-XML-SAX/patches/perl-XML-SAX-0.99-rt20126.patch
new file mode 100644 (file)
index 0000000..5f0d100
--- /dev/null
@@ -0,0 +1,42 @@
+diff --git a/SAX/PurePerl.pm b/SAX/PurePerl.pm
+--- a/SAX/PurePerl.pm  2006-04-24 01:20:09.000000000 +0200
++++ b/SAX/PurePerl.pm  2012-08-09 12:47:48.736728516 +0200
+@@ -595,22 +595,23 @@ sub Comment {
+     
+     my $data = $reader->data(4);
+     if ($data =~ /^<!--/) {
+-        $reader->move_along(4);
++        $reader->move_along(4); # skip comment start
++        $data = $reader->data;
++        while ($data !~ m!-->!) {
++            my $n = $reader->read_more;
++             $self->parser_error("End of data seen while looking for close comment marker", $reader)
++                 unless $n;
++            $data = $reader->data;
++        }
++
+         my $comment_str = '';
+-        while (1) {
+-            my $data = $reader->data;
+-            $self->parser_error("End of data seen while looking for close comment marker", $reader)
+-                unless length($data);
+-            if ($data =~ /^(.*?)-->/s) {
+-                $comment_str .= $1;
+-                $self->parser_error("Invalid comment (dash)", $reader) if $comment_str =~ /-$/;
+-                $reader->move_along(length($1) + 3);
+-                last;
+-            }
+-            else {
+-                $comment_str .= $data;
+-                $reader->move_along(length($data));
+-            }
++        if ($data =~ /^(.*?)-->/s) {
++            $comment_str = $1;
++            $self->parser_error("Invalid comment (dash)", $reader) if $comment_str =~ /-$/;
++            $reader->move_along(length($1) + 3);
++        }
++        else {
++            return 0;
+         }
+         
+         $self->comment({ Data => $comment_str });
diff --git a/perl-XML-SAX/perl-XML-SAX.nm b/perl-XML-SAX/perl-XML-SAX.nm
new file mode 100644 (file)
index 0000000..b2e9e39
--- /dev/null
@@ -0,0 +1,82 @@
+###############################################################################
+# IPFire.org    - An Open Source Firewall Solution                            #
+# Copyright (C) - IPFire Development Team <info@ipfire.org>                   #
+###############################################################################
+
+name       = perl-XML-SAX
+version    = 0.99
+release    = 1
+arch       = noarch
+
+thisapp    = XML-SAX-%{version}
+
+groups     = Development/Libraries
+url        = http://search.cpan.org/dist/XML-SAX/
+license    = GPLv2+
+summary    = SAX parser access API for Perl.
+
+description
+       Perl programs can use the SGMLSpm module to help convert SGML, HTML or XML
+       documents into new formats.
+end
+
+# Original source
+# http://www.cpan.org/authors/id/G/GR/GRANTM/XML-SAX-%%{version}.tar.gz
+#
+# XML-SAX contains patented code that we cannot ship. Therefore we use
+# a script to remove the patented code before shipping it.
+#
+# Download the upstream tarball and run the following script in the
+# tarball's directory like this:
+# ./generate-tarball.sh %%{version}
+#
+# Finally we have to store the new tarball on one of our source server.
+
+sources = %{thisapp}-nopatents.tar.gz
+
+build
+       requires
+               perl(base)
+               perl(Carp)
+               perl(constant)
+               perl(Encode)
+               perl(Exporter)
+               perl(ExtUtils::MakeMaker)
+               perl(Fatal)
+               perl(File::Path)
+               perl(File::Spec)
+               perl(File::Temp)
+               perl(IO::File)
+               perl(Test)
+               perl(XML::NamespaceSupport)
+               perl(XML::SAX::Base)
+       end
+
+       build
+               perl Makefile.PL INSTALLDIRS=vendor
+               make %{PARALLELISMFLAGS}
+       end
+
+       test
+               make test
+       end
+
+       install
+               make pure_install DESTDIR=%{BUILDROOT}
+
+               touch %{BUILDROOT}%{perl_vendorlib}/XML/SAX/ParserDetails.ini
+       end
+end
+
+packages
+       package %{name}
+               configfiles
+                       %{perl_vendorlib}/XML/SAX/ParserDetails.ini
+               end
+
+               #Filter string for very weird dependencies.
+               filter_requires
+                       XML::SAX::PurePerl
+               end
+       end
+end