[SCM] Debian packaging of Text-BibTeX CPAN distribution branch, master, updated. upstream/0.60-21-ge84b194

Julián Moreno Patiñ?==?UTF-8?Q?o darkjunix at gmail.com
Sat Nov 5 23:19:06 UTC 2011


The following commit has been merged in the master branch:
commit 74fe8ca84e6b646f8aee0da48f59097b172ac8bc
Author: Julián Moreno Patiño <darkjunix at gmail.com>
Date:   Sat Nov 5 18:16:13 2011 -0500

    - Patch to use libbtparse-dev instead embedded upstream copy.
    - Patch to fix spelling error.
    - Patch to use the right path of perl in the example file.

diff --git a/debian/patches/fix_spelling_errors.diff b/debian/patches/fix_spelling_errors.diff
new file mode 100644
index 0000000..0c62044
--- /dev/null
+++ b/debian/patches/fix_spelling_errors.diff
@@ -0,0 +1,16 @@
+Description: Fix spelling errors.
+Origin: vendor
+Forwarded: no
+Author: Julián Moreno Patiño <darkjunix at gmail.com>
+Last-Update: 2011-11-05
+--- a/lib/Text/BibTeX/Structure.pm
++++ b/lib/Text/BibTeX/Structure.pm
+@@ -77,7 +77,7 @@
+ database structures are defined and imposed on BibTeX files, and
+ provides an elegant synthesis of object-oriented techniques with
+ BibTeX-style database structures.  Nothing described here is
+-particularly deep or subtle; anyone familar with object-oriented
++particularly deep or subtle; anyone familiar with object-oriented
+ programming should be able to follow it.  However, a fair bit of jargon
+ in invented and tossed around, so pay attention.
+ 
diff --git a/debian/patches/right_path_perl.diff b/debian/patches/right_path_perl.diff
new file mode 100644
index 0000000..cb1f90c
--- /dev/null
+++ b/debian/patches/right_path_perl.diff
@@ -0,0 +1,13 @@
+Description: Use the right path of perl.
+Origin: vendor
+Forwarded: no
+Author: Julián Moreno Patiño <darkjunix at gmail.com>
+Last-Update: 2011-11-05
+--- a/examples/append_entries
++++ b/examples/append_entries
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl5 -w
++#!/usr/bin/perl -w
+ 
+ #
+ # append_entries
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..d3f12d0
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,3 @@
+use_libbtparse-dev.diff
+fix_spelling_errors.diff
+right_path_perl.diff
diff --git a/debian/patches/use_libbtparse-dev.diff b/debian/patches/use_libbtparse-dev.diff
new file mode 100644
index 0000000..1078469
--- /dev/null
+++ b/debian/patches/use_libbtparse-dev.diff
@@ -0,0 +1,296 @@
+Description: Use libbtparse-dev instead embedded upstream copy.
+Origin: vendor
+Forwarded: no
+Author: Julián Moreno Patiño <darkjunix at gmail.com>
+Last-Update: 2011-11-05
+--- a/inc/MyBuilder.pm
++++ b/inc/MyBuilder.pm
+@@ -56,23 +56,15 @@
+     my $version = $self->notes('btparse_version');
+     my $alloca_h = 'undef HAVE_ALLOCA_H';
+     $alloca_h = 'define HAVE_ALLOCA_H 1' if Config::AutoConf->check_header("alloca.h");
+-    _interpolate("btparse/src/bt_config.h.in",
+-                 "btparse/src/bt_config.h",
++    _interpolate("/usr/include/btparse.h",
+                  PACKAGE  => "\"libbtparse\"",
+                  FPACKAGE => "\"libbtparse $version\"",
+                  VERSION  => "\"$version\"",
+                  ALLOCA_H => $alloca_h
+                 );
+ 
+-
+-    $self->dispatch("create_manpages");
+     $self->dispatch("create_objects");
+-    $self->dispatch("create_library");
+-    $self->dispatch("create_binaries");
+-    $self->dispatch("create_tests");
+-
+     $self->dispatch("compile_xscode");
+-
+     $self->SUPER::ACTION_code;
+ }
+ 
+@@ -98,7 +90,7 @@
+     $self->add_to_cleanup($ofile); ## FIXME
+     if (!$self->up_to_date($cfile, $ofile)) {
+         $cbuilder->compile( source               => $cfile,
+-                            include_dirs         => [ catdir("btparse","src") ],
++                            include_dirs         => [ catdir("/usr","include") ],
+                             object_file          => $ofile);
+     }
+ 
+@@ -120,49 +112,21 @@
+         my $btparselibdir = $self->install_path('usrlib');
+         $cbuilder->link(
+                         module_name => 'Text::BibTeX',
+-                        extra_linker_flags => "-Lbtparse/src -lbtparse ",
++                        extra_linker_flags => "-L/usr/include -lbtparse ",
+                         objects     => $objects,
+                         lib_file    => $lib_file,
+                        );
+     }
+ }
+ 
+-sub ACTION_create_manpages {
+-    my $self = shift;
+-
+-    print STDERR "\n** Creating Manpages\n";
+-
+-    my $pods = $self->rscan_dir(catdir("btparse","doc"), qr/\.pod$/);
+-
+-    my $version = $self->notes('btparse_version');
+-    for my $pod (@$pods) {
+-        my $man = $pod;
+-        $man =~ s!.pod!.1!;
+-        $man =~ s!btparse/doc!blib/bindoc!;   ## FIXME - path
+-        next if $self->up_to_date($pod, $man);
+-        ## FIXME
+-        `pod2man --section=1 --center="btparse" --release="btparse, version $version" $pod $man`;
+-    }
+-
+-    my $pod = 'btool_faq.pod';
+-    my $man = catfile('blib','bindoc','btool_faq.1');
+-    unless ($self->up_to_date($pod, $man)) {
+-        ## FIXME
+-        `pod2man --section=1 --center="btparse" --release="btparse, version $version" $pod $man`;
+-    }
+-}
+-
+ sub ACTION_create_objects {
+     my $self = shift;
+     my $cbuilder = $self->cbuilder;
+ 
+     print STDERR "\n** Compiling C files\n";
+-    my $c_progs = $self->rscan_dir('btparse/progs', qr/\.c$/);
+-    my $c_src   = $self->rscan_dir('btparse/src',   qr/\.c$/);
+-    my $c_tests = $self->rscan_dir('btparse/tests', qr/\.c$/);
+     my $c_xs    = $self->rscan_dir('xscode/',       qr/\.c$/);
+ 
+-    my @c_files = (@$c_progs, @$c_src, @$c_tests, @$c_xs);
++    my @c_files = (@$c_xs);
+     for my $file (@c_files) {
+         my $object = $file;
+         $object =~ s/\.c/.o/;
+@@ -173,166 +137,6 @@
+     }
+ }
+ 
+-
+-sub ACTION_create_binaries {
+-    my $self          = shift;
+-    my $cbuilder      = $self->cbuilder;
+-    my $libbuilder    = $self->notes('libbuilder');
+-    my $EXEEXT        = $libbuilder->{exeext};
+-    my $btparselibdir = $self->install_path('usrlib');
+-
+-    print STDERR "\n** Creating binaries (dumpnames$EXEEXT, biblex$EXEEXT, bibparse$EXEEXT)\n";
+-
+-    my $extra_linker_flags = sprintf("-Lbtparse/src %s -lbtparse ",
+-                                     ($^O !~ /darwin/)?"-Wl,-R${btparselibdir}":"");
+-
+-    my @toinstall;
+-    my $exe_file = catfile("btparse","progs","dumpnames$EXEEXT");
+-    push @toinstall, $exe_file;
+-    my $object   = catfile("btparse","progs","dumpnames.o");
+-
+-    if (!$self->up_to_date($object, $exe_file)) {
+-        $libbuilder->link_executable(exe_file => $exe_file,
+-                                     objects  => [ $object ],
+-                                     extra_linker_flags => $extra_linker_flags);
+-    }
+-
+-    $exe_file = catfile("btparse","progs","biblex$EXEEXT");
+-    push @toinstall, $exe_file;
+-    $object   = catfile("btparse","progs","biblex.o");
+-    if (!$self->up_to_date($object, $exe_file)) {
+-        $libbuilder->link_executable(exe_file => $exe_file,
+-                                     objects  => [ $object ],
+-                                     extra_linker_flags => $extra_linker_flags);
+-    }
+-
+-    $exe_file = catfile("btparse","progs","bibparse$EXEEXT");
+-    push @toinstall, $exe_file;
+-    $object   = [map {catfile("btparse","progs","$_.o")} (qw.bibparse args getopt getopt1.)];
+-    if (!$self->up_to_date($object, $exe_file)) {
+-        $libbuilder->link_executable(exe_file => $exe_file,
+-                                     objects => $object,
+-                                     extra_linker_flags => $extra_linker_flags);
+-    }
+-
+-    for my $file (@toinstall) {
+-        $self->copy_if_modified( from    => $file,
+-                                 to_dir  => "blib/bin",
+-                                 flatten => 1);
+-    }
+-
+-}
+-
+-sub ACTION_create_tests {
+-    my $self = shift;
+-    my $cbuilder = $self->cbuilder;
+-
+-    my $libbuilder = $self->notes('libbuilder');
+-    my $EXEEXT = $libbuilder->{exeext};
+-
+-    print STDERR "\n** Creating test binaries\n";
+-
+-    my $exe_file = catfile("btparse","tests","simple_test$EXEEXT");
+-    my $objects  = [ map{catfile("btparse","tests","$_.o")} (qw.simple_test testlib.) ];
+-
+-    if (!$self->up_to_date($objects, $exe_file)) {
+-        $libbuilder->link_executable(exe_file => $exe_file,
+-                                     extra_linker_flags => '-Lbtparse/src -lbtparse ',
+-                                     objects => $objects);
+-    }
+-
+-    $exe_file = catfile("btparse","tests","read_test$EXEEXT");
+-    $objects  = [ map{catfile("btparse","tests","$_.o")}(qw.read_test testlib.) ];
+-    if (!$self->up_to_date($objects, $exe_file)) {
+-        $libbuilder->link_executable(exe_file => $exe_file,
+-                                     extra_linker_flags => '-Lbtparse/src -lbtparse ',
+-                                     objects => $objects);
+-    }
+-
+-    $exe_file = catfile("btparse","tests","postprocess_test$EXEEXT");
+-    $objects  = [ map{catfile("btparse","tests","$_.o")}(qw.postprocess_test.) ];
+-    if (!$self->up_to_date($objects, $exe_file)) {
+-        $libbuilder->link_executable(exe_file => $exe_file,
+-                                     extra_linker_flags => '-Lbtparse/src -lbtparse ',
+-                                     objects => $objects);
+-    }
+-
+-    $exe_file = catfile("btparse","tests","tex_test$EXEEXT");
+-    $objects  = [ map{catfile("btparse","tests","$_.o")}(qw.tex_test.) ];
+-    if (!$self->up_to_date($objects, $exe_file)) {
+-        $libbuilder->link_executable(exe_file => $exe_file,
+-                                     extra_linker_flags => '-Lbtparse/src -lbtparse ',
+-                                     objects => $objects);
+-    }
+-
+-    $exe_file = catfile("btparse","tests","macro_test$EXEEXT");
+-    $objects  = [ map{catfile("btparse","tests","$_.o")}(qw.macro_test.) ];
+-    if (!$self->up_to_date($objects, $exe_file)) {
+-        $libbuilder->link_executable(exe_file => $exe_file,
+-                                     extra_linker_flags => '-Lbtparse/src -lbtparse ',
+-                                     objects => $objects);
+-    }
+-
+-    $exe_file = catfile("btparse","tests","name_test$EXEEXT");
+-    $objects  = [ map{catfile("btparse","tests","$_.o")}(qw.name_test.) ];
+-    if (!$self->up_to_date($objects, $exe_file)) {
+-        $libbuilder->link_executable(exe_file => $exe_file,
+-                                     extra_linker_flags => '-Lbtparse/src -lbtparse ',
+-                                     objects => $objects);
+-    }
+-
+-    $exe_file = catfile("btparse","tests","purify_test$EXEEXT");
+-    $objects  = [ map{catfile("btparse","tests","$_.o")}(qw.purify_test.) ];
+-    if (!$self->up_to_date($objects, $exe_file)) {
+-        $libbuilder->link_executable(exe_file => $exe_file,
+-                                     extra_linker_flags => '-Lbtparse/src -lbtparse ',
+-                                     objects => $objects);
+-    }
+-}
+-
+-sub ACTION_create_library {
+-    my $self = shift;
+-    my $cbuilder = $self->cbuilder;
+-
+-
+-    my $libbuilder = $self->notes('libbuilder');
+-    my $LIBEXT = $libbuilder->{libext};
+-
+-    print STDERR "\n** Creating libbtparse$LIBEXT\n";
+-
+-    my @modules = qw:init input bibtex err scan error
+-                     lex_auxiliary parse_auxiliary bibtex_ast sym
+-                     util postprocess macros traversal modify
+-                     names tex_tree string_util format_name:;
+-
+-    my @objects = map { "btparse/src/$_.o" } @modules;
+-
+-    my $libpath = $self->notes('lib_path');
+-    $libpath = catfile($libpath, "libbtparse$LIBEXT");
+-    my $libfile = "btparse/src/libbtparse$LIBEXT";
+-
+-    my $extra_linker_flags = "";
+-    if ($^O =~ /darwin/) {
+-        $extra_linker_flags = "-install_name $libpath";
+-    } elsif ($LIBEXT eq ".so") {
+-        $extra_linker_flags = "-Wl,-soname,libbtparse$LIBEXT";
+-    }
+-
+-    if (!$self->up_to_date(\@objects, $libfile)) {
+-        $libbuilder->link(module_name        => 'btparse',
+-                          objects            => \@objects,
+-                          lib_file           => $libfile,
+-                          extra_linker_flags => $extra_linker_flags);
+-    }
+-
+-    my $libdir = catdir($self->blib, 'usrlib');
+-    mkpath( $libdir, 0, 0777 ) unless -d $libdir;
+-
+-    $self->copy_if_modified( from   => $libfile,
+-                             to_dir => $libdir,
+-                             flatten => 1 );
+-}
+-
+ sub ACTION_test {
+     my $self = shift;
+ 
+@@ -358,7 +162,6 @@
+     $self->SUPER::ACTION_test
+ }
+ 
+-
+ sub _interpolate {
+     my ($from, $to, %config) = @_;
+ 	
+--- a/xscode/btxs_support.c
++++ b/xscode/btxs_support.c
+@@ -13,9 +13,10 @@
+ 
+ #define BT_DEBUG 0
+ 
+-#include "btparse.h"
++#include <btparse.h>
+ #include "btxs_support.h"
+ 
++typedef unsigned short btshort;
+ 
+ static char *nodetype_names[] = 
+ {
+--- a/xscode/BibTeX.xs
++++ b/xscode/BibTeX.xs
+@@ -31,9 +31,10 @@
+ 
+ #define BT_DEBUG 0
+ 
+-#include "btparse.h"
++#include <btparse.h>
+ #include "btxs_support.h"
+ 
++typedef unsigned short btshort;
+ 
+ MODULE = Text::BibTeX           PACKAGE = Text::BibTeX
+ 

-- 
Debian packaging of Text-BibTeX CPAN distribution



More information about the Pkg-perl-cvs-commits mailing list