Bug 174064 - [PATCH] misc/figlet: update to 2.2.5, OptionsNG, added options for fonts, Makefile.man
Summary: [PATCH] misc/figlet: update to 2.2.5, OptionsNG, added options for fonts, Mak...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: David E. O'Brien
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-02 21:30 UTC by nemysis
Modified: 2012-12-04 18:00 UTC (History)
1 user (show)

See Also:


Attachments
figlet-2.2.5.patch (5.54 KB, patch)
2012-12-02 21:30 UTC, nemysis
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description nemysis 2012-12-02 21:30:00 UTC
- Update to 2.2.5

Added file(s):
- Makefile.man

Removed file(s):
- files/patch-aa
- files/patch-ab

Makefile changed:
+DIST_SUBDIR=	${PORTNAME}
+PORTDOCS=	CHANGES FAQ README figfont.txt
+OPTIONS_DEFINE=	FONTS
+OPTIONS_DEFAULT=	FONTS
+FONTS_DESC=	Install additional fonts for FIGlet
+.include "Makefile.man"
+.include <bsd.port.options.mk>
+.if ${PORT_OPTIONS:MFONTS}
+post-patch:
+post-install:
+.if ${PORT_OPTIONS:MDOCS}

Changed and refined:
 do-install:
 pkg-descr
 pkg-plist

I can take maintainership if the maintainer approve.

Port maintainer (obrien@FreeBSD.org) is cc'd.

Generated and tested manually, tested with port test, sent with FreeBSD Port Tools 0.99_6 (mode: update, diff: ports)

How-To-Repeat: 
portlint -A
looks fine.

port test: clean
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-12-02 21:30:17 UTC
Responsible Changed
From-To: freebsd-ports-bugs->obrien

Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=174064 

Date: Mon, 3 Dec 2012 20:10:11 -0800
Comment 2 nemysis 2012-12-04 10:31:54 UTC
On Mon, 3 Dec 2012 20:10:11 -0800
David O'Brien <obrien@FreeBSD.org> wrote:

> On Sun, Dec 02, 2012 at 10:25:33PM +0100, nemysis wrote:
> > >Description:
> > - Update to 2.2.5
> 
> I've updated the port to 2.2.5.

Thanks for update.
 
> > Added file(s):
> > - Makefile.man
> 
> Maybe I missed something -- is this part of PkgNG?
> Otherwise, why the need to complicate things for 4 lines?

With Makefile.man this Port install all Man Pages not only one, please look bellow.

> 
> > Removed file(s):
> > - files/patch-aa
>
> Why remove patch-aa?  It causes the wrong CFLAGS to be used:
> 
> gcc -c -g -O2 -Wall -DTLF_FONTS -DDEFAULTFONTDIR=\"/usr/local/share/figlet\" -DDEFAULTFONTFILE=\"standard\"
>     -vs.-
> cc -c  -fno-omit-frame-pointer -O2 -fno-strict-aliasing -pipe -march=opteron-sse3 -DTLF_FONTS -DDEFAULTFONTDIR=\"/usr/local/share/figlet\" -DDEFAULTFONTFILE=\"standard\"
> 
> It also causes the wrong compiler to be used -- GCC hard coded instead of
> allowing bsd.port.mk to choose the desired compiler.
> 
> Unless one uses this dance:
> 
> > +post-patch:
> > +	${REINPLACE_CMD} \
> > +	-e 's|CC	= gcc|CC	?= gcc|' \
> > +	-e 's|^CFLAGS.*|CFLAGS	?=|' \
> > +	-e 's|prefix	= /usr/local|PREFIX	=${PREFIX}|' \
> > +	-e 's|^DEFAULTFONTDIR.*|DEFAULTFONTDIR	=${DATADIR}|' \
> > +		${WRKSRC}/Makefile
> 
> 
> I think the patch is the easier way.  Or was there a bug you were
> addressing?

Have removed files/patch-aa according to

http://www.freebsd.org/doc/en/books/porters-handbook/slow-patch.html

Simple replacements can be performed directly from the port Makefile using the in-place mode of sed(1).
This is very useful when you need to patch in a variable value.

And i have used this dance in Makefile because is considered.
 
> 
> > - files/patch-ab
> 
> Why remove patch-ab?  It still applies and I think the content is still
> useful.

Patch
files/patch-ab

have been used to replace content of man pages

chkfont.6 figlet.6 figlist.6

and originally is only installed

/usr/local/man/man6/figlet.6.gz


