Page MenuHomeFreeBSD

[NEW PORT] editors/sam: Add the sam text editor
ClosedPublic

Authored by flo_purplekraken.com on Feb 25 2023, 7:04 PM.
Referenced Files
F106369512: D38785.diff
Sun, Dec 29, 12:37 PM
Unknown Object (File)
Fri, Dec 6, 6:54 PM
Unknown Object (File)
Mon, Dec 2, 2:26 PM
Unknown Object (File)
Mon, Dec 2, 2:23 PM
Unknown Object (File)
Nov 25 2024, 4:26 AM
Unknown Object (File)
Nov 24 2024, 1:01 AM
Unknown Object (File)
Nov 22 2024, 4:30 PM
Unknown Object (File)
Nov 20 2024, 10:54 AM
Subscribers

Details

Summary

This is an updated version of the Unix port of the sam text editor from Bell Labs.

Test Plan
  • portlint: OK
  • portclippy: OK
  • poudriere testport: OK

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

flo_purplekraken.com created this revision.
editors/sam/files/patch-doc_Makefile
11 ↗(On Diff #117930)

Why replace symlinks with copies?

editors/sam/files/patch-doc_Makefile
11 ↗(On Diff #117930)

Because otherwise, make stage-qa complains about symlinks into the staging area:

====> Running Q/A tests (stage-qa)
Error: Bad symlink 'share/man/man1/samterm.1.gz' pointing inside the stage directory
Error: Bad symlink 'share/man/man1/sam.save.1.gz' pointing inside the stage directory
Error: Bad symlink 'share/man/man1/B.1.gz' pointing inside the stage directory
Error: Bad symlink 'share/man/man1/rsam.1.gz' pointing inside the stage directory
*** Error code 1
editors/sam/files/patch-doc_Makefile
11 ↗(On Diff #117930)

Since all these man pages are in the same directory, just make the link relative:

ln -sf "sam.1" "$(MANDIR)/man1/B.1"

diizzy added inline comments.
editors/sam/Makefile
24

You probabaly want USES= localbase:ldflags instead?

editors/sam/files/patch-doc_Makefile
11 ↗(On Diff #117930)

Since we seem to patch quite a lot perhaps its worth considering not executing "make install" at all and use ${RLN) etc in do-install section?

flo_purplekraken.com edited the test plan for this revision. (Show Details)
flo_purplekraken.com marked 3 inline comments as done.
flo_purplekraken.com added inline comments.
editors/sam/Makefile
24

I did not know about it, a big improvement. Thanks.

editors/sam/files/patch-doc_Makefile
11 ↗(On Diff #117930)

I updated the diff, but I'm not sure about the ${RLN} usage.

editors/sam/Makefile
31

Having a quick look it seems like you can reduce do-install to:

${INSTALL_PROGRAM} ${WRKSRC}/sam/sam ${STAGEDIR}${PREFIX}/bin
${RLN} ${STAGEDIR}${PREFIX}/bin/sam ${STAGEDIR}${PREFIX}/bin/B
${INSTALL_PROGRAM} ${WRKSRC}/samterm/samterm ${STAGEDIR}${PREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/ssam/ssam.sh ${STAGEDIR}${PREFIX}/bin/ssam
${INSTALL_MAN} ${WRKSRC}/doc/sam.1 ${STAGEDIR}${PREFIX}/share/man/man1
${RLN} ${STAGEDIR}${PREFIX}/share/man/man1/sam.1 ${STAGEDIR}${PREFIX}/share/man/man1/B.1
${RLN} ${STAGEDIR}${PREFIX}/share/man/man1/sam.1 ${STAGEDIR}${PREFIX}/share/man/man1/samterm.1
${RLN} ${STAGEDIR}${PREFIX}/share/man/man1/sam.1 ${STAGEDIR}${PREFIX}/share/man/man1/rsam.1
${RLN} ${STAGEDIR}${PREFIX}/share/man/man1/sam.1 ${STAGEDIR}${PREFIX}/share/man/man1/sam.save.1
${INSTALL_MAN} ${WRKSRC}/doc/samrc.5 ${STAGEDIR}${PREFIX}/share/man/man5
editors/sam/Makefile
24

-I${LOCALBASE}/include/freetype2 seems to work fine? :-)

editors/sam/Makefile
24

Well, this habit is a result of working with too many bad libraries professionally ;)
I'll change it to -I.

31

I missed that the libraries are static only, thanks for the hint!

flo_purplekraken.com edited the test plan for this revision. (Show Details)

Incorporate the feedback from Daniel, which brings much improvement.

editors/sam/Makefile
28

No need for < redirection here.

editors/sam/Makefile
13

Sort these uses.

20

Sort these values.

24

You don't seem to depend on freetype2.

editors/sam/Makefile
20

Are these not already sorted?

editors/sam/Makefile
20

Yes, sorry.

Add missing dependency on print/freetype2

flo_purplekraken.com added inline comments.
editors/sam/Makefile
24

The dependency was actually missing, thanks for catching it!

This revision is now accepted and ready to land.Mar 4 2023, 12:25 PM