diff --git a/perl/p5-convert-uu/Portfile b/perl/p5-convert-uu/Portfile
new file mode 100644
index 0000000..f08bc62
--- /dev/null
+++ b/perl/p5-convert-uu/Portfile
@@ -0,0 +1,18 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem          1.0
+PortGroup           perl5 1.0
+
+perl5.setup         Convert-UU 0.5201
+platforms           darwin
+maintainers         nomaintainer
+license             Artistic GPL-2
+supported_archs     noarch
+
+description         Perl module for uuencode and uudecode
+
+long_description    ${description}
+
+checksums           sha256 92329ce1c32b5952c48e1223db018c8c58ceafef03bfa0fd4817cd89c355a3bd \
+                    rmd160 8628cff81fce52e4367bb0582d20f2325e6b5ae5
diff --git a/perl/p5-file-map/Portfile b/perl/p5-file-map/Portfile
new file mode 100644
index 0000000..49e57e2
--- /dev/null
+++ b/perl/p5-file-map/Portfile
@@ -0,0 +1,29 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem          1.0
+PortGroup           perl5 1.0
+
+perl5.setup         File-Map 0.56
+platforms           darwin
+maintainers         nomaintainer
+license             Artistic GPL-2
+
+description         Perl module for memory mapping made simple and safe
+
+long_description    ${description}
+
+checksums           sha256 960d614c038e2fb74d4a14543b82e6158d7d7e296a3acbe6a683c3280c73e535 \
+                    rmd160 a403526ea4e4d6362e6b65eedfd13b3bc915b150
+
+if {${perl5.major} != ""} {
+
+    depends_lib-append  port:p${perl5.major}-sub-exporter-progressive \
+                        port:p${perl5.major}-perlio-layers
+    depends_build-append port:p${perl5.major}-test-warn \
+                         port:p${perl5.major}-test-exception \
+                         port:p${perl5.major}-test-nowarnings
+
+}
+
+perl5.use_module_build
diff --git a/perl/p5-module-compile/Portfile b/perl/p5-module-compile/Portfile
new file mode 100644
index 0000000..c829d5c
--- /dev/null
+++ b/perl/p5-module-compile/Portfile
@@ -0,0 +1,24 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem          1.0
+PortGroup           perl5 1.0
+
+perl5.setup         Module-Compile 0.23
+platforms           darwin
+maintainers         nomaintainer
+license             Artistic GPL-2
+supported_archs     noarch
+
+description         Perl module to compile other modules
+
+long_description    ${description}
+
+checksums           sha256 2970f4e493be50a6b9efd594537a943d86e5b9721f6f35ffdbee6aef345b48a1 \
+                    rmd160 002ec2c1618c33c6d775b31f44903c289f33d9d0
+
+if {${perl5.major} != ""} {
+
+    depends_lib-append  port:p${perl5.major}-digest-sha1
+
+}
diff --git a/perl/p5-pdl-graphics-gnuplot/Portfile b/perl/p5-pdl-graphics-gnuplot/Portfile
new file mode 100644
index 0000000..4a4c2a8
--- /dev/null
+++ b/perl/p5-pdl-graphics-gnuplot/Portfile
@@ -0,0 +1,27 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem          1.0
+PortGroup           perl5 1.0
+
+perl5.setup         PDL-Graphics-Gnuplot 1.5
+platforms           darwin
+maintainers         nomaintainer
+license             Artistic GPL-2
+supported_archs     noarch
+
+description         Gnuplot-based plotting for PDL
+
+long_description    ${description}
+
+checksums           sha256 32a5f09437bf95f2b7a8791205d88bc708a15cc79f6fdf707ea5ccbf703eceb4 \
+                    rmd160 1a41c75b1b2e6e035d4d84a4e449316aa768c44e
+
+if {${perl5.major} != ""} {
+
+    depends_lib-append  port:p${perl5.major}-ipc-run \
+                        port:p${perl5.major}-pdl \
+                        port:gnuplot
+
+}
+
diff --git a/perl/p5-pdl/Portfile b/perl/p5-pdl/Portfile
index fa68d12..3751485 100644
--- a/perl/p5-pdl/Portfile
+++ b/perl/p5-pdl/Portfile
@@ -5,7 +5,7 @@ PortSystem          1.0
 PortGroup           perl5 1.0
 
 perl5.branches      5.8 5.10 5.12 5.14 5.16
-perl5.setup         PDL 2.4.11
+perl5.setup         PDL 2.006
 maintainers         saao.ac.za:tim
 license             Artistic GPL-2
 description         Perl Data Language - scientific computing capability for perl
@@ -19,25 +19,56 @@ platforms           darwin
 
 homepage            http://pdl.perl.org/
 
-checksums           rmd160  7c877c7477930a0a874190670aedc6375746c63d \
-                    sha256  c777ed2519d73ebde0d870e94931a2d2c57865abcee27dfec53f4412a2cac662
+checksums           rmd160 d95e3fcd0b350a1863c28d331a44a902ae3b44be \
+                    sha256 78119429cbe9b23387173db9c0e8c39de18a4a8ec757c10d4156fa30979d7ec5
 
 if {${perl5.major} != ""} {
-    # proj 4.7 is needed for now. https://trac.macports.org/ticket/35292
-    depends_lib-append  port:p${perl5.major}-text-balanced \
+    depends_lib-append \
+                        port:p${perl5.major}-astro-fits-header \
                         port:p${perl5.major}-inline \
+                        port:p${perl5.major}-term-readline-gnu \
                         port:p${perl5.major}-extutils-f77 \
-                        port:p${perl5.major}-gd \
-                        port:p${perl5.major}-astro-fits-header \
                         port:netpbm \
                         port:hdf5-18 \
                         port:jpeg \
                         port:gsl \
                         port:fftw-3 \
-                        port:proj47 \
                         port:pgplot \
-                        port:p${perl5.major}-term-readline-gnu \
-                        port:plplot
+                        port:p${perl5.major}-pgplot \
+                        port:plplot \
+                        port:p${perl5.major}-convert-uu \
+                        port:p${perl5.major}-file-map \
+                        port:p${perl5.major}-module-compile
+
+                        # Might be needed:
+                        # port:p${perl5.major}-gd \
+                        # port:p${perl5.major}-opengl \
+
+                        # Needed for pdl2, but no MacPort package available
+                        # and the dependency chain is very long
+                        # port:p${perl5.major}-devel-repl \
+
+                        # proj 4.7 might not be needed anymore
+                        # https://trac.macports.org/ticket/35292
+                        # port:proj47  \
+
+    # Prereqs in Makefile.PL:
+    # 'Astro::FITS::Header' => 0,
+    # 'Convert::UU'         => 0,
+    # 'Data::Dumper'        => 2.121,       # core 2.121 in 5.6.2
+    # 'ExtUtils::MakeMaker' => 6.31,        # core 6.30 in 5.8.8
+    # 'File::Map'           => 0.47,
+    # 'File::Spec'          => 0.6,         # core 0.6 in 5.00405
+    # 'File::Temp'          => 0,           # core in 5.6.1
+    # 'Filter::Util::Call'  => 0,           # core in 5.7.4
+    # 'Filter::Simple'      => 0.88,        # core, but only 0.84
+    # 'Inline'              => 0.43,
+    # 'Module::Compile'     => 0.23,
+    # 'Pod::Parser'         => 0,           # core in 5.6.0
+    # 'Pod::Select'         => 0,           # core in 5.6.0
+    # 'Storable'            => 1.03,        # core 2.04 in 5.8.0
+    # 'Text::Balanced'      => 1.89,        # core 1.89 in 5.7.3
+
 
     # pgplot is not universal
     universal_variant   no
@@ -56,4 +87,22 @@ if {${perl5.major} != ""} {
             ${worksrcpath}/Lib/Transform/Proj4/Makefile.PL \
             ${worksrcpath}/t/callext.t
     }
+
+    post-build {
+        # Create the pdldoc.db file for the help system
+        exec ${perl5.bin} -I ${worksrcpath}/blib/arch \
+            -I ${worksrcpath}/blib/lib \
+            ${worksrcpath}/Doc/scantree.pl ${worksrcpath}/blib/lib \
+            ${worksrcpath}/pdldoc.db \
+            ${worksrcpath}/blib/lib/PDL/Index.pod \
+            >/dev/null 2>/dev/null
+
+        # Rewrite the paths in the pdldoc.db file. scantree will have the
+        # ${worksrcpath}/blib/lib paths, we need ${perl5.archlib}.
+        exec ${perl5.bin} ${filespath}/fix-pdldocdb.pl \
+            ${worksrcpath}/pdldoc.db \
+            ${worksrcpath}/blib/lib/PDL/pdldoc.db \
+            "${worksrcpath}/blib/lib" \
+            "${perl5.archlib}"
+    }
 }
diff --git a/perl/p5-pdl/files/fix-pdldocdb.pl b/perl/p5-pdl/files/fix-pdldocdb.pl
new file mode 100644
index 0000000..5f2fe0a
--- /dev/null
+++ b/perl/p5-pdl/files/fix-pdldocdb.pl
@@ -0,0 +1,63 @@
+#!/usr/bin/env perl
+
+use strict;
+use warnings;
+
+my ( $src_file, $dst_file, $cur_path, $new_path ) = @ARGV;
+usage() unless $src_file && $dst_file && -e $src_file;
+usage() unless $cur_path && $new_path;
+
+sub usage {
+    warn "usage: $0 <input pdldoc.db> <output pdldoc.db>\n";
+    warn "          <current path> <path after install>\n";
+    warn @_;
+    exit 1;
+}
+
+my $hash = ensuredb( { File => [$src_file], Scanned => [], } );
+fix_directories($hash);
+savedb( { Outfile => $dst_file }, $hash );
+
+sub fix_directories {
+    my ($hash) = @_;
+
+    for my $key (%$hash) {
+        next unless exists $hash->{$key}->{File};
+        $hash->{$key}->{File} =~ s{^$cur_path}{$new_path};
+    }
+}
+
+# Taken from PDL::Doc with minor modifications
+sub ensuredb {
+    my ($this) = @_;
+    while ( my $fi = pop @{ $this->{File} } ) {
+        open IN, $fi
+          or die "can't open database $fi, scan docs first";
+        binmode IN;
+        my ( $plen, $txt );
+        while ( read IN, $plen, 2 ) {
+            my ($len) = unpack "S", $plen;
+            read IN, $txt, $len;
+            my ( $sym, %hash ) = split chr(0), $txt;
+            $this->{SYMS}->{$sym} = {%hash};
+        }
+        close IN;
+        push @{ $this->{Scanned} }, $fi;
+    }
+    return $this->{SYMS};
+}
+
+sub savedb {
+    my ( $this, $hash ) = @_;
+    ## my $hash = $this->ensuredb();
+
+    open OUT, ">$this->{Outfile}"
+      or die "can't write to symdb $this->{Outfile}";
+    binmode OUT;
+    while ( my ( $key, $val ) = each %$hash ) {
+        next unless scalar(%$val);
+        my $txt = "$key" . chr(0) . join( chr(0), %$val );
+        print OUT pack( "S", length($txt) ) . $txt;
+    }
+}
+
diff --git a/perl/p5-perlio-layers/Portfile b/perl/p5-perlio-layers/Portfile
new file mode 100644
index 0000000..e937cb7
--- /dev/null
+++ b/perl/p5-perlio-layers/Portfile
@@ -0,0 +1,25 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem          1.0
+PortGroup           perl5 1.0
+
+perl5.setup         PerlIO-Layers 0.010
+platforms           darwin
+maintainers         nomaintainer
+license             Artistic GPL-2
+
+description         Perl module for querying your filehandle's capabilities
+
+long_description    ${description}
+
+checksums           sha256 e3ab1219092be4a21df1ec48163c83b4166ca8f87d2c659b3a891837e828b271 \
+                    rmd160 00106a1e1b599f3d087f175e3b30d03498709e38
+
+if {${perl5.major} != ""} {
+
+    depends_lib-append  port:p${perl5.major}-list-moreutils
+
+}
+
+perl5.use_module_build