Now with mine changes and Makefile.man are installed

/usr/local/man/man6/chkfont.6.gz
/usr/local/man/man6/figlet.6.gz
/usr/local/man/man6/figlist.6.gz
/usr/local/man/man6/showfigfonts.6.gz

> 
> > Makefile changed:
> > +OPTIONS_DEFINE=	FONTS
> > +OPTIONS_DEFAULT=	FONTS
> > +FONTS_DESC=	Install additional fonts for FIGlet
> ...
> > +.if ${PORT_OPTIONS:MFONTS}
> > +RUN_DEPENDS+=	1943____.flf:${PORTSDIR}/misc/figlet-fonts
> > +.endif
> 
> I am not a fan of options at all.  The new-style PkgNG ones are much
> better though, so I'll read thru this and see what I feel may be useful
> to add.

Yes PkgNG is better but normally binary packages not have Options, and this
is needed to install additional Fonts, for this i have made an other PR

ports/174063 : [PATCH] misc/figlet-fonts: update to 20121202, take maintainership

> 
> > I can take maintainership if the maintainer approve.
> > Port maintainer (obrien@FreeBSD.org) is cc'd.
> 
> Thank you for the offer, but I'm happily maintaining figlet.
> 

Thanks for your patience with me.

Regards,
nemysis
Comment 3 David E. O'Brien freebsd_committer freebsd_triage 2012-12-04 17:21:36 UTC
On Tue, Dec 04, 2012 at 11:31:54AM +0100, nemysis wrote:
> > > +.if ${PORT_OPTIONS:MFONTS}
> > > +RUN_DEPENDS+=	1943____.flf:${PORTSDIR}/misc/figlet-fonts
> > > +.endif
...
> Yes PkgNG is better but normally binary packages not have Options, and this
> is needed to install additional Fonts, for this i have made an other PR

Please note that misc/figlet-fonts/Makefile already has a RUN_DEPENDS (as
it should):

	RUN_DEPENDS=	figlet:${PORTSDIR}/misc/figlet

adding a RUN_DEPENDS in misc/figlet/Makefile would create a circular
dependency.  Besides, these additional fonts are not a run-time
dependency of figlet.  figlet runs just fine without them.

-- 
-- David  (obrien@FreeBSD.org)
Comment 4 David E. O'Brien freebsd_committer freebsd_triage 2012-12-04 17:47:06 UTC
On Tue, Dec 04, 2012 at 11:31:54AM +0100, nemysis wrote:
> Yes PkgNG is better but normally binary packages not have Options, and this
> is needed to install additional Fonts, for this i have made an other PR
> 
> ports/174063 : [PATCH] misc/figlet-fonts: update to 20121202, take maintainership

I took a quick look at PR 174063:

-RUN_DEPENDS=   figlet:${PORTSDIR}/misc/figlet

You may want to leave that in.  I won't be adding a RUN_DEPENDS for
figlet on the optional figlet-fonts.

-- 
-- David  (obrien@FreeBSD.org)
Comment 5 David E. O'Brien freebsd_committer freebsd_triage 2012-12-04 17:55:43 UTC
State Changed
From-To: open->closed

Port updated and some other additions committed. 
thanks!
Comment 6 nemysis 2012-12-04 17:58:50 UTC
On Tue, 4 Dec 2012 09:21:36 -0800
David O'Brien <obrien@FreeBSD.org> wrote:

> On Tue, Dec 04, 2012 at 11:31:54AM +0100, nemysis wrote:
> > > > +.if ${PORT_OPTIONS:MFONTS}
> > > > +RUN_DEPENDS+=	1943____.flf:${PORTSDIR}/misc/figlet-fonts
> > > > +.endif
> ...
> > Yes PkgNG is better but normally binary packages not have Options, and this
> > is needed to install additional Fonts, for this i have made an other PR
> 
> Please note that misc/figlet-fonts/Makefile already has a RUN_DEPENDS (as
> it should):
> 
> 	RUN_DEPENDS=	figlet:${PORTSDIR}/misc/figlet
> 
> adding a RUN_DEPENDS in misc/figlet/Makefile would create a circular
> dependency.  Besides, these additional fonts are not a run-time
> dependency of figlet.  figlet runs just fine without them.
> 

Yes i knew this and have removed this dependency in mine PR for

[PATCH] misc/figlet-fonts: update to 20121202, take maintainership

I have added this to mine PR just now

RUN_DEPENDS=	figlet:${PORTSDIR}/misc/figlet

Regards,
nemysis