Skip to content
Permalink
Browse files

cpan2port: various improvements

* Use full shasum
* Download to macports-contrib in case any other ports need the same files
* Properly define $worksrcdir
* Enable livecheck
  • Loading branch information
mojca committed Feb 28, 2018
1 parent 563b3bc commit e9a2456b83a31d2133a43afd841656e269a31ebd
Showing with 7 additions and 9 deletions.
  1. +7 −9 sysutils/cpan2port/Portfile
@@ -4,10 +4,8 @@ PortSystem 1.0
PortGroup github 1.0
PortGroup perl5 1.0

set git_shasum 4207b22
github.setup macports macports-contrib 4207b227800b8ce6ba7db02641a1b1a66b3218de
set git_date 20180228

github.setup macports macports-contrib ${git_shasum}
name cpan2port
version 0.1.1_${git_date}
categories sysutils macports perl
@@ -35,8 +33,11 @@ depends_run-append port:p${perl5.major}-carp-clan \
port:p${perl5.major}-pod-simple \
port:p${perl5.major}-yaml

dist_subdir macports-contrib
worksrcdir ${worksrcdir}/${name}

configure {
reinplace "s|#! /usr/bin/env perl|#!${prefix}/bin/perl${perl5.major}|g" ${worksrcpath}/${name}/${name}
reinplace "s|#! /usr/bin/env perl|#!${prefix}/bin/perl${perl5.major}|g" ${worksrcpath}/${name}
}

# should be implied by overriding configure:
@@ -45,10 +46,7 @@ configure.ccache no
build {}

destroot {
xinstall -m 755 ${worksrcpath}/${name}/${name} ${destroot}${prefix}/bin/${name}
xinstall -m 755 ${worksrcpath}/${name} ${destroot}${prefix}/bin/${name}
xinstall -d ${destroot}${prefix}/share/doc/${name}
xinstall -m 644 ${worksrcpath}/${name}/COPYING ${destroot}${prefix}/share/doc/${name}/COPYING
xinstall -m 644 ${worksrcpath}/COPYING ${destroot}${prefix}/share/doc/${name}/COPYING
}

# TODO: check the latest revision of the file
livecheck.type none

0 comments on commit e9a2456

Please sign in to comment.
You can’t perform that action at this time.