Date: Tue, 17 Dec 2013 02:49:51 +0900 From: KATO Tsuguru <tkato432@yahoo.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/184812: japanese/kpcal: Fix build with clang Message-ID: <20131217024951.c525df219094d8d28929c090@yahoo.com> Resent-Message-ID: <201312161810.rBGIA13x015779@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 184812 >Category: ports >Synopsis: japanese/kpcal: Fix build with clang >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Dec 16 18:10:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: KATO Tsuguru >Release: FreeBSD 8.4-RELEASE-p4 i386 >Organization: >Environment: >Description: - Fix build with clang New file: files/patch-conv.c files/patch-kpcal.c >How-To-Repeat: >Fix: diff -urN /usr/ports/japanese/kpcal/Makefile japanese/kpcal/Makefile --- /usr/ports/japanese/kpcal/Makefile 2013-11-06 21:58:46.000000000 +0900 +++ japanese/kpcal/Makefile 2013-12-17 00:00:00.000000000 +0900 @@ -5,8 +5,7 @@ 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 @@ 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> diff -urN /usr/ports/japanese/kpcal/files/patch-conv.c japanese/kpcal/files/patch-conv.c --- /usr/ports/japanese/kpcal/files/patch-conv.c 1970-01-01 09:00:00.000000000 +0900 +++ japanese/kpcal/files/patch-conv.c 2013-12-17 00:00:00.000000000 +0900 @@ -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) diff -urN /usr/ports/japanese/kpcal/files/patch-kpcal.c japanese/kpcal/files/patch-kpcal.c --- /usr/ports/japanese/kpcal/files/patch-kpcal.c 1970-01-01 09:00:00.000000000 +0900 +++ japanese/kpcal/files/patch-kpcal.c 2013-12-17 00:00:00.000000000 +0900 @@ -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; >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131217024951.c525df219094d8d28929c090>