From owner-svn-ports-all@freebsd.org Sat Feb 25 13:50:21 2017 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 460ECCECA2A; Sat, 25 Feb 2017 13:50:21 +0000 (UTC) (envelope-from amdmi3@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07292DB2; Sat, 25 Feb 2017 13:50:20 +0000 (UTC) (envelope-from amdmi3@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1PDoKFI064684; Sat, 25 Feb 2017 13:50:20 GMT (envelope-from amdmi3@FreeBSD.org) Received: (from amdmi3@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1PDoJ8T064680; Sat, 25 Feb 2017 13:50:19 GMT (envelope-from amdmi3@FreeBSD.org) Message-Id: <201702251350.v1PDoJ8T064680@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: amdmi3 set sender to amdmi3@FreeBSD.org using -f From: Dmitry Marakasov Date: Sat, 25 Feb 2017 13:50:19 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r434807 - in head/deskutils/cal: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Feb 2017 13:50:21 -0000 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 # $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 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}\""