Date: Wed, 01 Apr 2009 06:11:57 +0400 From: Anonymous <swell.k@gmail.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/133261: [patch] www/free-sa: respect system cflags and expose DEBUG macro Message-ID: <86tz59w2aa.fsf@gmail.com> Resent-Message-ID: <200904010220.n312K1ho069789@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 133261 >Category: ports >Synopsis: [patch] www/free-sa: respect system cflags and expose DEBUG macro >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Apr 01 02:20:00 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Anonymous >Release: FreeBSD 8.0-CURRENT amd64 >Organization: >Environment: System: FreeBSD luffy 8.0-CURRENT FreeBSD 8.0-CURRENT #0 r190587M: Tue Mar 31 05:09:20 UTC 2009 root@luffy:/usr/obj/usr/src/sys/PHOENIX amd64 Tested only compilation. >Description: - don't override system cflags (-O2 -pipe -fno-strict-aliasing) - allow changing DEBUG macro from make.conf, expose it as DEBUG_LEVEL; for some reason defining DEBUG in make.conf doesn't work here even if global.mk uses `?=' - move all changes to global.mk in *one* place, i.e. replace ${PATCHDIR}/patch-global.mk with one line substitution in post-patch target - reshape REINPLACE_CMD line for easy modification, eg. removing one substitution corresponds one line in diff - mark as MAKE_JOBS_SAFE >How-To-Repeat: >Fix: --- free-sa.diff begins here --- Index: www/free-sa/Makefile =================================================================== RCS file: /home/csup/ports/www/free-sa/Makefile,v retrieving revision 1.13 diff -u -p -r1.13 Makefile --- www/free-sa/Makefile 30 Dec 2008 23:55:22 -0000 1.13 +++ www/free-sa/Makefile 1 Apr 2009 01:59:21 -0000 @@ -13,16 +13,25 @@ MASTER_SITES= SF MAINTAINER= toxa@toxahost.ru COMMENT= Statistic analyzer for daemons log files similar to SARG +MAKE_JOBS_SAFE= yes + PORTDOCS= COPYING INSTALL README README.DEV ChangeLog FAQ THANKS DOCSDIR= share/doc/free-sa-${DISTVERSION} MAN1= free-sa.1 MAN5= free-sa.conf.5 +DEBUG_LEVEL?= 0 + .include <bsd.port.pre.mk> post-patch: - @${REINPLACE_CMD} -e 's,PREFIX =,PREFIX ?=,' ${WRKSRC}/global.mk + @${REINPLACE_CMD} \ + -e 's,PREFIX =,PREFIX ?=,' \ + -e 's,$$(PREFIX)/var/www/htdocs,$$(PREFIX)/www/data,' \ + -e 's,^CFLAGS =,CFLAGS +=,' \ + -e 's,DEBUG = .*,DEBUG = ${DEBUG_LEVEL},' \ + ${WRKSRC}/global.mk .if defined(NOPORTDOCS) EXTRA_PATCHES+= ${FILESDIR}/extra-patch-Makefile Index: www/free-sa/files/patch-global.mk =================================================================== RCS file: www/free-sa/files/patch-global.mk diff -N www/free-sa/files/patch-global.mk --- www/free-sa/files/patch-global.mk 7 Apr 2007 04:25:12 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,11 +0,0 @@ ---- global.mk.orig Wed Apr 4 15:43:18 2007 -+++ global.mk Wed Apr 4 15:43:35 2007 -@@ -10,7 +10,7 @@ - # etc dir - ETCDIR = $(PREFIX)/etc/$(PROGLNAME) - # where put reports (you can change it later via free-sa.conf configuration file) --WWWDIR = $(PREFIX)/var/www/htdocs/$(PROGLNAME) -+WWWDIR = $(PREFIX)/www/data/$(PROGLNAME) - # dir for temporary data storing (you can change it later via free-sa.conf configuration file) - TMPDIR = /var/cache/$(PROGLNAME) - # where log file lives (you can change it later via free-sa.conf configuration file) --- free-sa.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86tz59w2aa.fsf>