Page MenuHomeFreeBSD

New port: devel/grantlee5 and Uses/

Authored by tcberner on Aug 7 2016, 10:04 PM.
Referenced Files
Unknown Object (File)
Sat, Sep 30, 4:33 PM
Unknown Object (File)
Tue, Sep 19, 10:50 AM
Unknown Object (File)
Tue, Sep 19, 10:50 AM
Unknown Object (File)
Tue, Sep 19, 10:50 AM
Unknown Object (File)
Tue, Sep 19, 10:49 AM
Unknown Object (File)
Tue, Sep 19, 10:48 AM
Unknown Object (File)
Tue, Sep 19, 10:48 AM
Unknown Object (File)
Tue, Sep 19, 10:47 AM



The upcoming KDE Frameworks ports need grantlee5

  • Add devel/grantlee5 and move installed headers into a subdirectory include/grantlee5
  • Move header files from devel/grantlee into a subdirectory


   to make sure ports do not pick up the wrong headers
*  Add Uses/ to handle the PLIST_SUB and LIB_DEEPENDS needed 
   by ports using grantlee (before we set the PLIST_SUB manual in very
   of the depending ports, which now should not be needed anymore).  
*  The ports depending on devel/grantlee have been version bumped
   and modified from
Test Plan

Tested in poudriere.
[And has been used in the experimental KDE repo for quite a while].

Diff Detail

rP FreeBSD ports repository
Lint Not Applicable
Tests Not Applicable

Event Timeline

tcberner retitled this revision from to New port: devel/grantlee5 and Uses/
tcberner updated this object.
tcberner edited the test plan for this revision. (Show Details)
tcberner added reviewers: rakuco, mat.
1–15 ↗(On Diff #19108)

Try to use the same format as other USES, first the feature/usage/args, then a description of the args, then what it is for and all.

6 ↗(On Diff #19108)

Use english :-)

17 ↗(On Diff #19108)

MAINTAINER should be email addresses.

47 ↗(On Diff #19108)

This feels like being missnomed, it should only contain the library name *.so, or be called *_LIB_DEPEND or something.

50 ↗(On Diff #19108)

My first reaction was to say "use a more specifc term and not SHLIB_VER" but then, I read the grantlee 4 port.
After reading it, I would say change the build argument to a selfbuild or something, so that people do not get tempted to use it to only add a BUILD_DEPEND.

Also, make sure to svn cp grantlee grantlee5 before committing.

I think some things should be done differently to make this patch smaller and easier to understand:

  • USES=grantlee:build is confusing, as mat already pointed out. I'd go further than what him and suggest it's dropped altogether: in general, Uses/ is used by ports depending on foo, not foo itself. I don't think it's bad to move grantlee:build's logic to the grantlee ports themselves.
  • As usual, I'm not a big fan of those sed calls in devel/grantlee and devel/grantlee5. Proper patches with more context such as Fedora's are easier to understand.

I was also going to suggest not changing devel/grantlee's installation paths, but I guess this doesn't work if some port passes -I/usr/local/include to the compiler too early.

4 ↗(On Diff #19108)

Gitorious no longer exists; I've updated devel/grantlee's WWW in rP419815, you should do the same to grantlee5.

tcberner edited edge metadata.
  • Rewrite the comments in
  • rename 'build' to 'selfbuild'
  • rename *_LIB to *_LIB_DEPEND
  • update WWW

mark stuff done

@rakuco I kept selfbuild as it allows us to only define the versions inside and suck them into the Makefiles of devel/grantlee and devel/grantlee5.

mat edited edge metadata.
This revision is now accepted and ready to land.Aug 11 2016, 3:30 PM

I still think can be improved (please don't take it as bikeshedding):

  • The documentation at the top should mention that additional variables are available in PLIST_SUB. Similarly, if GRANTLEE_VERSION is a public variable it should be documented.
  • You can get rid of GRANTLEE_LIB_DEPEND.
  • If you rename the SHLIB_VER plist substitution to something less generic, I don't see why not make both that variable and GRANTLEE_VER available to all ports (plus AFAIK "shlib version" refers to the first number in the version field and what the binaries actually depend on in the ELF header, and it would be "0" in this case).

In the end, I'm thinking of something like this:

# ...


.if empty(grantlee_ARGS:Mselfbuild)
LIB_DEPENDS+= ${GRANTLEE${_grantlee_version}_LIB_DEPEND}


(the PLIST_SUB names above are suggestions and may be too long)

tcberner edited edge metadata.
tcberner marked an inline comment as done.

Rename the plist subs to the suggested names, and increase the documentation
in Further do the suggested simplification of

This revision now requires review to proceed.Aug 14 2016, 7:34 PM

One thing that has just occurred to me is that the PORTREVISION bumps in the non-grantlee ports are not necessary: the dependencies remain the same (especially if you use in GRANTLEE4_LIB_DEPEND) and the plist also remains identical, everything you're changing do not reflect in changes in the generated packages.

tcberner edited edge metadata.

Get rid of PORTREVISION bumps, and set GRANTLEE4_LIB_DEPEND to

rakuco edited edge metadata.

lgtm at last :-)

This revision is now accepted and ready to land.Aug 14 2016, 9:21 PM

Oh, now that I think about it, could you run the file through the indenter I wrote a while back ?

Tools/scripts/ Mk/Uses/

I will run all the Mk files through it at one point, and it would be nice if new files were already indented the same way.

Also, don't forget to edit devel/Makefile to hook the new port to the build.

tcberner edited edge metadata.

Run the ident-script on and add grantlee5 to devel/Makefile

This revision now requires review to proceed.Aug 15 2016, 3:05 PM
tcberner edited edge metadata.

Fixup svn properties.

rakuco edited edge metadata.

lgtm, thank you

This revision is now accepted and ready to land.Aug 15 2016, 3:21 PM
This revision was automatically updated to reflect the committed changes.