From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Sep 15 06:10:07 2005 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3E3AC16A41F for ; Thu, 15 Sep 2005 06:10:07 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id A22E143D45 for ; Thu, 15 Sep 2005 06:10:06 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j8F6A6vv057045 for ; Thu, 15 Sep 2005 06:10:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j8F6A6lv057044; Thu, 15 Sep 2005 06:10:06 GMT (envelope-from gnats) Resent-Date: Thu, 15 Sep 2005 06:10:06 GMT Resent-Message-Id: <200509150610.j8F6A6lv057044@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Mikhail T." Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F29B316A41F for ; Thu, 15 Sep 2005 06:09:35 +0000 (GMT) (envelope-from mi@blue.virtual-estates.net) Received: from blue.virtual-estates.net (aldan.algebra.com [216.254.65.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id 810B343D45 for ; Thu, 15 Sep 2005 06:09:31 +0000 (GMT) (envelope-from mi@blue.virtual-estates.net) Received: from blue.virtual-estates.net (blue [127.0.0.1]) by blue.virtual-estates.net (8.13.4/8.13.4) with ESMTP id j8F69UxG012362 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 15 Sep 2005 02:09:30 -0400 (EDT) (envelope-from mi@blue.virtual-estates.net) Received: (from mi@localhost) by blue.virtual-estates.net (8.13.4/8.13.4/Submit) id j8F69UO9012361; Thu, 15 Sep 2005 02:09:30 -0400 (EDT) (envelope-from mi) Message-Id: <200509150609.j8F69UO9012361@blue.virtual-estates.net> Date: Thu, 15 Sep 2005 02:09:30 -0400 (EDT) From: "Mikhail T." To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/86145: devel/m4 should not build its own getopt and regex X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Sep 2005 06:10:07 -0000 >Number: 86145 >Category: ports >Synopsis: devel/m4 should not build its own getopt and regex >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Sep 15 06:10:06 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Mikhail T. >Release: FreeBSD 6.0-BETA4 amd64 >Organization: Virtual Estates, Inc. >Environment: System: FreeBSD blue.virtual-estates.net 6.0-BETA4 FreeBSD 6.0-BETA4 #0: Mon Sep 12 19:48:18 EDT 2005 mi@blue.virtual-estates.net:/var/obj/var/src/sys/SILVER amd64 >Description: GNU's m4 comes with its own copy of GNU regex and getopt (and getopt_long) implementations. Since the main OS install supplies these functions (in -lgnuregex and via USE_GETOPT_LONG), no port should be building their own. It is wasteful and bug-prone -- I noticed the problem in the first place because of the amount of compiler warnings raised on amd64. The port also uses the .gz tarball, when the (much smaller) .bz2 is available. The difference, however, is, probably, not worth the consequence of mirrors carrying both -- I'm not sure. May be, USE_BZIP2 should be commented out until the next release by the vendor. The resulting gm4 executable ends up being about 30% smaller. >How-To-Repeat: >Fix: cvs diff: Diffing . Index: Makefile =================================================================== RCS file: /home/pcvs/ports/devel/m4/Makefile,v retrieving revision 1.26 diff -U2 -r1.26 Makefile --- Makefile 2 Sep 2005 19:46:54 -0000 1.26 +++ Makefile 15 Sep 2005 06:06:06 -0000 @@ -8,4 +8,5 @@ PORTNAME= m4 PORTVERSION= 1.4.3 +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= ${MASTER_SITE_GNU} @@ -15,4 +16,5 @@ COMMENT= GNU m4 +USE_BZIP2= yes GNU_CONFIGURE= yes CONFIGURE_ARGS= --program-prefix=g @@ -25,4 +27,18 @@ EXAMPLESDIR= share/examples/gm4 +USE_REINPLACE= yes +USE_GETOPT_LONG=yes +EXCLUDE=lib/getopt* lib/regex* +EXTRACT_AFTER_ARGS= |${TAR} -xf - \ + ${EXCLUDE:S,^,--exclude ${PORTNAME}-${PORTVERSION}/,} + +post-patch: + @if [ -f /usr/include/gnu/regex.h ]; then \ + header=gnu/regex.h; \ + else \ + header=gnuregex.h; \ + fi; \ + ${GREP} -Fl '"regex.h"' ${WRKSRC}/*/*.[ch] | \ + ${XARGS} ${REINPLACE_CMD} "s,\"regex.h\",<$$header>," post-install: Index: distinfo =================================================================== RCS file: /home/pcvs/ports/devel/m4/distinfo,v retrieving revision 1.5 diff -U2 -r1.5 distinfo --- distinfo 5 Apr 2005 07:39:55 -0000 1.5 +++ distinfo 15 Sep 2005 06:06:06 -0000 @@ -1,2 +1,2 @@ -MD5 (m4-1.4.3.tar.gz) = 073048d747f2dbb3298e713059dd9ab3 -SIZE (m4-1.4.3.tar.gz) = 383347 +MD5 (m4-1.4.3.tar.bz2) = 1f7d7eba70a0525c44c2edc3998925c7 +SIZE (m4-1.4.3.tar.bz2) = 305598 cvs diff: Diffing files Index: files/patch-no-redundancy =================================================================== RCS file: files/patch-no-redundancy diff -N files/patch-no-redundancy --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-no-redundancy 15 Sep 2005 06:06:06 -0000 @@ -0,0 +1,31 @@ +--- lib/Makefile.in Wed Feb 9 15:48:35 2005 ++++ lib/Makefile.in Tue Sep 13 00:46:36 2005 +@@ -39,8 +39,8 @@ + INCLUDES = -I.. -I$(srcdir) + +-HEADERS = getopt.h obstack.h regex.h +-SOURCES = regex.c getopt.c getopt1.c error.c obstack.c xmalloc.c \ ++HEADERS = obstack.h ++SOURCES = error.c obstack.c xmalloc.c \ + xstrdup.c alloca.c strtol.c +-OBJECTS = regex.o getopt.o getopt1.o error.o obstack.o xmalloc.o \ ++OBJECTS = error.o obstack.o xmalloc.o \ + xstrdup.o @ALLOCA@ @LIBOBJS@ + +--- src/Makefile.in Thu Mar 31 04:46:09 2005 ++++ src/Makefile.in Tue Sep 13 01:25:38 2005 +@@ -79,5 +79,4 @@ + + $(OBJECTS): $(ANSI2KNR) ../config.h m4.h ../lib/obstack.h +-builtin$O: ../lib/regex.h + + ansi2knr: ansi2knr.o +--- Makefile.in Thu Mar 31 06:56:34 2005 ++++ Makefile.in Tue Sep 13 01:39:46 2005 +@@ -37,5 +37,5 @@ + INSTALL_PROGRAM = @INSTALL_PROGRAM@ + LDFLAGS = @LDFLAGS@ +-LIBS = @LIBS@ ++LIBS = @LIBS@ -lgnuregex + + prefix = @prefix@ >Release-Note: >Audit-Trail: >Unformatted: