aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--academic/perlprimer/README8
-rw-r--r--academic/perlprimer/perlprimer.SlackBuild15
-rw-r--r--academic/perlprimer/perlprimer.info2
-rw-r--r--academic/perlprimer/sytaxerrors.patch157
4 files changed, 171 insertions, 11 deletions
diff --git a/academic/perlprimer/README b/academic/perlprimer/README
index 08aeb68e14f30..bb7ab97f9669f 100644
--- a/academic/perlprimer/README
+++ b/academic/perlprimer/README
@@ -17,9 +17,9 @@ PerlPrimer's current features include the following:
to be in-frame
- QPCR primer design without manual intron-exon boundary entry
+An optional run-time dependency is spidey, for Real Time PCR.
+
For details and citation:
-Marshall OJ. PerlPrimer: cross-platform, graphical primer design for
-standard, bisulphite and real-time PCR. Bioinformatics 2004
+Marshall OJ. PerlPrimer: cross-platform, graphical primer design for
+standard, bisulphite and real-time PCR. Bioinformatics 2004
20(15):2471-2472
-
-For Real Time PCR, spidey is required.
diff --git a/academic/perlprimer/perlprimer.SlackBuild b/academic/perlprimer/perlprimer.SlackBuild
index 1f814503c4e01..345d8156bc28e 100644
--- a/academic/perlprimer/perlprimer.SlackBuild
+++ b/academic/perlprimer/perlprimer.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for perlprimer
-# Copyright 2011 Petar Petrov, ppetrov@paju.oulu.fi
+# Copyright 2011-2014 Petar Petrov, petar.petrov@student.oulu.fi
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,7 +24,7 @@
PRGNAM=perlprimer
VERSION=${VERSION:-1.1.21}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
ARCH=noarch
@@ -44,10 +44,13 @@ tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+# Thanks to Debian for the patch!
+patch -p1 -i $CWD/sytaxerrors.patch
install -D -m755 perlprimer.pl $PKG/usr/bin/perlprimer.pl
install -D -m644 gcg.603 $PKG/usr/share/$PRGNAM/gcg.603
diff --git a/academic/perlprimer/perlprimer.info b/academic/perlprimer/perlprimer.info
index 61afc20edbe56..239cbcedc6759 100644
--- a/academic/perlprimer/perlprimer.info
+++ b/academic/perlprimer/perlprimer.info
@@ -7,4 +7,4 @@ DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="libwww-perl perl-tk"
MAINTAINER="Petar Petrov"
-EMAIL="ppetrov@paju.oulu.fi"
+EMAIL="petar.petrov@student.oulu.fi"
diff --git a/academic/perlprimer/sytaxerrors.patch b/academic/perlprimer/sytaxerrors.patch
new file mode 100644
index 0000000000000..45b9cd570d565
--- /dev/null
+++ b/academic/perlprimer/sytaxerrors.patch
@@ -0,0 +1,157 @@
+Author: Steffen Moeller <steffen_moeller@gmx.de>
+Description: Fixes a series of errors indicated by Perl 5.18.
+Forwarded: https://sourceforge.net/p/perlprimer/patches/6/
+
+Index: git/perlprimer.pl
+===================================================================
+--- git.orig/perlprimer.pl
++++ git/perlprimer.pl
+@@ -3093,23 +3093,24 @@
+ # and because it's 3' primer-dimers that are the real problem in PCR.
+
+ # create a binding array for each of the four bases
+- for $l (0 .. $pfl-1) {
++ foreach $l (0 .. $pfl-1) {
+ my $mbase = substr($fprimer_r, $l, 1);
+ $primer_hash{$mbase}[$l]=1;
+- for $k qw(a g c t) {
++ my @nucleotides = qw(a g c t);
++ foreach $k (@nucleotides) {
+ $primer_hash{$k}[$l] ||=0;
+ }
+ }
+
+ # create the primer matrix
+ my @primer_comp;
+- for $k (0 .. $prl-1) {
++ foreach $k (0 .. $prl-1) {
+ $primer_comp[$k]=$primer_hash{substr($rcomprlc, $k, 1)};
+ }
+
+ # read each combination from the matrix, calculate dG for each dimer
+ my $pd_len = ($pd_full ? $pfl+$prl-1 : $pl-2);
+- for $k (0 .. $pd_len) {
++ foreach $k (0 .. $pd_len) {
+ $score[$k]=0;
+ my $bind;
+ my $score_p=0;
+@@ -3129,7 +3130,7 @@
+ # }
+
+ # read the binding data
+- for $l (0 .. $prl-1) {
++ foreach $l (0 .. $prl-1) {
+ if (($k-$l)<$pfl) {
+ $bind .= $primer_comp[$l][$k-$l] if ($k-$l)>=0;
+ } else {
+@@ -3148,7 +3149,7 @@
+
+ # Find start and end of similarity
+ my ($pb_init,$pb_end);
+- for $l (0 .. length($bind)-1) {
++ foreach $l (0 .. length($bind)-1) {
+ # at first I tried finding the initiating terminal bases with
+ # regexps, but that was much slower ...
+ if (substr($bind, $l, 1) eq "1") {
+@@ -3159,7 +3160,7 @@
+
+ if (defined($pb_init)) {
+ # deltaG calculation
+- for $l ($pb_init .. $pb_end-1) {
++ foreach $l ($pb_init .. $pb_end-1) {
+ next if substr($bind, $l, 2) eq "00";
+ next if substr($bind, $l, 1) eq "2";
+ $score_p+=$oligo_dG{substr($primer_f, $pfl-$k+$l-1, 2).substr($rprimer_r, $l, 2)};
+@@ -3228,44 +3229,44 @@
+ # and because it's 3' primer-dimers that are the real problem in PCR.
+
+ # create a binding array for each of the four bases
+- for $l (0 .. $pfl-1) {
++ foreach $l (0 .. $pfl-1) {
+ my $mbase = substr($fprimer_r, $l, 1);
+ $primer_hash{$mbase}[$l]=1;
+- for $k qw(a g c t) {
++ foreach $k (qw(a g c t)) {
+ $primer_hash{$k}[$l] ||=0;
+ }
+ }
+
+ # create the primer matrix
+ my @primer_comp;
+- for $k (0 .. $prl-1) {
+- $primer_comp[$k]=$primer_hash{substr($rcomprlc, $k, 1)};
++ foreach my $kk (0 .. $prl-1) {
++ $primer_comp[$kk]=$primer_hash{substr($rcomprlc, $kk, 1)};
+ }
+
+ # print the matrix - for debugging
+ print "$primer_f vs. $primer_r - full pd = $pd_full\n";
+ print " \t";
+- for $l (0 .. $pfl-1) {
++ foreach $l (0 .. $pfl-1) {
+ my $mbase = substr($fprimer_r, $l, 1);
+ print "$mbase ";
+ }
+ print "\n";
+- for $k (0 .. $prl-1) {
+- my $base = substr($rprimer_r, $k, 1);
+- print "$base:\t@{$primer_comp[$k]}\n";
++ foreach my $kk (0 .. $prl-1) {
++ my $base = substr($rprimer_r, $kk, 1);
++ print "$base:\t@{$primer_comp[$kk]}\n";
+ }
+
+ my @binding_data;
+ # read each combination from the matrix, calculate dG for each dimer
+ my $pd_len = ($pd_full ? $pfl+$prl-1 : $pl-2);
+- for my $k (0 .. $pd_len) {
+- $score[$k]=0;
++ foreach my $kk (0 .. $pd_len) {
++ $score[$kk]=0;
+ my $bind;
+ my $score_p=0;
+
+ # starting coords
+- my $pf_coord_start = ($k >= $pfl ? $pfl-1 : $k);
+- my $pr_coord_start = ($k - $pfl > 0 ? $k - $pfl : 0);
++ my $pf_coord_start = ($kk >= $pfl ? $pfl-1 : $kk);
++ my $pr_coord_start = ($kk - $pfl > 0 ? $kk - $pfl : 0);
+ my ($pf_coord, $pr_coord, $first, $flag);
+
+ # read through each combination finding multiple matches
+@@ -3285,7 +3286,7 @@
+ }
+ } elsif ($flag) {
+ # end of a binding stretch
+- push @binding_data, [$k, $first, $bind] if $bind > 1;
++ push @binding_data, [$kk, $first, $bind] if $bind > 1;
+ $bind=0;
+ $flag=0;
+ }
+@@ -3325,7 +3326,7 @@
+ # # }
+ #
+ # # read the binding data
+- # for $l (0 .. $prl-1) {
++ # foreach $l (0 .. $prl-1) {
+ # if (($k-$l)<$pfl) {
+ # $bind .= $primer_comp[$l][$k-$l] if ($k-$l)>=0;
+ # } else {
+@@ -3344,7 +3345,7 @@
+ #
+ # # Find start and end of similarity
+ # my ($pb_init,$pb_end);
+- # for $l (0 .. length($bind)-1) {
++ # foreach $l (0 .. length($bind)-1) {
+ # # at first I tried finding the initiating terminal bases with
+ # # regexps, but that was much slower ...
+ # if (substr($bind, $l, 1) eq "1") {
+@@ -3355,7 +3356,7 @@
+ #
+ # if (defined($pb_init)) {
+ # # deltaG calculation
+- # for $l ($pb_init .. $pb_end-1) {
++ # foreach $l ($pb_init .. $pb_end-1) {
+ # next if substr($bind, $l, 2) eq "00";
+ # next if substr($bind, $l, 1) eq "2";
+ # $score_p+=$oligo_dG{substr($primer_f, $pfl-$k+$l-1, 2).substr($rprimer_r, $l, 2)};