From 1aaf21b9a060a57bffb93165f857437852eb3bae Mon Sep 17 00:00:00 2001 From: srirangav Date: Tue, 17 Dec 2024 10:07:44 -0800 Subject: [PATCH] txt2html: update to 3.0 Closes: https://trac.macports.org/ticket/71566 --- textproc/txt2html/Portfile | 62 +++++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 25 deletions(-) diff --git a/textproc/txt2html/Portfile b/textproc/txt2html/Portfile index 05e6811fca937..ac3f0e2afc9b4 100644 --- a/textproc/txt2html/Portfile +++ b/textproc/txt2html/Portfile @@ -1,12 +1,14 @@ -PortSystem 1.0 +PortSystem 1.0 +PortGroup perl5 1.0 +PortGroup github 1.0 -name txt2html -version 1.35 +github.setup resurrecting-open-source-projects txt2html 3.0 v +github.tarball_from archive +revision 0 categories textproc license BSD maintainers nomaintainer description Convert ASCII text to HTML -homepage http://www.aigeek.com/txt2html/ platforms any supported_archs noarch @@ -17,26 +19,36 @@ long_description txt2html is a Perl program that converts plain text to \ (whitespace, typographic layout, etc.), and attempts to \ mark that structure explicitly using HTML. -master_sites sourceforge - -extract.suffix .tgz -checksums md5 ba007af9d0681b3f493c84869b147071 +checksums rmd160 144e9514e7137f682a738fa25ead029241d0bc31 \ + sha256 6a2d23a23dd7d06cac0d383745bf456754da4992b5f2f4536d478a46d3a8e57e \ + size 140611 use_configure no -post-configure { reinplace "s|/usr/share/misc|${prefix}/share/${name}|g" \ - ${worksrcpath}/${name}.pl } - -build {} - -destroot { system "install -m 755 -d ${destroot}${prefix}/bin" - system "install -m 755 ${worksrcpath}/${name}.pl \ - ${destroot}${prefix}/bin/${name}" - system "install -m 755 -d \ - ${destroot}${prefix}/share/${name}" - system "install -m 644 ${worksrcpath}/${name}.dict \ - ${destroot}${prefix}/share/${name}" - system "install -m 755 -d \ - ${destroot}${prefix}/share/doc/${name}" - system "install -m 644 ${worksrcpath}/* \ - ${destroot}${prefix}/share/doc/${name}" - system "rm ${destroot}${prefix}/share/doc/${name}/${name}.*" } +perl5.use_module_build + +depends_lib-append \ + port:p${perl5.major}-getopt-long \ + port:p${perl5.major}-getopt-argvfile \ + port:p${perl5.major}-yaml-syck + +# Also requires: Pod::Usage, Test::More but those should be in any +# non-obsolete Perl's core modules. + +post-patch { + reinplace "s|/usr/bin/env perl|${perl5.bin}|" ${worksrcpath}/scripts/${name} +} + +configure { + system -W ${worksrcpath} "'${perl5.bin}' './Build.PL' \ + '--install_base' '${prefix}'" +} + +post-destroot { + file mkdir ${destroot}${prefix}/lib/perl5/${perl5.major} + move ${destroot}${prefix}/lib/perl5/HTML \ + ${destroot}${prefix}/lib/perl5/${perl5.major} + move ${destroot}${prefix}/man/man1/txt2html.1pm \ + ${destroot}${prefix}/share/man/man1 + move ${destroot}${prefix}/man/man3/HTML::TextToHTML.3pm \ + ${destroot}/${prefix}/share/man/man3 +}