summaryrefslogtreecommitdiff
path: root/app-text/code2html/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-text/code2html/files
reinit the tree, so we can have metadata
Diffstat (limited to 'app-text/code2html/files')
-rw-r--r--app-text/code2html/files/code2html-0.9.1-prefix.patch30
-rw-r--r--app-text/code2html/files/code2html-0.9.1-scalar.patch20
2 files changed, 50 insertions, 0 deletions
diff --git a/app-text/code2html/files/code2html-0.9.1-prefix.patch b/app-text/code2html/files/code2html-0.9.1-prefix.patch
new file mode 100644
index 000000000000..cc27296fb71c
--- /dev/null
+++ b/app-text/code2html/files/code2html-0.9.1-prefix.patch
@@ -0,0 +1,30 @@
+--- code2html
++++ code2html
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!@GENTOO_PORTAGE_EPREFIX@/usr/bin/perl -w
+ use locale;
+ my $vernr = "0.9.1";
+ my $monthshort = "Jan";
+@@ -45,9 +45,9 @@
+ # PP: A hash would be nicer but then it would not possible to get the keys in this very order (AFAIK)
+ # PP: If names contain meta characters, then those must be metaquoted (if you don't want the meta chars to be meta chars of course)
+ my @CGI_ENCODING = (
+- ['bzip2' , '/usr/bin/bzip2' , '--stdout' ],
+- ['gzip' , '/bin/gzip' , '--stdout' ],
+- ['compress' , '/usr/bin/compress' , '-c' ]
++ ['bzip2' , '@GENTOO_PORTAGE_EPREFIX@/usr/bin/bzip2' , '--stdout' ],
++ ['gzip' , '@GENTOO_PORTAGE_EPREFIX@/bin/gzip' , '--stdout' ],
++ ['compress' , '@GENTOO_PORTAGE_EPREFIX@/usr/bin/compress' , '-c' ]
+ );
+
+
+@@ -147,7 +147,7 @@
+ # building up the database
+ # newer entries overwrite old ones
+ my @CONFIG_FILES;
+- push @CONFIG_FILES, "/etc/code2html.config";
++ push @CONFIG_FILES, "@GENTOO_PORTAGE_EPREFIX@/etc/code2html.config";
+ push @CONFIG_FILES, $ENV{'HOME'}."/.code2html.config" if (defined($ENV{'HOME'}));
+ push @CONFIG_FILES, split(/:/,$ENV{'CODE2HTML_CONFIG'}) if ($ENV{'CODE2HTML_CONFIG'});
+ push @CONFIG_FILES, split(/:/,$params{'langfile'}) if defined($params{'langfile'});
diff --git a/app-text/code2html/files/code2html-0.9.1-scalar.patch b/app-text/code2html/files/code2html-0.9.1-scalar.patch
new file mode 100644
index 000000000000..eddc89a6a8f7
--- /dev/null
+++ b/app-text/code2html/files/code2html-0.9.1-scalar.patch
@@ -0,0 +1,20 @@
+--- code2html.orig 2002-01-12 22:17:02.000000000 +0100
++++ code2html 2014-09-24 13:52:52.000000000 +0200
+@@ -1357,7 +1357,7 @@
+ my @lines = split ( /\n/, $_[0] );
+
+ my $nr = 0;
+- my $lengthofnr = length(@lines);
++ my $lengthofnr = length(scalar(@lines));
+ my $format = qq{<a name="$_[1]line%u">%${lengthofnr}u</a> %s\n} ;
+ join ('', map ( {$nr++; sprintf ( $format , $nr, $nr, $_ )} @lines));
+ },
+@@ -1367,7 +1367,7 @@
+ my @lines = split ( /\n/, $_[0] );
+
+ my $nr = 0;
+- my $lengthofnr = length(@lines);
++ my $lengthofnr = length(scalar(@lines));
+ my $format = qq{<a name="$_[1]line%u" href="#$_[1]line%u">%$ {lengthofnr}u</a> %s\n};
+ join ('', map ( {$nr++; sprintf ( $format , $nr, $nr, $nr, $_ )} @lines));
+ }