aboutsummaryrefslogtreecommitdiff
path: root/japanese/kpcal
diff options
context:
space:
mode:
authorPawel Pekala <pawel@FreeBSD.org>2013-12-19 13:30:13 +0000
committerPawel Pekala <pawel@FreeBSD.org>2013-12-19 13:30:13 +0000
commit97176d0d810ff375a722365226efafc9a481278d (patch)
tree566b4e928f78cc3fe093edaee64914bf00a4f9be /japanese/kpcal
parentdd10db1676229935c2043cab9b1cf9e51dc088c2 (diff)
downloadports-97176d0d810ff375a722365226efafc9a481278d.tar.gz
ports-97176d0d810ff375a722365226efafc9a481278d.zip
- Fix build with clang
- Support staging PR: ports/184812 Submitted by: KATO Tsuguru <tkato432@yahoo.com>
Notes
Notes: svn path=/head/; revision=336902
Diffstat (limited to 'japanese/kpcal')
-rw-r--r--japanese/kpcal/Makefile16
-rw-r--r--japanese/kpcal/files/patch-conv.c8
-rw-r--r--japanese/kpcal/files/patch-kpcal.c55
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;