Page MenuHomeFreeBSD

New Port: textproc/smi
ClosedPublic

Authored by junovitch on Sep 4 2015, 1:13 PM.

Details

Summary
New Port: textproc/smi
Smi is a Simple Markup Interpreter / filter for simplified Markup dialect.
smi can be fed text in Markdown, and return HTML output.  smi can be fed
HTML, and return the markup translated to entities.  I use smi as a filter
for devel/cgit to parse the README.md files, returning HTML output.  I am
also using it to markup wiki pages, for a git backed wiki.  The use cases
are limited only by your imagination.

WWW: http://BSDforge.com/projects/textproc/smi/

PR:		196224
Submitted by:	Chris Hutchinson <portmaster@bsdforge.com>
Approved by:	feld|delphij|pgollucci (mentor)
Test Plan

Poudriere:
https://bugs.FreeBSD.org/bugzilla/show_bug.cgi?id=196224#c5

Portlint:
portlint -AC

looks fine.

Runtime:
The port appears to convert markdown to HTML as intended.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

junovitch updated this revision to Diff 8490.Sep 4 2015, 1:13 PM
junovitch retitled this revision from to New Port: textproc/smi.
junovitch updated this object.
junovitch edited the test plan for this revision. (Show Details)
junovitch added reviewers: feld, delphij, pgollucci.
feld requested changes to this revision.Sep 4 2015, 2:38 PM
feld edited edge metadata.
feld added inline comments.
textproc/smi/Makefile
7 ↗(On Diff #8490)

use ${PORTNAME} instead of smi -- less churn if the software is ever renamed

23 ↗(On Diff #8490)

I opened up the config.mk. I personally would prefer to be a bit more specific on this REINPLACE in the event that somehow "cc" ends up elsewhere in the file (unlikely, but I'm paranoid). It also has "g" for global replace, but you really only intend to replace it once... get what I mean?

Also, there's the following in config.mk:

# paths
PREFIX = /usr/local
MANPREFIX = ${PREFIX}/share/man

/usr/local shouldn't be hardcoded and neither should MANPREFIX as these are fully configurable in the ports tree.

I'm curious to know if this thing would be perfectly happy with changing CC = to CC ?=, etc. If so, you could just do something like:

@${REINPLACE_CMD} -e 's|^CC =|CC ?=|' -e 's|^PREFIX =|PREFIX ?=|' -e 's|^MANPREFIX =|MANPREFIX ?=|' ${WRKSRC}/config.mk
This revision now requires changes to proceed.Sep 4 2015, 2:38 PM

Noted. I'll address these and follow up at a later date.

junovitch updated this revision to Diff 8621.Sep 9 2015, 12:33 PM
junovitch edited edge metadata.

Address comments

junovitch marked 2 inline comments as done.Sep 9 2015, 12:44 PM

Much of this appeared to be a hold over from the original textproc/smu port (https://github.com/Gottox/smu) that this is based on. If this is approved, I'll push the suggestions over to the textproc/smu maintainer as they are valid there.

The upstream went to Github just before the PR was submitted in December 2014. Keeping all the legacy probably made sense then Chris said he has been working new features he intended to get in after this port was added. If that is the case, he can address them in the smi port code rather than needing to address this in ports.

textproc/smi/Makefile
24 ↗(On Diff #8621)

The ?= is a shell parse error on the port but I've addressed the intent of this. I've tested with PREFIX=/opt and CC=gcc48 in my make.conf and validated that this does the right thing.

pgollucci accepted this revision.Sep 9 2015, 9:16 PM
pgollucci edited edge metadata.
This revision was automatically updated to reflect the committed changes.