Commit e514ff9e authored by wen's avatar wen
Browse files

CCTZ contains two libraries that cooperate with <chrono> to give

C++ programmers all the necessary tools for computing with dates,
times, and time zones in a simple and correct manner. The libraries
in CCTZ are:

_ The Civil-Time Library - This is a header-only library that
  supports computing with human-scale time, such as dates (which
  are represented by the cctz::civil_day class). This library is
  declared in civil_time.h.

_ The Time-Zone Library - This library uses the IANA time zone
  database that is installed on the system to convert between
  _absolute time_ and _civil time_. This library is declared in
  time_zone.h.

WWW: http://github.com/google/cctz

PR:		217599
Submitted by:	z7dr6ut7gs@snkmail.com
parent afc3e56e
...@@ -241,6 +241,7 @@ ...@@ -241,6 +241,7 @@
SUBDIR += ccdoc SUBDIR += ccdoc
SUBDIR += ccons SUBDIR += ccons
SUBDIR += ccrtp SUBDIR += ccrtp
SUBDIR += cctz
SUBDIR += cdash SUBDIR += cdash
SUBDIR += cdecl SUBDIR += cdecl
SUBDIR += cdialog SUBDIR += cdialog
......
# $FreeBSD$
PORTNAME= cctz
PORTVERSION= 2.0
DISTVERSIONPREFIX= v
CATEGORIES= devel
MAINTAINER= z7dr6ut7gs@snkmail.com
COMMENT= C++ library for handling dates, times, and time zones
LICENSE= APACHE20
GH_ACCOUNT= google
USE_GITHUB= yes
USES= compiler:c++11-lib gmake
MAKE_ARGS+= CXX=${CXX} \
EXTRA_CPPFLAGS="-D_POSIX_C_SOURCE=201112L -D_XOPEN_SOURCE=600"
PLIST_FILES= include/civil_time.h \
include/civil_time_detail.h \
include/time_zone.h lib/libcctz.a
PORTDOCS= README.md
post-install:
${MKDIR} ${STAGEDIR}${DOCSDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>
TIMESTAMP = 1488778923
SHA256 (google-cctz-v2.0_GH0.tar.gz) = 45c299e1056140ca0bdf4859f83d715ecc8135e48620b27724204fb3a653a34e
SIZE (google-cctz-v2.0_GH0.tar.gz) = 79140
--- Makefile.orig 2016-04-07 18:26:26 UTC
+++ Makefile
@@ -32,8 +32,9 @@ PREFIX = /usr/local
VPATH = $(SRC)include:$(SRC)src:$(SRC)examples
CC = $(CXX)
-CPPFLAGS = -Wall -I$(SRC)include -std=$(STD) -pthread \
- $(TEST_FLAGS) $(OPT) -fPIC -MMD
+CXXFLAGS = -Wall -std=$(STD) -pthread \
+ $(TEST_FLAGS) $(OPT) -fPIC -MMD $(EXTRA_CXXFLAGS)
+CPPFLAGS = -I$(SRC)include $(EXTRA_CPPFLAGS)
ARFLAGS = rcs
LDFLAGS = -pthread
LDLIBS = $(TEST_LIBS)
@@ -62,11 +63,12 @@ all: $(TESTS) $(TOOLS) $(EXAMPLES)
$(TESTS) $(TOOLS) $(EXAMPLES): $(CCTZ_LIB)
$(CCTZ_LIB): $(CCTZ_OBJS)
+ true $(STRIP) $(CCTZ_OBJS)
$(AR) $(ARFLAGS) $@ $(CCTZ_OBJS)
install: $(CCTZ_HDRS) $(CCTZ_LIB)
- sudo cp -p $(CCTZ_HDRS) $(PREFIX)/include
- sudo cp -p $(CCTZ_LIB) $(PREFIX)/lib
+ cd include && cp -p $(CCTZ_HDRS) $(DESTDIR)$(PREFIX)/include
+ cp -p $(CCTZ_LIB) $(DESTDIR)$(PREFIX)/lib
clean:
@$(RM) -r $(EXAMPLES:=.dSYM) $(EXAMPLES:=.o) $(EXAMPLES:=.d) $(EXAMPLES)
--- src/time_zone_libc.cc.orig 2016-04-07 18:26:26 UTC
+++ src/time_zone_libc.cc
@@ -28,7 +28,7 @@
# define OFFSET(tm) ((tm).__tm_gmtoff)
# define ABBR(tm) ((tm).__tm_zone)
# endif
-#elif defined(__APPLE__)
+#elif defined(__APPLE__) || defined(__FreeBSD__)
# define OFFSET(tm) ((tm).tm_gmtoff)
# define ABBR(tm) ((tm).tm_zone)
#elif defined(__sun)
CCTZ contains two libraries that cooperate with <chrono> to give
C++ programmers all the necessary tools for computing with dates,
times, and time zones in a simple and correct manner. The libraries
in CCTZ are:
_ The Civil-Time Library - This is a header-only library that
supports computing with human-scale time, such as dates (which
are represented by the cctz::civil_day class). This library is
declared in civil_time.h.
_ The Time-Zone Library - This library uses the IANA time zone
database that is installed on the system to convert between
_absolute time_ and _civil time_. This library is declared in
time_zone.h.
WWW: http://github.com/google/cctz
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment