From jhelfman@experts-exchange.com  Sat Jul  7 04:35:14 2012
Return-Path: <jhelfman@experts-exchange.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2E5161065670;
	Sat,  7 Jul 2012 04:35:14 +0000 (UTC)
	(envelope-from jhelfman@experts-exchange.com)
Received: from mail.dw.redsrci.com (mail.pub.dw.redsrci.com [72.29.183.251])
	by mx1.freebsd.org (Postfix) with ESMTP id 0D8558FC12;
	Sat,  7 Jul 2012 04:35:13 +0000 (UTC)
Received: from mail.dw.redsrci.com (localhost [127.0.0.1])
	by mail.dw.redsrci.com (Postfix) with ESMTP id AB756718248;
	Fri,  6 Jul 2012 21:35:13 -0700 (PDT)
Received: from mail.dw.redsrci.com ([127.0.0.1])
	by mail.dw.redsrci.com (mail.dw.redsrci.com [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id JxPQQw1FwrSS; Fri,  6 Jul 2012 21:35:13 -0700 (PDT)
Received: from experts-exchange.com (unknown [192.168.103.120])
	by mail.dw.redsrci.com (Postfix) with SMTP id 80388718255;
	Fri,  6 Jul 2012 21:35:13 -0700 (PDT)
Received: (nullmailer pid 71929 invoked by uid 1001);
	Sat, 07 Jul 2012 04:33:29 -0000
Message-Id: <1341635609.334860.71928.nullmailer@experts-exchange.com>
Date: Fri, 06 Jul 2012 21:33:29 -0700
From: Jason Helfman <jgh@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: gnn@FreeBSD.org
Subject: [PATCH] devel/zookeeper: unbreak build, use standards
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         169693
>Category:       ports
>Synopsis:       [PATCH] devel/zookeeper: unbreak build, use standards
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    skreuzer
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jul 07 04:40:01 UTC 2012
>Closed-Date:    Mon Mar 24 21:09:40 UTC 2014
>Last-Modified:  Mon Mar 24 21:09:40 UTC 2014
>Originator:     Jason Helfman
>Release:        FreeBSD 8.3-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD dormouse.experts-exchange.com 8.3-RELEASE FreeBSD 8.3-RELEASE #0: Mon Apr  9 21:23:18 UTC
>Description:
- Use standard USE_RC_SUBR (`set_rcvar` is deprecated`), new rc files should be portname.in, remove entry from plist
- Use OptionsNG, and not old options framework
- Use autotools tools, and don't call specifically as a build dependency (ie. libtool, automake), automake is required
- Add an additional MASTER_SITE
- remove extra new line from pkg-descr
- fix make install by using CONFIGURE_WRKSRC
- some portlint petting was necessary

Additional notes:
Are all of the build dependencies also run dependencies?
Is there a reason that CP was used for installation, in favor of INSTALL macros?

Here is my build log:
http://people.freebsd.org/~jgh/files/zookeeper-3.3.5.log

Added file(s):
- files/zookeeper.in

Removed file(s):
- files/zookeeper

Port maintainer (gnn@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.99_6 (mode: change, diff: CVS)
>How-To-Repeat:
>Fix:

--- zookeeper-3.3.5.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/devel/zookeeper/Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- Makefile	6 Jul 2012 20:27:34 -0000	1.1
+++ Makefile	7 Jul 2012 04:28:10 -0000
@@ -10,39 +10,42 @@
 PORTNAME=	zookeeper
 PORTVERSION=	3.3.5
 CATEGORIES=	devel java
-MASTER_SITES=	http://apache.mesi.com.ar/zookeeper/stable/
+MASTER_SITES=	http://apache.mesi.com.ar/zookeeper/stable/ \
+	http://www.trieuvan.com/apache/zookeeper/stable/
 
 MAINTAINER=	gnn@FreeBSD.org
 COMMENT=	A Coordination Service for Distributed Applications
 
+BUILD_DEPENDS=	ant:${PORTSDIR}/devel/apache-ant
 LIB_DEPENDS=	cppunit:${PORTSDIR}/devel/cppunit
-BUILD_DEPENDS=	ant:${PORTSDIR}/devel/apache-ant \
-		libtool:${PORTSDIR}/devel/libtool \
+RUN_DEPENDS:=	${BUILD_DEPENDS}
+
+OPTIONS_DEFINE=	C PYTHON
+C_DESC=	Build C library bindings
+OPTIONS_DEFAULT=	C PYTHON
 
-.if defined(WITH_PYTHON)
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MPYTHON}
 BUILD_DEPENDS+=	python:${PORTSDIR}/lang/python
 .endif
 
-RUN_DEPENDS:=	${BUILD_DEPENDS}
-
 USE_JAVA=	yes
 JAVA_VERSION=	1.7
 JAVA_VENDOR=	openjdk
 JAVA_RUN=	yes
+USE_RC_SUBR=	zookeeper
 
-USE_AUTOTOOLS=	autoconf
+USE_AUTOTOOLS=	automake autoconf libtool
 
 CONFLICTS=	zookeeper-devel-[0-9]*
 
 PYTHON_WRKSRC=	${WRKSRC}/src/contrib/zkpython
 CONFIGURE_WRKSRC=${WRKSRC}/src/c
 
-OPTIONS=	C "Build C library bindings" on \
-		PYTHON "Build Python library bindings" on
-
 .include <bsd.port.pre.mk>
 
-.if defined(WITH_C)
+.if ${PORT_OPTIONS:MC}
 run-autotools:	run-autotools-autoreconf
 
 run-autotools-autoreconf:
@@ -50,11 +53,11 @@
 .endif
 
 do-build:
-.if defined(WITH_C)
+.if ${PORT_OPTIONS:MC}
 	@cd ${CONFIGURE_WRKSRC} && \
 	${MAKE}
 .endif
-.if defined(WITH_PYTHON)
+.if ${PORT_OPTIONS:MPYTHON}
 	@cd ${PYTHON_WRKSRC} &&\
 	ant compile
 .endif
@@ -66,12 +69,11 @@
 	@${CP} -Rp ${WRKSRC}/lib ${PREFIX}/${PORTNAME}
 	@${CP} -Rp ${WRKSRC}/docs ${PREFIX}/${PORTNAME}
 	@${CP} -Rp ${WRKSRC}/*.jar ${PREFIX}/${PORTNAME}
-	@${INSTALL} ${FILESDIR}/zookeeper ${PREFIX}/etc/rc.d/
-.if defined(WITH_C)
-	@cd ${BUILD_WRKSRC} && \
-	make install
+.if ${PORT_OPTIONS:MC}
+	@cd ${CONFIGURE_WRKSRC} && \
+	${MAKE} install
 .endif
-.if defined(WITH_PYTHON)
+.if ${PORT_OPTIONS:MPYTHON}
 	@cd ${PYTHON_WRKSRC} && \
 	ant install
 .endif
Index: pkg-descr
===================================================================
RCS file: /home/pcvs/ports/devel/zookeeper/pkg-descr,v
retrieving revision 1.1
diff -u -r1.1 pkg-descr
--- pkg-descr	6 Jul 2012 20:27:34 -0000	1.1
+++ pkg-descr	7 Jul 2012 04:28:10 -0000
@@ -14,4 +14,3 @@
 especially prone to errors such as race conditions and deadlock. The
 motivation behind ZooKeeper is to relieve distributed applications the
 responsibility of implementing coordination services from scratch.
-
Index: pkg-plist
===================================================================
RCS file: /home/pcvs/ports/devel/zookeeper/pkg-plist,v
retrieving revision 1.1
diff -u -r1.1 pkg-plist
--- pkg-plist	6 Jul 2012 20:27:34 -0000	1.1
+++ pkg-plist	7 Jul 2012 04:28:10 -0000
@@ -336,7 +336,6 @@
 zookeeper/bin/zkServer.sh
 zookeeper/bin/zkEnv.sh
 zookeeper/bin/README.txt
-etc/rc.d/zookeeper
 include/c-client-src/zookeeper.h
 include/c-client-src/zookeeper_version.h
 include/c-client-src/zookeeper_log.h
Index: files/zookeeper
===================================================================
RCS file: files/zookeeper
diff -N files/zookeeper
--- files/zookeeper	6 Jul 2012 20:27:35 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,33 +0,0 @@
-#!/bin/sh
-
-# $FreeBSD: ports/devel/zookeeper/files/zookeeper,v 1.1 2012/07/06 20:27:35 gnn Exp $
-#
-# PROVIDE: zookeeper
-#
-# Add the following line to /etc/rc.conf to enable zookeeper:
-#
-# zookeeper_enable="YES"
-
-command="/usr/local/zookeeper/bin/zkServer.sh"
-
-. /etc/rc.subr
-
-load_rc_config zookeeper
-
-#set defaults
-zookeeper_enable=${zookeeper_enable:-"NO"}
-
-name=zookeeper
-rcvar=`set_rcvar`
-
-start_cmd="zookeeper_command start"
-stop_cmd="zookeeper_command stop"
-restart_cmd="zookeeper_command restart"
-status_cmd="zookeeper_command status"
-
-zookeeper_command()
-{
-	${command} ${rc_arg}
-}
-
-run_rc_command "$1"
Index: files/zookeeper.in
===================================================================
RCS file: files/zookeeper.in
diff -N files/zookeeper.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/zookeeper.in	7 Jul 2012 04:28:10 -0000
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# $FreeBSD$
+#
+# PROVIDE: zookeeper
+#
+# Add the following line to /etc/rc.conf to enable zookeeper:
+#
+# zookeeper_enable="YES"
+
+command="/usr/local/zookeeper/bin/zkServer.sh"
+
+. /etc/rc.subr
+
+load_rc_config zookeeper
+
+#set defaults
+zookeeper_enable=${zookeeper_enable:-"NO"}
+
+name=zookeeper
+rcvar=zookeeper_enable
+
+start_cmd="zookeeper_command start"
+stop_cmd="zookeeper_command stop"
+restart_cmd="zookeeper_command restart"
+status_cmd="zookeeper_command status"
+
+zookeeper_command()
+{
+	${command} ${rc_arg}
+}
+
+run_rc_command "$1"
--- zookeeper-3.3.5.patch ends here ---

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->gnn 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sat Jul 7 04:40:12 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

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

From: Greg Lewis <glewis@eyesbeyond.com>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: ports/169693: [PATCH] devel/zookeeper: unbreak build, use
 standards
Date: Sun, 8 Jul 2012 22:57:42 -0700

 FWIW,
 
 BUILD_DEPENDS=	ant:${PORTSDIR}/devel/apache-ant
 
 is better done as
 
 USE_ANT=	yes
 
 -- 
 Greg Lewis                          Email   : glewis@eyesbeyond.com
 Eyes Beyond                         Web     : http://www.eyesbeyond.com
 Information Technology              FreeBSD : glewis@FreeBSD.org
State-Changed-From-To: open->patched 
State-Changed-By: gnn 
State-Changed-When: Mon Jul 9 13:50:15 UTC 2012 
State-Changed-Why:  
This patch has been applied, tested, and committed to CVS. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=169693 
Responsible-Changed-From-To: gnn->skreuzer 
Responsible-Changed-By: gnn 
Responsible-Changed-When: Mon Mar 10 13:44:46 UTC 2014 
Responsible-Changed-Why:  
Assign to Steven Kreuzer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=169693 
State-Changed-From-To: patched->closed 
State-Changed-By: swills 
State-Changed-When: Mon Mar 24 21:09:40 UTC 2014 
State-Changed-Why:  
Superseded by PR ports/185896 

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