From ohauer@FreeBSD.org  Sun Sep 15 20:31:08 2013
Return-Path: <ohauer@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTP id 95088271
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 15 Sep 2013 20:31:08 +0000 (UTC)
	(envelope-from ohauer@FreeBSD.org)
Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 6888C2450
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 15 Sep 2013 20:31:08 +0000 (UTC)
Received: from freefall.freebsd.org (localhost [127.0.0.1])
	by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r8FKV8Wq091203
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 15 Sep 2013 20:31:08 GMT
	(envelope-from ohauer@freefall.freebsd.org)
Received: (from ohauer@localhost)
	by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r8FKV85g091202;
	Sun, 15 Sep 2013 20:31:08 GMT
	(envelope-from ohauer)
Message-Id: <201309152031.r8FKV85g091202@freefall.freebsd.org>
Date: Sun, 15 Sep 2013 20:31:08 GMT
From: olli hauer <ohauer@FreeBSD.org>
Reply-To:
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] ports-mgmt/chucky allow build with gcc and honor PREFIX
X-Send-Pr-Version: 3.114
X-GNATS-Notify: waitman@waitman.net

>Number:         182126
>Category:       ports
>Synopsis:       [patch] ports-mgmt/chucky allow build with gcc and honor PREFIX
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ohauer
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Sep 15 20:40:00 UTC 2013
>Closed-Date:    Sat Apr 05 20:04:18 UTC 2014
>Last-Modified:  Sat Apr 05 20:04:18 UTC 2014
>Originator:     ohauer
>Release:        FreeBSD 8.4-RELEASE-p4 amd64
>Organization:
>Environment:

>Description:
- port builds fine with base gcc, but CC=clang ist hard coded in the SRC
  Makefile
- honor PREFIX (to work with tools like genplist)
- fix pkg-message, first MAN location is OK, apply 's|/share||' for all
  others
- since only one binary is installed use PLIST_FILES and remove pkg-plist


>How-To-Repeat:

>Fix:

--- chucky.diff begins here ---
Index: Makefile
===================================================================
--- Makefile	(revision 327357)
+++ Makefile	(working copy)
@@ -30,6 +30,7 @@
 
 SUB_FILES=	pkg-message
 SUB_LIST=	MAN7PREFIX="${MAN7PREFIX}"
+PLIST_FILES=	bin/chucky
 PORTDOCS=	*
 
 .include <bsd.port.options.mk>
Index: files/patch-Makefile
===================================================================
--- files/patch-Makefile	(revision 0)
+++ files/patch-Makefile	(working copy)
@@ -0,0 +1,15 @@
+--- ./Makefile.orig	2013-03-22 05:11:27.000000000 +0100
++++ ./Makefile	2013-09-15 22:11:22.000000000 +0200
+@@ -1,8 +1,7 @@
+-prefix=/usr/local
+-man7dir=/usr/local/man/man7
+-CC=clang
+-CFLAGS=-I/usr/local/include
+-LDFLAGS=-L/usr/local/lib -lsqlite3
++prefix=${PREFIX}
++man7dir=${PREFIX}/man/man7
++CFLAGS=-I${LOCALBASE}/include
++LDFLAGS=-L${LOCALBASE}/lib -lsqlite3
+ 
+ all: chucky
+ 
Index: files/pkg-message.in
===================================================================
--- files/pkg-message.in	(revision 327357)
+++ files/pkg-message.in	(working copy)
@@ -5,9 +5,9 @@
 man page is installed in %%MAN7PREFIX%%/man/man7, if you do not yet
 have the configuration in /etc/man.conf, add
 
-MANPATH /usr/local/share/man
+MANPATH %%MAN7PREFIX%%/man
 
-to view all man pages which are installed in /usr/local/share/man/manX/
+to view all man pages which are installed in %%MAN7PREFIX%%/man/manX/
 
 
 ************************************************************************
