aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2005-01-28 23:28:08 +0000
committerPav Lucistnik <pav@FreeBSD.org>2005-01-28 23:28:08 +0000
commit7c9e53fd345dd7ffe5de61a2975c7a42494feaa2 (patch)
tree2adaaccd51708cebf0e8a2eb0a88b7efc16e3f92
parent18582552c968872de0df89a1d1611aecfac6a70a (diff)
downloadports-7c9e53fd345dd7ffe5de61a2975c7a42494feaa2.tar.gz
ports-7c9e53fd345dd7ffe5de61a2975c7a42494feaa2.zip
Notes
-rw-r--r--misc/Makefile1
-rw-r--r--misc/ddate/Makefile69
-rw-r--r--misc/ddate/distinfo2
-rw-r--r--misc/ddate/files/patch-misc-utils-ddate.c11
-rw-r--r--misc/ddate/pkg-descr8
5 files changed, 91 insertions, 0 deletions
diff --git a/misc/Makefile b/misc/Makefile
index 1cf8584894f6..94193c4765cf 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -51,6 +51,7 @@
SUBDIR += cuecat
SUBDIR += cwish
SUBDIR += datedif
+ SUBDIR += ddate
SUBDIR += deco
SUBDIR += dejagnu
SUBDIR += delay
diff --git a/misc/ddate/Makefile b/misc/ddate/Makefile
new file mode 100644
index 000000000000..068d6114dde0
--- /dev/null
+++ b/misc/ddate/Makefile
@@ -0,0 +1,69 @@
+# New ports collection makefile for: ddate
+# Date created: 26 January 2005
+# Whom: Emanuel Haupt <ehaupt@critical.ch>
+#
+# $FreeBSD$
+#
+
+PORTNAME= ddate
+PORTVERSION= 2.12q
+CATEGORIES= misc
+MASTER_SITES= http://www.kernel.org/pub/linux/utils/util-linux/
+DISTNAME= util-linux-${PORTVERSION}
+
+MAINTAINER= ehaupt@critical.ch
+COMMENT= Command to print the date in Discordian date format
+
+PLIST_FILES= bin/ddate
+
+USE_BZIP2= yes
+MAN1= ddate.1
+GNU_CONFIGURE= yes
+
+pre-everything::
+ @${ECHO} ""
+ @${ECHO} "You may define the following build options:"
+ @${ECHO} ""
+ @${ECHO} " US_FORMAT if you wish to use the US format for"
+ @${ECHO} " aneristic dates (m-d-y), as opposed to"
+ @${ECHO} ""
+ @${ECHO} " PRAISE_BOB if you wish ddate to contain SubGenius"
+ @${ECHO} " slogans"
+ @${ECHO} ""
+ @${ECHO} " KILL_BOB if you are ideologically, theologically or"
+ @${ECHO} " otherwise opposed to the Church of the"
+ @${ECHO} " SubGenius and do not wish your copy of"
+ @${ECHO} " ddate to contain code for counting down"
+ @${ECHO} " to X-Day"
+ @${ECHO} ""
+ @${ECHO} " OLD_FORMAT if you wish ddate to print the date in the"
+ @${ECHO} " same format as Druel's original ddate when"
+ @${ECHO} " called in immediate mode"
+ @${ECHO} ""
+
+post-patch:
+.if defined(US_FORMAT)
+ ${SED} -e 's/^\/\*\ \(#define\ US_FORMAT\)\ \*\//\1/' ${WRKSRC}/misc-utils/ddate.c > ${WRKSRC}/misc-utils/ddate.c.new
+ ${MV} ${WRKSRC}/misc-utils/ddate.c.new ${WRKSRC}/misc-utils/ddate.c
+.endif
+.if defined(PRAISE_BOB)
+ ${SED} -e 's/^\/\*\(#define\ PRAISE_BOB\ 13013\)\*\//\1/' ${WRKSRC}/misc-utils/ddate.c > ${WRKSRC}/misc-utils/ddate.c.new
+ ${MV} ${WRKSRC}/misc-utils/ddate.c.new ${WRKSRC}/misc-utils/ddate.c
+.endif
+.if defined(KILL_BOB)
+ ${SED} -e 's/^\(#define\ KILL_BOB\ 13013\)/\/* \1 *\//' ${WRKSRC}/misc-utils/ddate.c > ${WRKSRC}/misc-utils/ddate.c.new
+ ${MV} ${WRKSRC}/misc-utils/ddate.c.new ${WRKSRC}/misc-utils/ddate.c
+.endif
+.if !defined(OLD_FORMAT)
+ ${SED} -e 's/^\(#define\ OLD_IMMEDIATE_FMT\)/\/* \1 *\//' ${WRKSRC}/misc-utils/ddate.c > ${WRKSRC}/misc-utils/ddate.c.new
+ ${MV} ${WRKSRC}/misc-utils/ddate.c.new ${WRKSRC}/misc-utils/ddate.c
+.endif
+
+do-build:
+ ${CC} ${WRKSRC}/misc-utils/ddate.c ${CFLAGS} -o ${WRKSRC}/misc-utils/${PORTNAME}
+
+do-install:
+ ${INSTALL_PROGRAM} -m 0555 ${WRKSRC}/misc-utils/${PORTNAME} ${PREFIX}/bin
+ ${INSTALL_MAN} ${WRKSRC}/misc-utils/ddate.1 ${MANPREFIX}/man/man1
+
+.include <bsd.port.mk>
diff --git a/misc/ddate/distinfo b/misc/ddate/distinfo
new file mode 100644
index 000000000000..bd46f028b8b2
--- /dev/null
+++ b/misc/ddate/distinfo
@@ -0,0 +1,2 @@
+MD5 (util-linux-2.12q.tar.bz2) = 54320aa1abbce00c0dc030e2c3afe5d7
+SIZE (util-linux-2.12q.tar.bz2) = 1371087
diff --git a/misc/ddate/files/patch-misc-utils-ddate.c b/misc/ddate/files/patch-misc-utils-ddate.c
new file mode 100644
index 000000000000..a19f7d2804b9
--- /dev/null
+++ b/misc/ddate/files/patch-misc-utils-ddate.c
@@ -0,0 +1,11 @@
+--- misc-utils/ddate.c.orig Wed Jan 26 16:09:58 2005
++++ misc-utils/ddate.c Wed Jan 26 16:10:30 2005
+@@ -61,7 +61,7 @@
+ #include <string.h>
+ #include <time.h>
+ #include <stdio.h>
+-#include "nls.h"
++#include "../lib/nls.h"
+ #include "../defines.h" /* for util-linux-version */
+
+ #ifndef __GNUC__
diff --git a/misc/ddate/pkg-descr b/misc/ddate/pkg-descr
new file mode 100644
index 000000000000..5c609065fc6d
--- /dev/null
+++ b/misc/ddate/pkg-descr
@@ -0,0 +1,8 @@
+Ddate prints the date in Discordian date format.
+
+If called with no arguments, ddate will get the current system date,
+convert this to the Discordian date format and print this on the stan-
+dard output. Alternatively, a Gregorian date may be specified on the
+command line, in the form of a numerical day, month and year.
+
+WWW: http://www.subgenius.com/