-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
txt2html: update to 3.0 #27115
base: master
Are you sure you want to change the base?
txt2html: update to 3.0 #27115
Conversation
afde60b
to
9d7b3ba
Compare
Please add this line to the commit message. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- referenced existing tickets on Trac with full URL in commit message?
Please add to the commit message the line:
Closes: https://trac.macports.org/ticket/71566
textproc/txt2html/Portfile
Outdated
configure { system "cd ${worksrcpath} && \ | ||
'${perl5.bin}' './Build.PL' '--install_base' '${prefix}'" } | ||
|
||
build { system "cd ${worksrcpath} && \ | ||
'${perl5.bin}' '${worksrcpath}/Build'" } | ||
|
||
destroot { system "cd ${worksrcpath} && \ | ||
'${perl5.bin}' '${worksrcpath}/Build' 'install' \ | ||
'destdir=${destroot}'" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You shouldn't need to override these phases with custom commands; the standard method used by the perl5 portgroup should work and will add a variety of arguments and environment variables that enable MacPorts features users expect.
You should almost never need to use cd
in a system
command; use system
's -W
flag instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You shouldn't need to override these phases with custom commands; the standard method used by the perl5 portgroup should work and will add a variety of arguments and environment variables that enable MacPorts features users expect.
You should almost never need to use
cd
in asystem
command; usesystem
's-W
flag instead.
I have updated the Portfile to use the default Perl5 build system as much as possible.
I couldn't figure out how to have the default Perl5 build system supply the --install-base argument to the Build.PL script, so I kept the configure{} phase, but I used the system -W command as you suggested.
Also, I kept a modified version of the post-destroot{} phase to fix warnings about the man pages and perl5 libraries not being installed in the correct /opt/local directories.
Please let me know if I can simplify this further.
Thanks!
textproc/txt2html/Portfile
Outdated
post-destroot { system "mkdir '${destroot}/${prefix}/lib/perl5/${perl5.major}' && \ | ||
mv '${destroot}/${prefix}/lib/perl5/HTML' \ | ||
'${destroot}/${prefix}/lib/perl5/${perl5.major}'" | ||
system "mv '${destroot}/${prefix}/man/man1/txt2html.1pm' \ | ||
'${destroot}/${prefix}/share/man/man1/'" | ||
system "mv '${destroot}/${prefix}/man/man3/HTML::TextToHTML.3pm' \ | ||
'${destroot}/${prefix}/share/man/man3/'" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use system
for something Tcl can do natively. (All of these commands can be done natively.)
The value of ${prefix}
already begins with a /
so it is an error to literally precede ${prefix}
with another /
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have made these changes.
system "install -m 644 ${worksrcpath}/* \ | ||
${destroot}${prefix}/share/doc/${name}" | ||
system "rm ${destroot}${prefix}/share/doc/${name}/${name}.*" } | ||
# -*- 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You've changed the whitespace of the entire file in addition to making functional changes, making it very hard to identify and review the functional changes. Please separate whitespace-only changes into a separate commit, if they must be done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reverted the whitespace changes and only included functional changes in my latest commit. Thanks.
textproc/txt2html/Portfile
Outdated
categories textproc | ||
license BSD | ||
maintainers nomaintainer | ||
homepage ${github.homepage} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove this line. github.setup
does this for you automatically.
homepage ${github.homepage} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have removed this line. Thanks.
textproc/txt2html/Portfile
Outdated
checksums md5 037f5fdfae92181d2bb7abfb443f6949 \ | ||
rmd160 fd91190626dbf6727fac8b027b8e8fa349168450 \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The MD5 algorithm is obsolete and there's no value to including it here.
checksums md5 037f5fdfae92181d2bb7abfb443f6949 \ | |
rmd160 fd91190626dbf6727fac8b027b8e8fa349168450 \ | |
checksums rmd160 fd91190626dbf6727fac8b027b8e8fa349168450 \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have removed md5 from the checksums. Thanks.
9d7b3ba
to
f1d3efd
Compare
I have updated the commit message and the comment above with this. |
I have checked this box in the comment above, and have updated the comment and the commit message. |
textproc/txt2html/Portfile
Outdated
@@ -1,12 +1,12 @@ | |||
PortSystem 1.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add another commit with non-functional changes where you fix the whitespace issues (i.e., with spaces in multiples of four).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once this pull request is merged, I will create a new pull request that fixes the whitespace issues and updates the revision to 1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, there is no need to increase the "recision" but you'll need to correct the whitespace formatting before we'll merge this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @reneeotten,
Would you like me to make a separate commit on top of the one I've already made that includes the whitespace changes? If so, I would be happy to do that.
I'm asking, because normally I just amend my existing commit when fixing issues.
Thanks,
-ranga
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can amend for now. What I meant to say is that normally you would separate functional changes and whitespace changes in two separate commits. However, here you introduce wrong alignment while doing the update so it's fine to correct that and then amend your commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, I have changed the space on this line to a tab to match the existing formatting. Let me know if I should revert this and instead update the lines I added / changed to use the usual formatting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the whole Portfile should adhere to the correct whitespace....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @reneeotten,
I have pushed a new commit with whitespace changed. Please let me know if this commit is okay.
Thanks,
-ranga
f1d3efd
to
bb5f801
Compare
bb5f801
to
1aaf21b
Compare
1aaf21b
to
0ca0c14
Compare
Description
Update txt2html port to version 3.0 (the current version of the port apparently does not work with perl 5.30 and newer, as recently reported on macports-users).
Closes: https://trac.macports.org/ticket/71566
Type(s)
Tested on
macOS 13.7.1 22H221 arm64
Xcode 14.3.1 14E300c
Verification
Have you
port lint
?sudo port test
?sudo port -vst install
?