svn commit: r434807 - in head/deskutils/cal: . files
Dmitry Marakasov
amdmi3 at FreeBSD.org
Sat Feb 25 13:50:21 UTC 2017
Author: amdmi3
Date: Sat Feb 25 13:50:19 2017
New Revision: 434807
URL: https://svnweb.freebsd.org/changeset/ports/434807
Log:
- Add LICENSE
- Regenerate patches
- Simplify installation
Modified:
head/deskutils/cal/Makefile
head/deskutils/cal/files/patch-cal.1
head/deskutils/cal/files/patch-cal.c
head/deskutils/cal/files/patch-makefile.unx
Modified: head/deskutils/cal/Makefile
==============================================================================
--- head/deskutils/cal/Makefile Sat Feb 25 13:48:04 2017 (r434806)
+++ head/deskutils/cal/Makefile Sat Feb 25 13:50:19 2017 (r434807)
@@ -1,26 +1,28 @@
# Created by: Andrey Zakhvatov <andy at icc.surw.chel.su>
# $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 at 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
Modified: head/deskutils/cal/files/patch-cal.1
==============================================================================
--- head/deskutils/cal/files/patch-cal.1 Sat Feb 25 13:48:04 2017 (r434806)
+++ head/deskutils/cal/files/patch-cal.1 Sat Feb 25 13:50:19 2017 (r434807)
@@ -1,6 +1,6 @@
---- 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
Modified: head/deskutils/cal/files/patch-cal.c
==============================================================================
--- head/deskutils/cal/files/patch-cal.c Sat Feb 25 13:48:04 2017 (r434806)
+++ head/deskutils/cal/files/patch-cal.c Sat Feb 25 13:50:19 2017 (r434807)
@@ -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);
+ }
Modified: head/deskutils/cal/files/patch-makefile.unx
==============================================================================
--- head/deskutils/cal/files/patch-makefile.unx Sat Feb 25 13:48:04 2017 (r434806)
+++ head/deskutils/cal/files/patch-makefile.unx Sat Feb 25 13:50:19 2017 (r434807)
@@ -1,12 +1,13 @@
---- 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}\""
More information about the svn-ports-head
mailing list