Date: Mon, 27 Mar 2017 22:35:20 +0000 (UTC) From: Michael Gmelin <grembo@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r437089 - in head/devel: . hhdate hhdate/files Message-ID: <201703272235.v2RMZKfx024323@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: grembo Date: Mon Mar 27 22:35:20 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> Added: head/devel/hhdate/ head/devel/hhdate/Makefile (contents, props changed) head/devel/hhdate/distinfo (contents, props changed) head/devel/hhdate/files/ head/devel/hhdate/files/Makefile.in (contents, props changed) head/devel/hhdate/files/test-minimal.cpp (contents, props changed) head/devel/hhdate/pkg-descr (contents, props changed) Modified: head/devel/Makefile Modified: head/devel/Makefile ============================================================================== --- head/devel/Makefile Mon Mar 27 22:33:27 2017 (r437088) +++ head/devel/Makefile Mon Mar 27 22:35:20 2017 (r437089) @@ -852,6 +852,7 @@ SUBDIR += hgreviewboard SUBDIR += hgsvn SUBDIR += hgview + SUBDIR += hhdate SUBDIR += highlighterkit SUBDIR += hive SUBDIR += horde-content Added: head/devel/hhdate/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/hhdate/Makefile Mon Mar 27 22:35:20 2017 (r437089) @@ -0,0 +1,47 @@ +# Created by: Andreas Sommer <andreas.sommer87@googlemail.com> +# $FreeBSD$ + +PORTNAME= hhdate +# New versions aren't released often, so using the number of commits since +# last release as a.b.c.NUMCOMMITS (see `git describe --tags ${GH_TAGNAME}`). +# 35 = commit a little after 2.1.0 to have LICENSE file and fixed unit tests. +PORTVERSION= 2.1.0.35 +CATEGORIES= devel + +MAINTAINER= andreas.sommer87@googlemail.com +COMMENT= Date and time library based on the C++11 (and beyond) <chrono> header + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE.txt + +USE_GITHUB= yes +GH_ACCOUNT= HowardHinnant +GH_PROJECT= date +GH_TAGNAME= 3ab6510cab764c1a20926b1e8442af4c9e8a16b2 + +NO_ARCH= yes +NO_BUILD= yes + +PLIST_FILES= include/hhdate/date.h + +# TODO add timezone support when interest grows +OPTIONS_DEFINE= TEST +TEST_DESC= Build with minimal tests +TEST_ENV= ${MAKE_ENV} WRKDIR=${WRKDIR} +TEST_USES= compiler:c++11-lib +TEST_TEST_TARGET= test +USE_CXXSTD= c++11 + +.include <bsd.port.options.mk> + +.if ${PORT_OPTIONS:MTEST} +post-extract: + ${INSTALL_DATA} ${FILESDIR}/Makefile.in ${WRKSRC}/Makefile + ${INSTALL_DATA} ${FILESDIR}/test-minimal.cpp ${WRKSRC}/test/test-minimal.cpp +.endif + +do-install: + @${MKDIR} ${STAGEDIR}${PREFIX}/include/hhdate + ${INSTALL_DATA} ${WRKSRC}/date.h ${STAGEDIR}${PREFIX}/include/hhdate/ + +.include <bsd.port.mk> Added: head/devel/hhdate/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/hhdate/distinfo Mon Mar 27 22:35:20 2017 (r437089) @@ -0,0 +1,3 @@ +TIMESTAMP = 1490643114 +SHA256 (HowardHinnant-date-2.1.0.35-3ab6510cab764c1a20926b1e8442af4c9e8a16b2_GH0.tar.gz) = 3b0e98ec702a2e53dda919b3fb77fa094c262829c2cda99813fe8cea43c79126 +SIZE (HowardHinnant-date-2.1.0.35-3ab6510cab764c1a20926b1e8442af4c9e8a16b2_GH0.tar.gz) = 776175 Added: head/devel/hhdate/files/Makefile.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/hhdate/files/Makefile.in Mon Mar 27 22:35:20 2017 (r437089) @@ -0,0 +1,8 @@ +# $FreeBSD$ +test: + @echo "Compiler in C++11 mode should compile minimal example" + ${CXX} ${CXXFLAGS} test/test-minimal.cpp \ + -o ${WRKDIR}/test-minimal && \ + ${WRKDIR}/test-minimal >/dev/null + +.PHONY: test Added: head/devel/hhdate/files/test-minimal.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/hhdate/files/test-minimal.cpp Mon Mar 27 22:35:20 2017 (r437089) @@ -0,0 +1,21 @@ +// Small example taken from https://howardhinnant.github.io/date/date.html. +// Only for testing installed header shortly. +#include <iostream> + +#include "../date.h" + +int main() +{ + using namespace std; + using namespace date; + for (auto m = 1; m <= 12; ++m) + { + auto meet = year_month_day{m/fri[1]/2015}; + cout << meet << '\n'; + meet = meet.year()/meet.month()/(meet.day()+weeks{2}); + cout << meet << '\n'; + meet = meet.year()/meet.month()/(meet.day()+weeks{2}); + if (meet.ok()) + cout << meet << '\n'; + } +} Added: head/devel/hhdate/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/hhdate/pkg-descr Mon Mar 27 22:35:20 2017 (r437089) @@ -0,0 +1,3 @@ +A date and time library based on the C++11 (and beyond) <chrono> header. + +WWW: https://github.com/HowardHinnant/date
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703272235.v2RMZKfx024323>