Ticket #16830: perl5.Portfile.diff

File perl5.Portfile.diff, 3.7 KB (added by ghosthound, 15 years ago)

patch for perl5 Portfile to clean it up, default to perl5.8, variant perl5_10 for perl5.10

  • Portfile

     
    88categories      lang
    99platforms       darwin freebsd linux
    1010maintainers     ricci mcalhoun
    11 #description     Perl 5 - Practical Extraction and Report Language (maintenance release)
     11depends_lib     port:perl5.8
    1212
    13 #long_description \
    14 #    Perl is a general-purpose programming language originally developed \
    15 #    for text manipulation and now used for a wide range of tasks including \
    16 #    system administration, web development, network programming, GUI \
    17 #    development, and more.
     13description         Virtual port for the latest perl 5.x
     14long_description    ${description}
    1815
    19 #distname        perl-${version}
    20 #use_bzip2       yes
    2116homepage        http://www.perl.org/
    22 #master_sites    http://www.cpan.org/src/
     17master_sites   
     18distfiles
    2319
    24 #checksums        \
    25 #    md5     1cb52a76ce77fa300218da96577793ec \
    26 #    sha1    19843b5a7585cf35d96c07dbcd419bbdd5813617 \
    27 #    rmd160  680004238d626ec985075e1b4519b7f0b34f57e5
    28 
    29 #post-patch {
    30 #    reinplace "s|/opt/local|${prefix}|g" ${worksrcpath}/Configure
    31 #    # Ensure that the ld value set in configure.args is used
    32 #    reinplace "s|ld='cc';||" ${worksrcpath}/hints/darwin.sh
    33 #}
    34 
    35 #configure.env       LC_ALL=C
    36 #configure.cmd       /bin/sh Configure
    37 #configure.pre_args
    38 #configure.args \
    39 #    -des \
    40 #    -D prefix='${prefix}' \
    41 #    -D cppflags="\${CPPFLAGS}" \
    42 #    -D ldflags="\${LDFLAGS}" \
    43 #    -D vendorprefix='${prefix}' \
    44 #    -D man3ext='3pm' \
    45 #    -D cc=\${CC} \
    46 #    -D ld=\${CC}
    47 
    48 #set exclude_libs {bind gdbm db}
    49 
    50 #post-patch {
    51 #    foreach lib ${exclude_libs} {
    52 #        configure.args-append  -U i_${lib}
    53 #        reinplace "s|\\(libswanted=.*\\)${lib} *\\(.*\\)|\\1\\2|" ${worksrcpath}/Configure
    54 #    }
    55 #}
    56 
    5720universal_variant   no
    5821
    59 #test.run            yes
    60 
    61 #post-destroot {
    62 #    ln -s perl${version} ${destroot}${prefix}/bin/$name
    63 #}
    64 
    65 #variant threads description {Build with thread support} {
    66 #    configure.args-append   -Dusethreads
    67 #}
    68 
    69 #variant shared description {Build shared perl library} {
    70 #    configure.args-append   -Duseshrplib
    71 #}
    72 
    73 #variant gdbm description {Build with gdbm support} {
    74 #    depends_lib-append port:gdbm
    75 #    set exclude_libs [ldelete ${exclude_libs} gdbm]
    76 #}
    77 
    78 #variant db description {Build with Berkeley Data Base support} {
    79 #    depends_lib-append port:db47
    80 #    set exclude_libs [ldelete ${exclude_libs} db]
    81    
    82 #    post-patch {
    83 #        reinplace "s|${prefix}/include|${prefix}/include ${prefix}/include/db47|g" ${worksrcpath}/Configure
    84 #        reinplace "s|${prefix}/lib|${prefix}/lib ${prefix}/lib/db47|g" ${worksrcpath}/Configure
    85 #    }
    86 #}
    87 
    88 #livecheck.type  regex
    89 #livecheck.url   http://www.cpan.org/src
    90 #livecheck.regex {perl-(5\.8\.\d)\.}
    91 
    92 
    93 #######################################################
    94 fetch {}
    95 checksum {}
    96 extract {}
    9722use_configure       no
    9823build {}
    99 description Placeholder port. See http://trac.macports.org/ticket/16830
    100 long_description ${description}
    101 destroot {
    102     xinstall -d ${destroot}${prefix}/share/doc/${name}
    103     system "echo ${long_description} > ${destroot}${prefix}/share/doc/${name}/README.txt"
     24destroot {}
     25
     26variant perl5_10 description { use perl 5.10 instead of perl 5.8 } {
     27    depends_lib-delete  port:perl5.8
     28    depends_lib-append  port:perl5.10
     29
     30    version 5.10
    10431}
    105 archive {}
    106 livecheck.type      none
    107 master_sites
    108 depends_lib port:perl5.8
    10932
    11033post-destroot {
     34## XYZZY: add check that the files on both sides of the link do and do not exist:
    11135    ln -s perl${version} ${destroot}${prefix}/bin/$name
    11236}
    113 #######################################################
     37livecheck.type     none