Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Dec 2013 13:30:14 +0000 (UTC)
From:      Pawel Pekala <pawel@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r336902 - in head/japanese/kpcal: . files
Message-ID:  <201312191330.rBJDUEJr032829@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pawel
Date: Thu Dec 19 13:30:13 2013
New Revision: 336902
URL: http://svnweb.freebsd.org/changeset/ports/336902

Log:
  - Fix build with clang
  - Support staging
  
  PR:		ports/184812
  Submitted by:	KATO Tsuguru <tkato432@yahoo.com>

Added:
  head/japanese/kpcal/files/patch-conv.c   (contents, props changed)
  head/japanese/kpcal/files/patch-kpcal.c   (contents, props changed)
Modified:
  head/japanese/kpcal/Makefile   (contents, props changed)

Modified: head/japanese/kpcal/Makefile
==============================================================================
--- head/japanese/kpcal/Makefile	Thu Dec 19 13:29:36 2013	(r336901)
+++ head/japanese/kpcal/Makefile	Thu Dec 19 13:30:13 2013	(r336902)
@@ -5,8 +5,7 @@ PORTNAME=	kpcal
 PORTVERSION=	2.0
 PORTREVISION=	2
 CATEGORIES=	japanese
-MASTER_SITES=	${MASTER_SITE_LOCAL}
-MASTER_SITE_SUBDIR=	yoichi
+MASTER_SITES=	LOCAL/yoichi
 
 PATCH_SITES=	http://www.tamaru.kuee.kyoto-u.ac.jp/~tsuchiya/misc/kpcal/
 PATCHFILES=	${PORTNAME}-${PORTVERSION}-20040518.patch
@@ -16,14 +15,13 @@ MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Make Calendar in Postscript format
 
 ALL_TARGET=	kpcal
-MAN1=		kpcal.1
-PLIST_FILES=	bin/kpcal
 
-NO_STAGE=	yes
-post-patch:
-	${REINPLACE_CMD} -e 's/long/time_t/' ${WRKSRC}/kpcal.c
+PLIST_FILES=	bin/kpcal man/man1/kpcal.1.gz
+
 do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/kpcal ${LOCALBASE}/bin
-	${INSTALL_MAN} ${WRKSRC}/kpcal.1 ${LOCALBASE}/man/man1
+	(cd ${WRKSRC} && ${INSTALL_PROGRAM} kpcal \
+		${STAGEDIR}${PREFIX}/bin)
+	(cd ${WRKSRC} && ${INSTALL_MAN} kpcal.1 \
+		${STAGEDIR}${MANPREFIX}/man/man1)
 
 .include <bsd.port.mk>

Added: head/japanese/kpcal/files/patch-conv.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/japanese/kpcal/files/patch-conv.c	Thu Dec 19 13:30:13 2013	(r336902)
@@ -0,0 +1,8 @@
+--- conv.c.orig
++++ conv.c
+@@ -1,4 +1,5 @@
+ #include <stdio.h>
++#include <stdlib.h>
+ 
+ #define TRUE (1)
+ #define FALSE (0)

Added: head/japanese/kpcal/files/patch-kpcal.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/japanese/kpcal/files/patch-kpcal.c	Thu Dec 19 13:30:13 2013	(r336902)
@@ -0,0 +1,55 @@
+--- kpcal.c.orig
++++ kpcal.c
+@@ -5,6 +5,8 @@
+  */
+ 
+ #include <stdio.h>
++#include <stdlib.h>
++#include <unistd.h>
+ #include <ctype.h>
+ #include <time.h>
+ #include <string.h>
+@@ -28,6 +30,7 @@
+ static char daynum_font[64] = DAYNUM_DEFAULT_FONT;
+ 
+ extern void ConvertString();
++extern void pmonth();
+ 
+ FILE *cfp = NULL;
+ int year;
+@@ -35,7 +38,7 @@
+ 
+ char *getenv();
+ 
+-main(argc, argv)
++int main(argc, argv)
+      int argc;
+      char **argv;
+ {
+@@ -46,7 +49,7 @@
+   register char *cp;
+   char *cfile = NULL;
+   char cbuf[80];
+-  long t, time();
++  time_t t, time();
+   int errflg = 0;
+   int nocal = 0;
+   int m;
+@@ -86,7 +89,7 @@
+     exit(1);
+   }
+ 
+-  t = time((long *)0);
++  t = time((time_t *)0);
+   lt = localtime(&t);
+ 
+   /*
+@@ -150,7 +153,7 @@
+ /*
+  * pmonth - do calendar for month "m"
+  */
+-pmonth(m)
++void pmonth(m)
+ int m;
+ {
+   register char **s;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312191330.rBJDUEJr032829>