On Sun, Nov 08 2020, Ashton Fagg <ash...@fagg.id.au> wrote: > Ashton Fagg <ash...@fagg.id.au> writes: > >> Per discussion in the flatbuffers thread (Marc & Jeremie cc'd), here is >> an updated version of the fmt port. Tested the same way as before. >> >> Only changes are some whitespace clean up and the appropriate >> SHARED_LIBS entry. > > Fixing a mistake in the SHARED_LIBS entry. WANTLIB was not set correctly > either - per discussions on the flatbuffers port.
Here are some items that need fixing: * You have to adapt the SHARED_LIBS line. In this case the library is named "libfmt.so..." so the SHARED_LIB line should be: SHARED_LIBS = fmt 0.0 Don't bother with adding the original version in a comment, as I did for flatbuffers. It's useless in practice, it can only help you track bumps done upstream so you can see whether an upstream is serious about ABI concerns. But only if you maintain the commented version. Once you have fixed SHARED_LIBS, run make clean and make plist: you'll see that your library is properly named "@lib lib/libfmt.so.${LIBfmt_VERSION}". Re WANTLIB, please don't copy it either. When I zap WANTLIB and then run make port-lib-depends-check, I get: --8<-- russell /usr/ports/mystuff/devel/fmt$ make port-lib-depends-check fmt-7.1.1(devel/fmt): Missing: c++.5 (/usr/local/lib/libfmt.so.0.0) (system lib) Missing: c++abi.3 (/usr/local/lib/libfmt.so.0.0) (system lib) WANTLIB += ${COMPILER_LIBCXX} *** Error 1 in target 'port-lib-depends-check' (ignored) -->8-- * WANTLIB is off, don't copy/paste it from other ports. You can just copy/paste the suggested WANTLIB line(s) from make port-lib-depends-check, with no editing: --8<-- russell /usr/ports/mystuff/devel/fmt$ make port-lib-depends-check fmt-7.1.1(devel/fmt): Extra: pthread.26 russell /usr/ports/mystuff/devel/fmt$ make show=COMPILER_LIBCXX c++ c++abi pthread -->8-- Dunno why libfmt isn't linked against libpthread here, but the suggested WANTLIB is almost certainly correct. * -DFMT_DOC is useless now (no doc generated, no doc installed in the PLIST) and might be harmful (auto-detection of doxygen and python, which might go away later if not properly registered as BUILD_DEPENDS). -DFMT_INSTALL=on doesn't look useful either. Your call regarding -DFMT_PEDANTIC=on but note that upstream doesn't use it by default. * COMPILER = base-clang ports-gcc This is the recipe for most modern C++ software, which should be built with a C++11 or newer compiler. ports-gcc would be used where base-clang isn't available. * HOMEPAGE is the default generated with the GH_* variables, you can drop it. * "-Safe printf implementation" -> "- Safe printf implementation" in DESCR * Weird spacing: please only use tabs for indentation, not spaces then tabs. -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE