From sgk@outpost.globcon.net  Thu Aug 22 07:30:30 2002
Return-Path: <sgk@outpost.globcon.net>
Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 021FC37B400
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 22 Aug 2002 07:30:30 -0700 (PDT)
Received: from outpost.lukarcos.com (outpost.lukarcos.com [195.239.240.132])
	by mx1.FreeBSD.org (Postfix) with SMTP id 4965C43E6A
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 22 Aug 2002 07:30:28 -0700 (PDT)
	(envelope-from sgk@outpost.globcon.net)
Received: (qmail 44248 invoked by uid 911); 22 Aug 2002 14:30:29 -0000
Message-Id: <20020822143029.44247.qmail@outpost.globcon.net>
Date: 22 Aug 2002 14:30:29 -0000
From: Sergei Kolobov <sergei@kolobov.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc: petef@FreeBSD.org
Subject: [PATCH] Update devel/devtodo port to 0.1.14 and unbreak it
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         41897
>Category:       ports
>Synopsis:       [PATCH] Update devel/devtodo port to 0.1.14 and unbreak it
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    petef
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 22 07:40:02 PDT 2002
>Closed-Date:    Sun Aug 25 11:44:53 PDT 2002
>Last-Modified:  Sun Aug 25 11:44:53 PDT 2002
>Originator:     Sergei Kolobov
>Release:        FreeBSD 4.6-STABLE i386
>Organization:
>Environment:
System: FreeBSD outpost.globcon.net 4.6-STABLE FreeBSD 4.6-STABLE #0: Thu Aug 1 02:44:26 MSD 2002 sgk@outpost.globcon.net:/data/FreeBSD/obj/data/FreeBSD/src/sys/OUTPOST i386
>Description:
The current version of devel/devtodo port (0.1.12) doesn't build (at least,
on 4.6-STABLE), failing with an error message complaining about redeclaration
of malloc and realloc functions (see below).

In addition to that:
- a new version is out: 0.1.14
- MASTER_SITE is unreachable

>How-To-Repeat:
% cd /usr/ports/devel/devtodo
% make
===>  Building for devtodo-0.1.12
make  all-recursive
Making all in util
/bin/sh ../libtool --mode=compile cc -DHAVE_CONFIG_H -I. -I. -I..     -O -pipe -march=pentiumpro -c regex.c
cc -DHAVE_CONFIG_H -I. -I. -I.. -O -pipe -march=pentiumpro -c regex.c -o regex.o
regex.c:151: conflicting types for `malloc'
/usr/include/stdlib.h:99: previous declaration of `malloc'
regex.c:152: conflicting types for `realloc'
/usr/include/stdlib.h:103: previous declaration of `realloc'
*** Error code 1

Stop in /data/ports/devtodo-0.1.12/devtodo-0.1.12/util.
*** Error code 1

Stop in /data/ports/devtodo-0.1.12/devtodo-0.1.12.
*** Error code 1

Stop in /data/ports/devtodo-0.1.12/devtodo-0.1.12.
*** Error code 1

Stop in /data/FreeBSD/ports/devel/devtodo.

>Fix:
Patch included below.

- update to 0.1.14
- use EXAMPLESDIR to simplify Makefile
- change MASTER_SITE
- unbreak the build

--- devtodo-0.1.14-patch begins here ---
diff -ruN /usr/ports/devel/devtodo/Makefile devtodo/Makefile
--- /usr/ports/devel/devtodo/Makefile	Sun Jun  9 04:08:45 2002
+++ devtodo/Makefile	Thu Aug 22 18:11:07 2002
@@ -6,16 +6,19 @@
 #
 
 PORTNAME=	devtodo
-PORTVERSION=	0.1.12
+PORTVERSION=	0.1.14
 CATEGORIES=	devel
-MASTER_SITES=	${MASTER_SITE_LOCAL} \
-		http://activelysecure.net/~athomas/development/devtodo/download.php?filename=${PORTVERSION}/
-MASTER_SITE_SUBDIR=	petef
+MASTER_SITES=	http://devtodo.sourceforge.net/?${PORTVERSION}/
 
 MAINTAINER=	petef@FreeBSD.org
 
 GNU_CONFIGURE=	yes
 
+# Note: without this define util/regex.c doesn't compile due to redeclaration
+# of malloc and realloc functions. Adding this define was the simplest
+# (although not elegant) solution.
+CFLAGS+= -DSTDC_HEADERS
+
 MAN1=	devtodo.1
 MLINKS=	devtodo.1 tda.1 devtodo.1 tdd.1 devtodo.1 tde.1 devtodo.1 tdr.1 \
 	devtodo.1 todo.1
@@ -24,9 +27,9 @@
 	@${PERL} -pi -e 's/^\ttest -f.*todorc.*\n//' ${WRKSRC}/doc/Makefile.in
 
 post-install:
-	@${MKDIR} ${PREFIX}/share/examples/devtodo
+	@${MKDIR} ${EXAMPLESDIR}
 .for file in scripts.sh scripts.tcsh todorc.example
-	${INSTALL_DATA} ${WRKSRC}/doc/${file} ${PREFIX}/share/examples/devtodo
+	${INSTALL_DATA} ${WRKSRC}/doc/${file} ${EXAMPLESDIR}
 .endfor
 	${INSTALL_DATA} ${WRKSRC}/doc/todorc.example ${PREFIX}/etc/todorc.sample
 
diff -ruN /usr/ports/devel/devtodo/distinfo devtodo/distinfo
--- /usr/ports/devel/devtodo/distinfo	Wed Nov 21 04:09:23 2001
+++ devtodo/distinfo	Thu Aug 22 16:05:56 2002
@@ -1 +1 @@
-MD5 (devtodo-0.1.12.tar.gz) = 71d8168bc1ad68d2c97334b38018d2e9
+MD5 (devtodo-0.1.14.tar.gz) = e9c3960a67585cc14f00814058bad303
--- devtodo-0.1.14-patch ends here ---

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports->petef 
Responsible-Changed-By: okazaki 
Responsible-Changed-When: Thu Aug 22 08:09:22 PDT 2002 
Responsible-Changed-Why:  
Over to the maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=41897 
State-Changed-From-To: open->closed 
State-Changed-By: petef 
State-Changed-When: Sun Aug 25 11:44:44 PDT 2002 
State-Changed-Why:  
Committed yesterday, thanks! :) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=41897 
>Unformatted:
