diff options
author | pawel <pawel@FreeBSD.org> | 2013-12-19 21:30:13 +0800 |
---|---|---|
committer | pawel <pawel@FreeBSD.org> | 2013-12-19 21:30:13 +0800 |
commit | e8f22bf700321fd8b49801eed3b9bcf7d26bdc27 (patch) | |
tree | 566b4e928f78cc3fe093edaee64914bf00a4f9be /japanese/kpcal | |
parent | f36989faaa9b39d032f704f62d6248d8dbe47d88 (diff) | |
download | freebsd-ports-gnome-e8f22bf700321fd8b49801eed3b9bcf7d26bdc27.tar.gz freebsd-ports-gnome-e8f22bf700321fd8b49801eed3b9bcf7d26bdc27.tar.zst freebsd-ports-gnome-e8f22bf700321fd8b49801eed3b9bcf7d26bdc27.zip |
- Fix build with clang
- Support staging
PR: ports/184812
Submitted by: KATO Tsuguru <tkato432@yahoo.com>
Diffstat (limited to 'japanese/kpcal')
-rw-r--r-- | japanese/kpcal/Makefile | 16 | ||||
-rw-r--r-- | japanese/kpcal/files/patch-conv.c | 8 | ||||
-rw-r--r-- | japanese/kpcal/files/patch-kpcal.c | 55 |
3 files changed, 70 insertions, 9 deletions
diff --git a/japanese/kpcal/Makefile b/japanese/kpcal/Makefile index 07999788e8fe..c89499dc8791 100644 --- a/japanese/kpcal/Makefile +++ b/japanese/kpcal/Makefile @@ -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> diff --git a/japanese/kpcal/files/patch-conv.c b/japanese/kpcal/files/patch-conv.c new file mode 100644 index 000000000000..97e81e77f195 --- /dev/null +++ b/japanese/kpcal/files/patch-conv.c @@ -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 --git a/japanese/kpcal/files/patch-kpcal.c b/japanese/kpcal/files/patch-kpcal.c new file mode 100644 index 000000000000..f4778b525e08 --- /dev/null +++ b/japanese/kpcal/files/patch-kpcal.c @@ -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; |