diff options
Diffstat (limited to 'misc')
-rw-r--r-- | misc/ddate/Makefile | 52 | ||||
-rw-r--r-- | misc/ddate/files/patch-configure | 13 | ||||
-rw-r--r-- | misc/ddate/files/patch-misc-utils__ddate.c | 13 |
3 files changed, 39 insertions, 39 deletions
diff --git a/misc/ddate/Makefile b/misc/ddate/Makefile index 0a75963d2906..9a79a401aef4 100644 --- a/misc/ddate/Makefile +++ b/misc/ddate/Makefile @@ -26,44 +26,22 @@ MAKE_JOBS_SAFE= yes MAN1= ddate.1 -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} " the Commonwealth format" - @${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} "" +OPTIONS= USFORMAT "Use US time format" off \ + PRAISEBOB "Use SubGenius slogans" off \ + KILLBOB "Use countdown to X-Day" on -post-patch: -.if defined(US_FORMAT) - @${REINPLACE_CMD} -e 's/^\/\*\ \(#define\ US_FORMAT\)\ \*\//\1/' \ - ${WRKSRC}/misc-utils/ddate.c -.endif -.if defined(PRAISE_BOB) - @${REINPLACE_CMD} -e 's/^\/\*\(#define\ PRAISE_BOB\ 13013\)\*\//\1/' \ - ${WRKSRC}/misc-utils/ddate.c +.include <bsd.port.pre.mk> + +.if defined(WITH_USFORMAT) +CFLAGS+= -DUS_FORMAT=\"1\" .endif -.if defined(KILL_BOB) - @${REINPLACE_CMD} -e 's/^\(#define\ KILL_BOB\ 13013\)/\/* \1 *\//' \ - ${WRKSRC}/misc-utils/ddate.c + +.if defined(WITH_PRAISEBOB) +CFLAGS+= -DPRAISE_BOB=\"13013\" .endif -.if !defined(OLD_FORMAT) - @${REINPLACE_CMD} -e 's/^\(#define\ OLD_IMMEDIATE_FMT\)/\/* \1 *\//' \ - ${WRKSRC}/misc-utils/ddate.c + +.if defined(WITH_KILLBOB) +CFLAGS+= -DKILL_BOB=\"13013\" .endif do-build: @@ -71,7 +49,7 @@ do-build: -o ${WRKSRC}/misc-utils/${PORTNAME} do-install: - ${INSTALL_PROGRAM} -m 0555 ${WRKSRC}/misc-utils/${PORTNAME} ${PREFIX}/bin + ${INSTALL_PROGRAM} ${WRKSRC}/misc-utils/${PORTNAME} ${PREFIX}/bin ${INSTALL_MAN} ${WRKSRC}/misc-utils/ddate.1 ${MANPREFIX}/man/man1 -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/misc/ddate/files/patch-configure b/misc/ddate/files/patch-configure new file mode 100644 index 000000000000..474e28ceb6dc --- /dev/null +++ b/misc/ddate/files/patch-configure @@ -0,0 +1,13 @@ +--- ./configure.orig 2012-03-07 11:14:14.000000000 +0100 ++++ ./configure 2012-03-07 11:16:07.000000000 +0100 +@@ -19695,8 +19695,9 @@ + ac_config_headers="$ac_config_headers config.h" + + +-ac_config_files="$ac_config_files disk-utils/Makefile fdisk/Makefile fsck/Makefile getopt/Makefile hwclock/Makefile include/Makefile lib/Makefile login-utils/Makefile Makefile man/ru/Makefile misc-utils/chkdupexe:misc-utils/chkdupexe.pl misc-utils/Makefile mount/Makefile partx/Makefile po/Makefile.in schedutils/Makefile libblkid/blkid.pc libblkid/Makefile libblkid/docs/Makefile libblkid/docs/version.xml libblkid/src/Makefile libblkid/src/blkid.h libblkid/src/superblocks/Makefile libblkid/src/topology/Makefile libblkid/src/partitions/Makefile libblkid/samples/Makefile libmount/mount.pc libmount/Makefile libmount/src/Makefile libmount/src/libmount.h libmount/docs/Makefile libmount/docs/version.xml libuuid/uuid.pc libuuid/Makefile libuuid/man/Makefile libuuid/src/Makefile sys-utils/Makefile term-utils/Makefile tests/commands.sh tests/helpers/Makefile tests/Makefile text-utils/Makefile" ++#ac_config_files="$ac_config_files disk-utils/Makefile fdisk/Makefile fsck/Makefile getopt/Makefile hwclock/Makefile include/Makefile lib/Makefile login-utils/Makefile Makefile man/ru/Makefile misc-utils/chkdupexe:misc-utils/chkdupexe.pl misc-utils/Makefile mount/Makefile partx/Makefile po/Makefile.in schedutils/Makefile libblkid/blkid.pc libblkid/Makefile libblkid/docs/Makefile libblkid/docs/version.xml libblkid/src/Makefile libblkid/src/blkid.h libblkid/src/superblocks/Makefile libblkid/src/topology/Makefile libblkid/src/partitions/Makefile libblkid/samples/Makefile libmount/mount.pc libmount/Makefile libmount/src/Makefile libmount/src/libmount.h libmount/docs/Makefile libmount/docs/version.xml libuuid/uuid.pc libuuid/Makefile libuuid/man/Makefile libuuid/src/Makefile sys-utils/Makefile term-utils/Makefile tests/commands.sh tests/helpers/Makefile tests/Makefile text-utils/Makefile" + ++ac_config_files="$ac_config_files include/Makefile lib/Makefile misc-utils/Makefile" + + + cat >confcache <<\_ACEOF diff --git a/misc/ddate/files/patch-misc-utils__ddate.c b/misc/ddate/files/patch-misc-utils__ddate.c index 73130929b3b6..a5399e54fd11 100644 --- a/misc/ddate/files/patch-misc-utils__ddate.c +++ b/misc/ddate/files/patch-misc-utils__ddate.c @@ -1,5 +1,14 @@ ---- ./misc-utils/ddate.c.orig 2012-03-06 16:45:33.000000000 +0100 -+++ ./misc-utils/ddate.c 2012-03-06 16:46:18.000000000 +0100 +--- ./misc-utils/ddate.c.orig 2011-12-18 21:29:45.802837000 +0100 ++++ ./misc-utils/ddate.c 2012-03-07 11:19:23.000000000 +0100 +@@ -51,7 +51,7 @@ + * Church of the SubGenius and do not wish your copy of ddate(1) to contain + * code for counting down to X-Day, undefine KILL_BOB */ + +-#define KILL_BOB 13013 ++/* #define KILL_BOB 13013 */ + + /* If you wish ddate(1) to contain SubGenius slogans, define PRAISE_BOB */ + @@ -62,8 +62,9 @@ #include <time.h> #include <stdio.h> |