Index: head/deskutils/cal/Makefile =================================================================== --- head/deskutils/cal/Makefile (revision 434806) +++ head/deskutils/cal/Makefile (revision 434807) @@ -1,27 +1,29 @@ # Created by: Andrey Zakhvatov # $FreeBSD$ -PORTNAME= cal -PORTVERSION= 3.5 -PORTREVISION= 1 -CATEGORIES= deskutils -MASTER_SITES= SUNSITE/utils/shell +PORTNAME= cal +PORTVERSION= 3.5 +PORTREVISION= 1 +CATEGORIES= deskutils +MASTER_SITES= SUNSITE/utils/shell MAINTAINER= ports@FreeBSD.org COMMENT= Enhanced color version of standard calendar utility +LICENSE= PD + WRKSRC= ${WRKDIR}/cal-3.5/source MAKEFILE= makefile.unx ALL_TARGET= cal +post-patch: + @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/cal.1 + do-install: ${INSTALL_PROGRAM} ${WRKSRC}/cal ${STAGEDIR}${PREFIX}/bin/cal - ${MV} ${WRKSRC}/cal.1 ${WRKSRC}/cal.1.orig - ${SED} -e 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/cal.1.orig > ${WRKSRC}/cal.1 ${INSTALL_MAN} ${WRKSRC}/cal.1 ${STAGEDIR}${MANPREFIX}/man/man1 @${MKDIR} ${STAGEDIR}${PREFIX}/etc/cal - @${CHMOD} 0755 ${STAGEDIR}${PREFIX}/etc/cal ${INSTALL_DATA} ${WRKDIR}/cal-3.5/cal.col ${STAGEDIR}${ETCDIR}/calcol.sample ${INSTALL_DATA} ${WRKDIR}/cal-3.5/cal.dat ${STAGEDIR}${ETCDIR}/caldat.sample .include Index: head/deskutils/cal/files/patch-cal.1 =================================================================== --- head/deskutils/cal/files/patch-cal.1 (revision 434806) +++ head/deskutils/cal/files/patch-cal.1 (revision 434807) @@ -1,17 +1,17 @@ ---- cal.1.orig Sat Jul 6 02:55:52 1996 -+++ cal.1 Mon Mar 29 16:02:33 1999 -@@ -375,12 +375,12 @@ +--- cal.1.orig 1996-07-05 17:55:52 UTC ++++ cal.1 +@@ -375,12 +375,12 @@ Unix local color file .TP .B caldat .TP -.B /usr/lib/caldat +.B %%PREFIX%%/etc/cal/caldat Unix global date files .TP .B calcol .TP -.B /usr/lib/calcol +.B %%PREFIX%%/etc/cal/calcol Unix global color files .TP .B ~/.dates Index: head/deskutils/cal/files/patch-cal.c =================================================================== --- head/deskutils/cal/files/patch-cal.c (revision 434806) +++ head/deskutils/cal/files/patch-cal.c (revision 434807) @@ -1,38 +1,27 @@ -*** cal.c.orig Fri Jul 12 04:36:33 1996 ---- cal.c Mon May 12 15:23:51 1997 -*************** -*** 130,135 **** ---- 130,139 ---- - /* Note: Other unix systems may require this next re-define to work. */ - /* I believe that SCO is one such system. Please send in any fixes */ - /* needed to get your system running. */ -+ #ifdef __FreeBSD__ /* Make FreeBSD compatible with stricmp() */ -+ #define stricmp(a,b) strcasecmp(a,b) /* case-insensitive string comparison */ -+ #endif -+ - #ifdef __linux__ /* Make linux compatible with stricmp() */ - #define stricmp(a,b) strcasecmp(a,b) /* case-insensitive string comparison */ - #endif -*************** -*** 1401,1408 **** - strcpy(str, "."); - strcpy(str, file); - if ((fp = fopen(str, mode)) == NULL) { -! /* If still not found then look in a lib directory */ - strcpy(str, "/usr/lib/"); - strcat(str,file); - fp = fopen(str, mode); - } ---- 1405,1416 ---- - strcpy(str, "."); - strcpy(str, file); - if ((fp = fopen(str, mode)) == NULL) { -! /* If still not found then look in config directory */ -! #ifdef PREFIX -! strcpy(str, PREFIX "/etc/cal/"); -! #else - strcpy(str, "/usr/lib/"); -+ #endif - strcat(str,file); - fp = fopen(str, mode); - } +--- cal.c.orig 1996-07-11 19:36:33 UTC ++++ cal.c +@@ -130,6 +130,10 @@ BASIC DATA STRUCTURE: + /* Note: Other unix systems may require this next re-define to work. */ + /* I believe that SCO is one such system. Please send in any fixes */ + /* needed to get your system running. */ ++#ifdef __FreeBSD__ /* Make FreeBSD compatible with stricmp() */ ++#define stricmp(a,b) strcasecmp(a,b) /* case-insensitive string comparison */ ++#endif ++ + #ifdef __linux__ /* Make linux compatible with stricmp() */ + #define stricmp(a,b) strcasecmp(a,b) /* case-insensitive string comparison */ + #endif +@@ -1401,8 +1405,12 @@ FILE *efopen(const char *file, const cha + strcpy(str, "."); + strcpy(str, file); + if ((fp = fopen(str, mode)) == NULL) { +- /* If still not found then look in a lib directory */ ++ /* If still not found then look in config directory */ ++#ifdef PREFIX ++ strcpy(str, PREFIX "/etc/cal/"); ++#else + strcpy(str, "/usr/lib/"); ++#endif + strcat(str,file); + fp = fopen(str, mode); + } Index: head/deskutils/cal/files/patch-makefile.unx =================================================================== --- head/deskutils/cal/files/patch-makefile.unx (revision 434806) +++ head/deskutils/cal/files/patch-makefile.unx (revision 434807) @@ -1,17 +1,18 @@ ---- makefile.unx.orig 1996-03-05 06:36:27.000000000 +0900 -+++ makefile.unx 2013-10-19 20:15:02.149614385 +0900 +--- makefile.unx.orig 1996-03-04 21:36:27 UTC ++++ makefile.unx @@ -7,9 +7,13 @@ # To use, enter "make -f makefile.unx" RM=rm -f -CC=gcc -+CC=cc - CFLAGS=-O -Wall -DUNIX -DUSE_REMINDER ++CC?=gcc +-CFLAGS=-O -Wall -DUNIX -DUSE_REMINDER ++CFLAGS+=-Wall -DUNIX -DUSE_REMINDER +.ifdef PREFIX +CFLAGS+=-DPREFIX="\"${PREFIX}\"" +.endif + BINDIR=/usr/bin MANDIR=/usr/man