Add declarations for all util.c functions that return pointers, so that
it stops segfaulting on amd64. As a side effect, call to fixtime()
causes an error now, so fix this as well.
While there, regen plist and remove a few whitespaces.
Tested by fialar from #openbsd, since i don't have an amd64 and it
came up on his maschine. "send to ports@" from Douglas via fialar.
Index: Makefile
===================================================================
RCS file: /nfs/obsd0/cvs/ports/www/sarg/Makefile,v
retrieving revision 1.9
diff -u -p -r1.9 Makefile
--- Makefile 31 Mar 2008 06:54:13 -0000 1.9
+++ Makefile 2 Dec 2008 21:02:06 -0000
@@ -3,6 +3,7 @@
COMMENT= Squid Analysis Report Generator
DISTNAME= sarg-2.2.5
+PKGNAME= ${DISTNAME}p0
CATEGORIES= www
HOMEPAGE= http://sarg.sourceforge.net/
@@ -10,7 +11,7 @@ HOMEPAGE= http://sarg.sourceforge.net/
MAINTAINER= Douglas Santos <[EMAIL PROTECTED]>
# GPL
-PERMIT_PACKAGE_CDROM= Yes
+PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
@@ -30,7 +31,7 @@ EXAMPLESDIR= ${PREFIX}/share/examples/s
MODGNU_CONFIG_GUESS_DIRS=${WRKSRC}/cfgaux
post-extract:
- @chmod 755 ${WRKSRC}/sarg-php/locale
+ @chmod 755 ${WRKSRC}/sarg-php/locale
post-build:
@perl -pi -e \
Index: patches/patch-include_conf_h
===================================================================
RCS file: patches/patch-include_conf_h
diff -N patches/patch-include_conf_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-include_conf_h 2 Dec 2008 13:47:21 -0000
@@ -0,0 +1,22 @@
+$OpenBSD$
+--- include/conf.h.orig Tue Dec 2 13:48:59 2008
++++ include/conf.h Tue Dec 2 14:46:38 2008
+@@ -86,7 +86,17 @@ gdPoint points[4];
+
+
+ #define MAXLEN 20000
+-long long int my_atoll (const char *nptr);
++/* from util.c */
++char *getword2(char *, char *, int);
++long long int my_atoll (const char *);
++char *fixnum(long long int, int );
++char *fixnum2(long long int, int);
++char *buildtime(long long int);
++char *fixtime(long int);
++char *strup(char *);
++char *subs(char *, char *, char *);
++char *strlow(char *);
++
+
+ FILE *fp_tt;
+
Index: patches/patch-topsites_c
===================================================================
RCS file: patches/patch-topsites_c
diff -N patches/patch-topsites_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-topsites_c 2 Dec 2008 13:59:20 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- topsites.c.orig Tue Dec 2 14:58:52 2008
++++ topsites.c Tue Dec 2 14:59:05 2008
+@@ -216,7 +216,7 @@ void topsites()
+
+ sprintf(wwork1,"%s",fixnum(twork1,1));
+ sprintf(wwork2,"%s",fixnum(twork2,1));
+- sprintf(wwork3,"%s",fixtime(twork3,1));
++ sprintf(wwork3,"%s",fixtime(twork3));
+
+ if(strlen(BlockIt) > 0)
+ sprintf(BlockImage,"<a href=\"%s%s?url=%s\"><img
src=\"../images/sarg-squidguard-block.png\"
border=\"0\"></a> ",wwwDocumentRoot,BlockIt,url);
Index: pkg/PLIST
===================================================================
RCS file: /nfs/obsd0/cvs/ports/www/sarg/pkg/PLIST,v
retrieving revision 1.3
diff -u -p -r1.3 PLIST
--- pkg/PLIST 16 May 2007 15:59:23 -0000 1.3
+++ pkg/PLIST 2 Dec 2008 21:03:49 -0000
@@ -1,5 +1,5 @@
@comment $OpenBSD: PLIST,v 1.3 2007/05/16 15:59:23 aanriot Exp $
-bin/sarg
[EMAIL PROTECTED] bin/sarg
@man man/man1/sarg.1
share/examples/sarg/
@sample ${SYSCONFDIR}/sarg/