aboutsummaryrefslogtreecommitdiff
path: root/devel/libtai
diff options
context:
space:
mode:
authorMaxim Sobolev <sobomax@FreeBSD.org>2000-07-07 14:02:31 +0000
committerMaxim Sobolev <sobomax@FreeBSD.org>2000-07-07 14:02:31 +0000
commit672667120727c451d85a8b4a252c0d3846fd0646 (patch)
tree6c72d7ac921f8a229d9f1fdd2101fd59a9e19d52 /devel/libtai
parentb1eec5b0df7045eda6b58dacc63fdd98352ddb61 (diff)
downloadports-672667120727c451d85a8b4a252c0d3846fd0646.tar.gz
ports-672667120727c451d85a8b4a252c0d3846fd0646.zip
Notes
Diffstat (limited to 'devel/libtai')
-rw-r--r--devel/libtai/Makefile51
-rw-r--r--devel/libtai/distinfo1
-rw-r--r--devel/libtai/files/patch-aa116
-rw-r--r--devel/libtai/files/patch-ab4
-rw-r--r--devel/libtai/files/patch-ac6
-rw-r--r--devel/libtai/files/patch-ad4
-rw-r--r--devel/libtai/files/patch-ae6
-rw-r--r--devel/libtai/files/patch-af15
-rw-r--r--devel/libtai/files/patch-ag11
-rw-r--r--devel/libtai/pkg-comment1
-rw-r--r--devel/libtai/pkg-descr19
-rw-r--r--devel/libtai/pkg-plist10
12 files changed, 244 insertions, 0 deletions
diff --git a/devel/libtai/Makefile b/devel/libtai/Makefile
new file mode 100644
index 000000000000..8e8c9fd5b727
--- /dev/null
+++ b/devel/libtai/Makefile
@@ -0,0 +1,51 @@
+# New ports collection makefile for: libtai
+# Date created: 15 June 2000
+# Whom: Mario S F Ferreira <lioux@linf.unb.br> et al.
+#
+# $FreeBSD$
+#
+
+PORTNAME= libtai
+PORTVERSION= 0.60
+CATEGORIES= devel
+MASTER_SITES= http://cr.yp.to/libtai/
+
+MAINTAINER= lioux@linf.unb.br
+
+ALL_TARGET= it
+INSTALLS_SHLIB= yes
+MAKE_ENV= LIBVERSION="${LIBVERSION}"
+
+PLIST_SUB= LIBVERSION=${LIBVERSION} \
+ LIBFILE=${LIBFILE}
+
+MAN3= caldate.3 caldate_mjd.3 caltime.3 caltime_tai.3 leapsecs.3 \
+ tai.3 tai_now.3 tai_pack.3 taia.3 taia_now.3 taia_pack.3
+
+# port information
+LIBVERSION= 1
+LIBFILE= libtai
+PROGRAM_FILES= easter nowutc leapsecs yearcal
+
+do-configure:
+ @${PERL} -pi -e "s!%%PREFIX%%!${PREFIX}!g" \
+ ${WRKSRC}/leapsecs.3 ${WRKSRC}/leapsecs_read.c
+ @${ECHO} "${CC} ${CFLAGS}" > ${WRKSRC}/conf-cc
+ @${ECHO} "${CC} -s" > ${WRKSRC}/conf-ld
+ @${ECHO} -fPIC -DPIC > ${WRKSRC}/conf-ccso
+
+do-install:
+ ${INSTALL} ${COPY} -o ${SHAREOWN} -g ${BINGRP} -m 644 \
+ ${WRKSRC}/leapsecs.dat ${PREFIX}/etc
+.for i in ${MAN3}
+ ${INSTALL_MAN} ${WRKSRC}/${i} ${PREFIX}/man/man3
+.endfor
+.for i in ${PROGRAM_FILES}
+ ${INSTALL_PROGRAM} ${WRKSRC}/${i} ${PREFIX}/bin
+.endfor
+ ${INSTALL_DATA} ${WRKSRC}/${LIBFILE}.a ${PREFIX}/lib
+ ${INSTALL_PROGRAM} ${WRKSRC}/${LIBFILE}.so.${LIBVERSION} ${PREFIX}/lib
+ ${LN} -sf ${PREFIX}/lib/${LIBFILE}.so.${LIBVERSION} \
+ ${PREFIX}/lib/${LIBFILE}.so
+
+.include <bsd.port.mk>
diff --git a/devel/libtai/distinfo b/devel/libtai/distinfo
new file mode 100644
index 000000000000..f6760b70b6b4
--- /dev/null
+++ b/devel/libtai/distinfo
@@ -0,0 +1 @@
+MD5 (libtai-0.60.tar.gz) = 97b581ec4aefc00f461cefe3c64be244
diff --git a/devel/libtai/files/patch-aa b/devel/libtai/files/patch-aa
new file mode 100644
index 000000000000..01e4ba96bd13
--- /dev/null
+++ b/devel/libtai/files/patch-aa
@@ -0,0 +1,116 @@
+--- Makefile.orig Tue Oct 13 14:52:20 1998
++++ Makefile Fri Jun 16 20:30:27 2000
+@@ -5,10 +5,11 @@
+ default: it
+
+ auto-ccld.sh: \
+-conf-cc conf-ld warn-auto.sh
++conf-cc conf-ld conf-ccso warn-auto.sh
+ ( cat warn-auto.sh; \
+ echo CC=\'`head -1 conf-cc`\'; \
+- echo LD=\'`head -1 conf-ld`\' \
++ echo LD=\'`head -1 conf-ld`\'; \
++ echo CCSO=\'`head -1 conf-ccso`\' \
+ ) > auto-ccld.sh
+
+ caldate.0: \
+@@ -69,7 +70,7 @@
+
+ check: \
+ load check.o libtai.a
+- ./load check libtai.a
++ ./load check -L. -ltai
+
+ check.o: \
+ compile check.c tai.h uint64.h leapsecs.h caltime.h caldate.h
+@@ -83,7 +84,7 @@
+
+ easter: \
+ load easter.o libtai.a
+- ./load easter libtai.a
++ ./load easter -L. -ltai
+
+ easter.o: \
+ compile easter.c caldate.h
+@@ -95,11 +96,11 @@
+ chmod 755 find-systype
+
+ it: \
+-man libtai.a leapsecs check easter yearcal nowutc
++man libtai.so libtai.a leapsecs check easter yearcal nowutc
+
+ leapsecs: \
+ load leapsecs.o libtai.a
+- ./load leapsecs libtai.a
++ ./load leapsecs -L. -ltai
+
+ leapsecs.0: \
+ leapsecs.3
+@@ -125,22 +126,22 @@
+ compile leapsecs_sub.c leapsecs.h tai.h uint64.h
+ ./compile leapsecs_sub.c
+
+-libtai.a: \
+-makelib tai_add.o tai_now.o tai_pack.o tai_sub.o tai_unpack.o \
++OBJS=tai_add.o tai_now.o tai_pack.o tai_sub.o tai_unpack.o \
+ taia_add.o taia_approx.o taia_fmtfrac.o taia_frac.o taia_half.o \
+ taia_less.o taia_now.o taia_pack.o taia_sub.o taia_tai.o \
+ taia_unpack.o caldate_fmt.o caldate_scan.o caldate_fmjd.o \
+ caldate_mjd.o caldate_norm.o caldate_ster.o leapsecs_read.o \
+ leapsecs_init.o leapsecs_add.o leapsecs_sub.o caltime_fmt.o \
+ caltime_scan.o caltime_tai.o caltime_utc.o
+- ./makelib libtai.a tai_add.o tai_now.o tai_pack.o \
+- tai_sub.o tai_unpack.o taia_add.o taia_approx.o \
+- taia_fmtfrac.o taia_frac.o taia_half.o taia_less.o \
+- taia_now.o taia_pack.o taia_sub.o taia_tai.o taia_unpack.o \
+- caldate_fmt.o caldate_scan.o caldate_fmjd.o caldate_mjd.o \
+- caldate_norm.o caldate_ster.o leapsecs_read.o \
+- leapsecs_init.o leapsecs_add.o leapsecs_sub.o caltime_fmt.o \
+- caltime_scan.o caltime_tai.o caltime_utc.o
++
++libtai.a: \
++makelib $(OBJS)
++ ./makelib libtai.a $(OBJS)
++
++libtai.so: \
++makelibso $(OBJS) $(OBJS:S/.o$/.so/g)
++ ./makelibso libtai.so $(OBJS:S/.o$/.so/g)
++ ln -sf libtai.so libtai.so.${LIBVERSION}
+
+ load: \
+ make-load warn-auto.sh systype
+@@ -168,13 +169,24 @@
+ makelib
+ chmod 755 makelib
+
++make-makelibso: \
++make-makelibso.sh auto-ccld.sh
++ cat auto-ccld.sh make-makelibso.sh > make-makelibso
++ chmod 755 make-makelibso
++
++makelibso: \
++make-makelibso warn-auto.sh systype
++ ( cat warn-auto.sh; ./make-makelibso "`cat systype`" ) > \
++ makelibso
++ chmod 755 makelibso
++
+ man: \
+ tai.0 tai_now.0 tai_pack.0 taia.0 taia_now.0 taia_pack.0 caldate.0 \
+ caldate_mjd.0 caltime.0 caltime_tai.0 leapsecs.0
+
+ nowutc: \
+ load nowutc.o libtai.a
+- ./load nowutc libtai.a
++ ./load nowutc -L. -ltai
+
+ nowutc.o: \
+ compile nowutc.c leapsecs.h tai.h uint64.h taia.h caltime.h caldate.h
+@@ -291,7 +303,7 @@
+
+ yearcal: \
+ load yearcal.o libtai.a
+- ./load yearcal libtai.a
++ ./load yearcal -L. -ltai
+
+ yearcal.o: \
+ compile yearcal.c caldate.h
diff --git a/devel/libtai/files/patch-ab b/devel/libtai/files/patch-ab
new file mode 100644
index 000000000000..235040125e43
--- /dev/null
+++ b/devel/libtai/files/patch-ab
@@ -0,0 +1,4 @@
+--- conf-ccso.orig Wed Dec 31 21:00:00 1969
++++ conf-ccso Fri Jun 16 19:17:52 2000
+@@ -0,0 +1 @@
++-fPIC -DPIC
diff --git a/devel/libtai/files/patch-ac b/devel/libtai/files/patch-ac
new file mode 100644
index 000000000000..611bb2f8fbed
--- /dev/null
+++ b/devel/libtai/files/patch-ac
@@ -0,0 +1,6 @@
+--- make-compile.sh.orig Tue Oct 13 14:52:20 1998
++++ make-compile.sh Fri Jun 16 19:18:35 2000
+@@ -1 +1,2 @@
+-echo exec "$CC" -c '${1+"$@"}'
++echo "$CC" -c '${1+"$@"}'
++echo "$CC" $CCSO -o '${1%.c}'.so -c '${1+"$@"}'
diff --git a/devel/libtai/files/patch-ad b/devel/libtai/files/patch-ad
new file mode 100644
index 000000000000..c4db33dc110d
--- /dev/null
+++ b/devel/libtai/files/patch-ad
@@ -0,0 +1,4 @@
+--- make-compileso.sh.orig Wed Dec 31 21:00:00 1969
++++ make-compileso.sh Fri Jun 16 02:05:36 2000
+@@ -0,0 +1 @@
++echo exec "$CC $CCSO" -o '¨$@¨' -c '${1+"$@"}'
diff --git a/devel/libtai/files/patch-ae b/devel/libtai/files/patch-ae
new file mode 100644
index 000000000000..1a7426e975ab
--- /dev/null
+++ b/devel/libtai/files/patch-ae
@@ -0,0 +1,6 @@
+--- make-makelibso.sh.orig Wed Dec 31 21:00:00 1969
++++ make-makelibso.sh Fri Jun 16 19:32:24 2000
+@@ -0,0 +1,3 @@
++echo 'main="$1"; shift'
++echo 'rm -f "$main"'
++echo $CC '-shared -Wl,-soname,$main -o "$main" ${1+"$@"}'
diff --git a/devel/libtai/files/patch-af b/devel/libtai/files/patch-af
new file mode 100644
index 000000000000..02d1a1a19eb0
--- /dev/null
+++ b/devel/libtai/files/patch-af
@@ -0,0 +1,15 @@
+--- leapsecs.3.orig Fri Jun 16 22:44:24 2000
++++ leapsecs.3 Fri Jun 16 22:44:47 2000
+@@ -52,10 +52,10 @@
+
+ .B leapsecs_read
+ reads the leap-second table from
+-.BR /etc/leapsecs.dat .
++.BR %%PREFIX%%/etc/leapsecs.dat .
+ It returns 0 on success, -1 on error.
+ If
+-.B /etc/leapsecs.dat
++.B %%PREFIX%%/etc/leapsecs.dat
+ does not exist,
+ .B leapsecs_read
+ treats it as an empty file.
diff --git a/devel/libtai/files/patch-ag b/devel/libtai/files/patch-ag
new file mode 100644
index 000000000000..4705cda0fe54
--- /dev/null
+++ b/devel/libtai/files/patch-ag
@@ -0,0 +1,11 @@
+--- leapsecs_read.c.orig Fri Jun 16 22:44:31 2000
++++ leapsecs_read.c Fri Jun 16 22:45:17 2000
+@@ -18,7 +18,7 @@
+ int i;
+ struct tai u;
+
+- fd = open("/etc/leapsecs.dat",O_RDONLY | O_NDELAY);
++ fd = open("%%PREFIX%%/etc/leapsecs.dat",O_RDONLY | O_NDELAY);
+ if (fd == -1) {
+ if (errno != ENOENT) return -1;
+ if (leapsecs) free(leapsecs);
diff --git a/devel/libtai/pkg-comment b/devel/libtai/pkg-comment
new file mode 100644
index 000000000000..ac716072dc49
--- /dev/null
+++ b/devel/libtai/pkg-comment
@@ -0,0 +1 @@
+A library for storing and manipulating dates and times in second/attosecond
diff --git a/devel/libtai/pkg-descr b/devel/libtai/pkg-descr
new file mode 100644
index 000000000000..22dd7e3f052b
--- /dev/null
+++ b/devel/libtai/pkg-descr
@@ -0,0 +1,19 @@
+libtai supports two time scales: (1) TAI64, covering a few hundred
+billion years with 1-second precision; (2) TAI64NA, covering the same
+period with 1-attosecond precision. Both scales are defined in terms of
+TAI, the current international real time standard.
+
+libtai provides an internal format for TAI64, struct tai, designed for
+fast time manipulations. The tai_pack() and tai_unpack() routines
+convert between struct tai and a portable 8-byte TAI64 storage format.
+libtai provides similar internal and external formats for TAI64NA.
+
+libtai provides struct caldate to store dates in year-month-day form. It
+can convert struct caldate, under the Gregorian calendar, to a modified
+Julian day number for easy date arithmetic.
+
+This version of libtai requires a UNIX system with gettimeofday(). It
+will be easy to port to other operating systems with compilers
+supporting 64-bit arithmetic.
+
+WWW: http://cr.yp.to/libtai.html
diff --git a/devel/libtai/pkg-plist b/devel/libtai/pkg-plist
new file mode 100644
index 000000000000..bc88f04f94ee
--- /dev/null
+++ b/devel/libtai/pkg-plist
@@ -0,0 +1,10 @@
+bin/easter
+bin/leapsecs
+bin/nowutc
+bin/yearcal
+lib/%%LIBFILE%%.a
+lib/%%LIBFILE%%.so
+lib/%%LIBFILE%%.so.%%LIBVERSION%%
+@mode 0644
+etc/leapsecs.dat
+@mode