Index: pkg-plist
===================================================================
--- pkg-plist	(revision 327357)
+++ pkg-plist	(working copy)
@@ -1 +0,0 @@
-bin/chucky
--- chucky.diff ends here ---


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Sun Sep 15 20:40:08 UTC 2013 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=182126 
Responsible-Changed-From-To: freebsd-ports-bugs->ohauer 
Responsible-Changed-By: ohauer 
Responsible-Changed-When: Sun Sep 15 20:45:16 UTC 2013 
Responsible-Changed-Why:  
I'll take it 

http://www.freebsd.org/cgi/query-pr.cgi?pr=182126 

From: Edwin Groothuis <edwin@FreeBSD.org>
To: waitman@waitman.net
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/182126: [patch] ports-mgmt/chucky allow build with gcc and honor PREFIX
Date: Sun, 15 Sep 2013 20:40:07 UT

 Maintainer of ports-mgmt/chucky,
 
 Please note that PR ports/182126 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/182126
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org

From: Waitman Gobble <waitman@waitman.net>
To: bug-followup@FreeBSD.org, ohauer@FreeBSD.org
Cc:  
Subject: Re: ports/182126: [patch] ports-mgmt/chucky allow build with gcc
 and honor PREFIX
Date: Mon, 16 Sep 2013 09:06:10 -0700

 Thanks, I think i left off a ? in the Makefile.. I have an update for this
 program.. however I was wanting to find out one thing before updating.
 
 (But your suggested update is fine if you want to go ahead).
 
 Here's the issue:
 
 
 Here's a 9.2 machine.
 
 # uname -a
 FreeBSD do.burplex.com 9.2-BETA2 FreeBSD 9.2-BETA2 #0 r253773M: Mon Jul 29
 14:22:34 PDT 2013da3m0n8t3r@do.burplex.com:/usr/obj/usr/src/sys/KAGISO   amd64
 
 # sqlite3 /var/db/pkg/local.sqlite
 
 sqlite> SELECT COUNT(id) FROM packages WHERE time is null;
 0
 sqlite> SELECT COUNT(id) FROM packages WHERE time is not null;
 551
 
 
 Here's a 10.0-CURRENT machine.
 
 > uname -a
 
 FreeBSD dx.burplex.com 10.0-CURRENT FreeBSD 10.0-CURRENT #0 r252355: Fri
 Jun 28 16:39:19 PDT 2013
 root@dx.burplex.com:/usr/obj/usr/src/sys/FURAHA   amd64
 
 # sqlite3 /var/db/pkg/local.sqlite
 
 sqlite> SELECT COUNT(id) FROM packages WHERE time is null;
 814
 sqlite> SELECT COUNT(id) FROM packages WHERE time is NOT null;
 104
 
 
 I'm not yet sure why on 10.0-CURRENT machine there are 814 packages with
 'time' = null.. this breaks the 'chucky' program.
 
 
 Thank you,
 
 -- Waitman Gobble San Jose California USA +1.510-830-7975
 

From: olli hauer <ohauer@gmx.de>
To: bug-followup@FreeBSD.org
Cc: waitman@waitman.net
Subject: Re: ports/182126: [patch] ports-mgmt/chucky allow build with gcc
 and honor PREFIX
Date: Sun, 29 Sep 2013 21:06:44 +0200

 Hi Waitman,
 
 I've updated the patch with staging support and have rewritten chucky's Makefile.
 http://people.freebsd.org/~ohauer/diffs/chucky.diff
 
 With the new patch direct building and portbuild is full supported.
 
 Additional I opened a ticket for your pkg issue upstream but haven't got an answer until now.
 https://github.com/freebsd/pkg/issues/588
 
 One of my 8.x machines are also having time NULL but as you wrote it is not clear why the time is not set.
 
 Please review the patch, in case you are fine with it I can go on and commit the fix.
 
 -- 
 Regards,
 olli
State-Changed-From-To: feedback->closed 
State-Changed-By: ohauer 
State-Changed-When: Sat Apr 5 20:03:23 UTC 2014 
State-Changed-Why:  
A similar fix was committed in r345797 by ehaupt 

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