Hi Ingo --
On 08/15/18 15:51, Ingo Schwarze wrote:
Hi Anton,
Anton Lindqvist wrote on Wed, Aug 15, 2018 at 08:38:46PM +0200:
This is an upcoming dependency for textproc/lowdown and also my first
time porting a library(!).
While kristaps@ is famous for writing great code, he is also somewhat
well-known for declaring random fragments of his code as "libraries"
that probably shouldn't be public libraries.
Is libdiff used by anything else besides lowdown?
If not, should it maybe just be part of the lowdown port,
using two DISTFILES as explained in bsd.port.mk(5)?
This would also have the advantage of avoiding installation of files
with excessively generic names like /usr/local/include/diff.h and
/usr/local/man/man3/diff.3.
I'm not sure, if this question is too naive, i hope a real porter
will correct me.
I would agree with your analysis. The only thing I would add is if
kristaps@ is likely to use this code in other projects, to just go ahead
and make the port now since it's small enough.
Or maybe better yet, if he's not going to be using it for anything else,
ask him to (re-include?) the libdiff stuff in lowdown. I don't use
lowdown, so I'm not really sure if this libdiff library is old code
that's being spun off into its own library or new code altogether.
~Brian
One note: I ended up using ALL_TARGET=libdiff.a to prevent building two
utility programs that are included in libdiff. However, the make install
target depends on all which causes the same two programs to end up being
built anyway but they are not installed. Should the make install target
be patched to instead depend on libdiff.a? Or no biggie?
If libdiff provides utility programs upstream and *if* we conclude
that libdiff deserves its own port, maybe these utility programs
simply deserve installing? On the other hand, if libdiff gets
included into the lowdown port, i'd rather not build them.
In any case, the upstream Makefile is inconsistent.
The "install" target should only depend on what it actually
installs. And i'd argue that the "all" target should only
build what is installed.
So either install the two in post-install (and do not set ALL_TARGET),
or patch "all" to not include them (and do not set ALL_TARGET either).
Other random observations:
- Your SHARED_LIBS line is wrong, it ought to start at 0.0,
and it must have exactly two digits.
- However, this thing is not actually building or installing any
shared library at all, which is another strong hint that it
may not need its own port, and which means that you don't want
any SHARED_LIBS line even if it gets its own port.
- The HOMEPAGE gives me "403 Forbidden".
Yours,
Ingo