Page MenuHomeFreeBSD

Add new port: devel/libdistance.
ClosedPublic

Authored by jonathan on Oct 27 2015, 3:39 PM.
Tags
None
Referenced Files
F82155386: D4015.diff
Fri, Apr 26, 12:34 AM
Unknown Object (File)
Wed, Apr 24, 6:19 PM
Unknown Object (File)
Wed, Apr 24, 5:55 PM
Unknown Object (File)
Feb 20 2024, 5:56 PM
Unknown Object (File)
Jan 23 2024, 3:23 PM
Unknown Object (File)
Jan 21 2024, 6:07 AM
Unknown Object (File)
Jan 10 2024, 5:03 PM
Unknown Object (File)
Dec 30 2023, 2:31 PM
Subscribers

Details

Summary

This is a library for calculating various kinds of edit distances between
strings or data.

Diff Detail

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

Event Timeline

jonathan retitled this revision from to Add new port: devel/libdistance..
jonathan updated this object.
jonathan edited the test plan for this revision. (Show Details)
  • Add new port: devel/libdistance.
  • Apply fixes suggested by portlint -A.
garga requested changes to this revision.Oct 27 2015, 7:18 PM
garga added a reviewer: garga.
garga added a subscriber: garga.
garga added inline comments.
devel/libdistance/Makefile
14 ↗(On Diff #9738)

You need to use USES=tcl, see Mk/Uses/tcl.mk for more information

devel/libdistance/pkg-descr
5 ↗(On Diff #9738)

Doesn't the project have a URL to add here?

This revision now requires changes to proceed.Oct 27 2015, 7:18 PM
brooks added inline comments.
devel/libdistance/files/patch-Makefile
10 ↗(On Diff #9738)

I'm not sure if this is the best way to accomplish this, but it does look like it works so it seems fine.

devel/libdistance/pkg-descr
5 ↗(On Diff #9738)
devel/libdistance/files/patch-Makefile
10 ↗(On Diff #9738)

Yeah, it's supposed to respect MANPREFIX and MAN[section]PREFIX. It works on a test using default value for these variables

jonathan edited edge metadata.
jonathan marked 3 inline comments as done.
  • Add USES=tcl rather than tcl BUILD_DEPENDS.
  • Add URL to pkg-descr.
devel/libdistance/files/patch-Makefile
11 ↗(On Diff #9745)

To be honest, I was at a bit of a loss here as to the correct way to do things. I had kind of expected variables like PREFIX, LIBDIR, etc., to Just Work (tm), but the default behaviour of bsd.lib.mk seems to be staging things in usr/lib rather than usr/local/lib.

Is there a better way for me to direct the library, include files, etc., to the correct place?

devel/libdistance/files/patch-swig_tcl_Makefile
26 ↗(On Diff #9745)

Here's another instance of me adding PREFIX and LIBDIR variables, which feels like it shouldn't be necessary.

devel/libdistance/files/patch-Makefile
11 ↗(On Diff #9745)

You can start reading /usr/ports/Mk/bsd.port.mk header comments, there you can find all basic variables used by ports tree

jonathan marked 3 inline comments as done.
jonathan edited edge metadata.
  • Drop PREFIX?= from patches.
devel/libdistance/files/patch-Makefile
11 ↗(On Diff #9745)

So, I read bsd.port.mk, as well as bsd.lib.mk, and the problem is that LIBDIR doesn't respect PREFIX (or LOCALBASE) by default: the default is to hard-code it to /usr/lib (see /usr/share/mk/bsd.own.mk:170). So, while I am able to drop the PREFIX?= from my patches, I think that I still need to set LIBDIR, etc., or else I get errors like:

===>   Generating temporary packing list
install -C -o root -g wheel -m 444   libdistance.a /usr/home/jon/freebsd-ports/devel/libdistance/work/stage/usr/lib/
install: /usr/home/jon/freebsd-ports/devel/libdistance/work/stage/usr/lib/: No such file or directory
*** Error code 71
  • Oops: also install header file.

Thanks again for all of your help... hopefully this is the last newbie question!

devel/libdistance/files/patch-test_Makefile
7 ↗(On Diff #9800)

A (hopefully) final question: if I wanted to install this binary in ${PREFIX}/tests/libdistance instead of ${PREFIX}/tests, is there a way to have the ports system automagically do the mkdir, or do I need to do it manually?

devel/libdistance/files/patch-Makefile
12 ↗(On Diff #9800)

I'd be tempted to add

MAKE_ARGS+= LIBDIR=${PREFIX}/lib

in the port Makefile but given the need to patch it's probably a wash.

devel/libdistance/files/patch-test_Makefile
7 ↗(On Diff #9800)

I think you'll just have to do the mkdir. The bsd.*.mk bits assume mtree has created directories so they don't include a mechanism.

jonathan marked 3 inline comments as done.
  • Move LIBDIR, etc., to port Makefile when possible.

Thanks: I've moved the LIBDIR stuff to the port Makefile rather than patches. It's currently not that much nicer, but I'm hoping to upstream a bunch of the other changes and reduce the number of patches required in the ports tree.

brooks added a reviewer: brooks.

Looks good to me.

This revision was automatically updated to reflect the committed changes.