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: ports/169693: [PATCH] devel/zookeeper: unbreak build, use standards Message-ID: <1341635609.334860.71928.nullmailer@experts-exchange.com> Resent-Message-ID: <201207070440.q674e1RL014783@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 169693 >Category: ports >Synopsis: [PATCH] devel/zookeeper: unbreak build, use standards >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: Sat Jul 07 04:40:01 UTC 2012 >Closed-Date: >Last-Modified: >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: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1341635609.334860.71928.nullmailer>