Created attachment 181087 [details] Port skeleton
Created attachment 181088 [details] Poudriere log (with TEST option)
Created attachment 181089 [details] Poudriere log (without TEST option, just installs one header)
Why do you use PORTREVISION=35?
Also: As the library says C++11, are you sure that TEST_USES= compiler:c++14-lang TEST_BUILD_DEPENDS= ${LOCALBASE}/bin/clang39:devel/llvm39 are required? (maybe c++11-lang would do?). You might also want to explore USE_CXXSTD in this case (not sure if it's required or not). In case this doesn't work with C++11, I would change the port description (even if it's different from upstream in this case) to reflect that.
(In reply to Michael Gmelin from comment #3) Quoting my Makefile: > # New versions aren't released often, so using the number of commits since > # last release as PORTREVISION (see `git describe --tags ${GH_TAGNAME}`). > # 35 = commit a little after 2.1.0 to have LICENSE file and fixed unit tests. > PORTREVISION= 35 > GH_TAGNAME= 3ab6510cab764c1a20926b1e8442af4c9e8a16b2 so the 35 comes from `git describe --tags 3ab6510cab764c1a20926b1e8442af4c9e8a16b2` == 2.1.0-35-g3ab6510 I thought that's a reasonable way of versioning this port for a library which doesn't usually receive minor version releases. That might change in the future, but currently the FreeBSD port would be the first OS package ever made for the library, so releases are probably just not important yet as people just pull the latest header file from GitHub.
(In reply to Michael Gmelin from comment #4) The library works fine for both C++11/C++14 but the tests seem only maintained for C++14. Since the tests don't build for C++11, I simply didn't make the effort at the current time to fix that. The upstream maintainer already fixed some problems that came up during the port build (TEST=on), and I think making it build with C++11 could be done when the maintainer or I have more time available. Since the library states that it works for both standards, I added these tests to actually confirm that statement: > @echo "C++14 compiler (chosen: ${CXX}) should compile minimal example" > ${CXX} -std=c++14 -stdlib=libc++ ${CXXFLAGS} ${FILESDIR}/test-minimal.cpp \ > -I${STAGEDIR}${PREFIX}/include -o ${WRKDIR}/test-minimal && \ > ${WRKDIR}/test-minimal >/dev/null > > @echo "System compiler in C++11 mode should compile minimal example" > clang++ -std=c++11 -stdlib=libc++ ${FILESDIR}/test-minimal.cpp \ > -I${STAGEDIR}${PREFIX}/include -o ${WRKDIR}/test-minimal && \ > ${WRKDIR}/test-minimal >/dev/null Regarding USE_CXXSTD: we're juggling two different language standards in the Makefile, so I'd rather have it explicitly defined everywhere (everywhere = "do-test" target). What do you think?
(In reply to Andreas Sommer from comment #5) Portrevisions are not for versioning upstream but for marking progress in a port. Thus, a new port never has one set and every change which isn't coming from upstream will increase that counter. So what I would suggest is: - You remove portrevision - You remove the github commit in the Makefile, so it actually checks out version 2.1.0 from upstream - You add the diff between upstream and 2.1.0 as a patch in files That way it's very clear what's going on in the port. Once upstream tags a new version, you can get rid of the patch. Regadring USE_CXXSTD: This is supposed to modify CXXFLAGS for you to select the correct standard. I don't like the explicit use of "clang++" in the Makefile. Maybe it would make more sense to put create Makefile.in in files and install that in post-extract into the ports workdir. Then your test target in the Makefile would get super trivial.
(In reply to Michael Gmelin from comment #7) Alternatively you could keep the commit in the Makefile and change the library version to 2.1.0.35 and still remove PORTREVISION from Makefile. See also https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makefile-naming.html https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makefile-distfiles.html#makefile-distversion
Created attachment 181243 [details] Port skeleton with review fixes Outsourced a Makefile.in and changed versioning scheme
Created attachment 181244 [details] Poudriere log (with TEST option)
(In reply to Andreas Sommer from comment #9) > TEST_USES= compiler:c++14-lang > TEST_BUILD_DEPENDS= ${LOCALBASE}/bin/clang39:devel/llvm39 Looking at these two lines, the second one seems not necessary, the ports framework should pick a sufficient compiler for you (that way you won't have tp update this line when a new version of clang and/or gcc becomes available).
Created attachment 181247 [details] Port skeleton Removing unit tests for now, as discussed. Too many unclarified questions about tests that don't build with C++14 ready compilers (llvm36/llvm37) or are marked C++14 only while they should also build fine for C++11 (static_assert issues?!). Left over is a check whether a minimal example builds fine with a c++11-lib compiler.
Created attachment 181248 [details] Poudriere log (with TEST option)
For some reason there is a "configure" directory in your shar archive, I'll remove that, test and commit. Thanks for adapting the skeleton multiple times.
A commit references this bug: Author: grembo Date: Mon Mar 27 22:35:21 UTC 2017 New revision: 437089 URL: https://svnweb.freebsd.org/changeset/ports/437089 Log: Add hhdate 2.1.0.35, date and time library based on the C++11 (and beyond) <chrono> header. PR: 218030 Submitted by: Andreas Sommer <andreas.sommer87@googlemail.com> Changes: head/devel/Makefile head/devel/hhdate/ head/devel/hhdate/Makefile head/devel/hhdate/distinfo head/devel/hhdate/files/ head/devel/hhdate/files/Makefile.in head/devel/hhdate/files/test-minimal.cpp head/devel/hhdate/pkg-descr