From garga.bsd@gmail.com  Wed Dec 29 18:50:13 2010
Return-Path: <garga.bsd@gmail.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3019310656C3
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 29 Dec 2010 18:50:13 +0000 (UTC)
	(envelope-from garga.bsd@gmail.com)
Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54])
	by mx1.freebsd.org (Postfix) with ESMTP id D1E958FC1B
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 29 Dec 2010 18:50:12 +0000 (UTC)
Received: by vws9 with SMTP id 9so4215342vws.13
        for <FreeBSD-gnats-submit@freebsd.org>; Wed, 29 Dec 2010 10:50:11 -0800 (PST)
Received: by 10.220.179.9 with SMTP id bo9mr4509022vcb.188.1293648611119;
        Wed, 29 Dec 2010 10:50:11 -0800 (PST)
Received: from botelhor.bplab.local (189-19-84-134.dsl.telesp.net.br [189.19.84.134])
        by mx.google.com with ESMTPS id k39sm2994750vcr.2.2010.12.29.10.50.07
        (version=SSLv3 cipher=RC4-MD5);
        Wed, 29 Dec 2010 10:50:09 -0800 (PST)
Received: (qmail 54473 invoked by uid 1001); 29 Dec 2010 16:50:05 -0200
Message-Id: <20101229185005.54472.qmail@botelhor.bplab.local>
Date: Wed, 29 Dec 2010 10:50:09 -0800 (PST)
From: Renato Botelho <garga@FreeBSD.org>
Sender: Renato Botelho <garga.bsd@gmail.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc: mail@derzinn.de
Subject: [PATCH] databases/mongodb: Fix build for PREFIX != /usr/local and install header files
X-Send-Pr-Version: 3.113
X-GNATS-Notify: mail@derzinn.de

>Number:         153525
>Category:       ports
>Synopsis:       [PATCH] databases/mongodb: Fix build for PREFIX != /usr/local and install header files
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    garga
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 29 19:00:22 UTC 2010
>Closed-Date:    Thu Dec 30 10:29:29 UTC 2010
>Last-Modified:  Thu Dec 30 10:30:08 UTC 2010
>Originator:     Renato Botelho
>Release:        FreeBSD 9.0-CURRENT amd64
>Organization:
FreeBSD.org
>Environment:
System: FreeBSD botelhor.bplab.local 9.0-CURRENT FreeBSD 9.0-CURRENT #5 r216678M: Thu Dec 23 10:41:55 BRST
>Description:
Current version of this port has a bug, if you try to build it with PREFIX !=
/usr/local it doesn't build.

This is caused because of REINPLACE_CMD is replaceing all occourrences of
/usr/local by PREFIX and it breaks paths where it looks for libraries.

Since i was touching it, i've make some improvements:

- Get rid of manual installation and use scons to do it
- Add a new OPTION to install development part of it (lilbraries and header
  files). It's useful when you want to write software and link it against
  libmongoclient
- Add a REINPLACE_CMD to make scons strip binaries for freebsd (it should be
  sent as a patch to upstream)
- Use --prefix param instead of replace default prefix on SConstruct

Port maintainer (mail@derzinn.de) is cc'd.

Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:

make PREFIX=/tmp

>Fix:

--- mongodb-1.6.5_1.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/databases/mongodb/Makefile,v
retrieving revision 1.17
diff -u -u -r1.17 Makefile
--- Makefile	13 Dec 2010 18:05:44 -0000	1.17
+++ Makefile	29 Dec 2010 18:45:26 -0000
@@ -7,6 +7,7 @@
 
 PORTNAME=	mongodb
 PORTVERSION=	1.6.5
+PORTREVISION=	1
 CATEGORIES=	databases net
 MASTER_SITES=	http://downloads.mongodb.org/src/ \
 		http://derzinn.de/files/
@@ -24,28 +25,31 @@
 ONLY_FOR_ARCHS=	i386 amd64
 ONLY_FOR_ARCHS_REASON=	"not yet ported to anything other than i386 and amd64"
 
+OPTIONS=	DEVEL "Install development files (library and headers)" off
+
 USE_SCONS=	yes
 SCONS_TARGET=	all
+SCONS_ARGS=	--prefix=${PREFIX}
 
 USE_RC_SUBR=	mongod
-MONGO_FILES=	mongo mongod mongodump mongoexport mongofiles \
-		mongoimport mongorestore mongos mongosniff mongostat
 
 .include <bsd.port.pre.mk>
+
 .if ${OSVERSION} < 700042
 BROKEN=		Does not build
 .endif
 
+.if defined(WITH_DEVEL)
+SCONS_ARGS+=	--full
+PLIST_SUB+=	DEVEL=""
+.else
+PLIST_SUB+=	DEVEL="@comment "
+.endif
+
 post-patch:
-	@${REINPLACE_CMD} -E -e 's|elif "freebsd7" == os.sys.platform|elif os.sys.platform.startswith("freebsd")|' \
+	@${REINPLACE_CMD} -e 's|elif "freebsd7" == os.sys.platform|elif os.sys.platform.startswith("freebsd")|' \
+			  -e '/not GetOption("nostrip")/ s,linux,linux or freebsd,g' \
 		${WRKSRC}/SConstruct
-	@${REINPLACE_CMD} -e 's#/usr/local#${PREFIX}#g' ${WRKSRC}/SConstruct
-
-do-install:
-.for i in ${MONGO_FILES}
-	${INSTALL_PROGRAM} ${WRKSRC}/${i} ${PREFIX}/bin
-.endfor
-	${INSTALL_DATA} ${WRKSRC}/libmongoclient.a ${PREFIX}/lib
 
 post-install:
 	@if [ ! -f ${PREFIX}/etc/mongodb.conf ]; then \
Index: pkg-plist
===================================================================
RCS file: /home/pcvs/ports/databases/mongodb/pkg-plist,v
retrieving revision 1.3
diff -u -u -r1.3 pkg-plist
--- pkg-plist	17 Apr 2010 19:33:51 -0000	1.3
+++ pkg-plist	29 Dec 2010 18:45:26 -0000
@@ -1,4 +1,6 @@
 @unexec if [ ! -s %D/etc/mongodb.conf ]; then /bin/rm -f %D/etc/mongodb.conf; fi
+@exec  if [ ! -f %D/etc/mongodb.conf ]; then /usr/bin/touch %D/etc/mongodb.conf; fi
+bin/bsondump
 bin/mongo
 bin/mongod
 bin/mongodump
@@ -9,5 +11,174 @@
 bin/mongos
 bin/mongosniff
 bin/mongostat
-lib/libmongoclient.a
-@exec  if [ ! -f %D/etc/mongodb.conf ]; then /usr/bin/touch %D/etc/mongodb.conf; fi
+%%DEVEL%%lib/libmongoclient.a
+%%DEVEL%%include/mongo/bson/bson.h
+%%DEVEL%%include/mongo/bson/bson_db.h
+%%DEVEL%%include/mongo/bson/bsonelement.h
+%%DEVEL%%include/mongo/bson/bsoninlines.h
+%%DEVEL%%include/mongo/bson/bsonmisc.h
+%%DEVEL%%include/mongo/bson/bsonobj.h
+%%DEVEL%%include/mongo/bson/bsonobjbuilder.h
+%%DEVEL%%include/mongo/bson/bsonobjiterator.h
+%%DEVEL%%include/mongo/bson/bsontypes.h
+%%DEVEL%%include/mongo/bson/inline_decls.h
+%%DEVEL%%include/mongo/bson/oid.h
+%%DEVEL%%include/mongo/bson/ordering.h
+%%DEVEL%%include/mongo/bson/stringdata.h
+%%DEVEL%%include/mongo/bson/util/atomic_int.h
+%%DEVEL%%include/mongo/bson/util/builder.h
+%%DEVEL%%include/mongo/bson/util/misc.h
+%%DEVEL%%include/mongo/client/connpool.h
+%%DEVEL%%include/mongo/client/constants.h
+%%DEVEL%%include/mongo/client/dbclient.h
+%%DEVEL%%include/mongo/client/dbclientcursor.h
+%%DEVEL%%include/mongo/client/distlock.h
+%%DEVEL%%include/mongo/client/gridfs.h
+%%DEVEL%%include/mongo/client/model.h
+%%DEVEL%%include/mongo/client/parallel.h
+%%DEVEL%%include/mongo/client/redef_macros.h
+%%DEVEL%%include/mongo/client/syncclusterconnection.h
+%%DEVEL%%include/mongo/client/undef_macros.h
+%%DEVEL%%include/mongo/db/background.h
+%%DEVEL%%include/mongo/db/btree.h
+%%DEVEL%%include/mongo/db/client.h
+%%DEVEL%%include/mongo/db/clientcursor.h
+%%DEVEL%%include/mongo/db/cmdline.h
+%%DEVEL%%include/mongo/db/commands.h
+%%DEVEL%%include/mongo/db/concurrency.h
+%%DEVEL%%include/mongo/db/curop.h
+%%DEVEL%%include/mongo/db/cursor.h
+%%DEVEL%%include/mongo/db/database.h
+%%DEVEL%%include/mongo/db/db.h
+%%DEVEL%%include/mongo/db/dbhelpers.h
+%%DEVEL%%include/mongo/db/dbmessage.h
+%%DEVEL%%include/mongo/db/dbwebserver.h
+%%DEVEL%%include/mongo/db/diskloc.h
+%%DEVEL%%include/mongo/db/extsort.h
+%%DEVEL%%include/mongo/db/filever.h
+%%DEVEL%%include/mongo/db/index.h
+%%DEVEL%%include/mongo/db/indexkey.h
+%%DEVEL%%include/mongo/db/instance.h
+%%DEVEL%%include/mongo/db/introspect.h
+%%DEVEL%%include/mongo/db/jsobj.h
+%%DEVEL%%include/mongo/db/jsobjmanipulator.h
+%%DEVEL%%include/mongo/db/json.h
+%%DEVEL%%include/mongo/db/lasterror.h
+%%DEVEL%%include/mongo/db/matcher.h
+%%DEVEL%%include/mongo/db/minilex.h
+%%DEVEL%%include/mongo/db/module.h
+%%DEVEL%%include/mongo/db/namespace.h
+%%DEVEL%%include/mongo/db/nonce.h
+%%DEVEL%%include/mongo/db/oplog.h
+%%DEVEL%%include/mongo/db/oplogreader.h
+%%DEVEL%%include/mongo/db/pdfile.h
+%%DEVEL%%include/mongo/db/query.h
+%%DEVEL%%include/mongo/db/queryoptimizer.h
+%%DEVEL%%include/mongo/db/queryutil.h
+%%DEVEL%%include/mongo/db/rec.h
+%%DEVEL%%include/mongo/db/reccache.h
+%%DEVEL%%include/mongo/db/reci.h
+%%DEVEL%%include/mongo/db/recstore.h
+%%DEVEL%%include/mongo/db/repl.h
+%%DEVEL%%include/mongo/db/repl/connections.h
+%%DEVEL%%include/mongo/db/repl/health.h
+%%DEVEL%%include/mongo/db/repl/multicmd.h
+%%DEVEL%%include/mongo/db/repl/rs.h
+%%DEVEL%%include/mongo/db/repl/rs_config.h
+%%DEVEL%%include/mongo/db/repl/rs_exception.h
+%%DEVEL%%include/mongo/db/repl/rs_member.h
+%%DEVEL%%include/mongo/db/repl/rs_optime.h
+%%DEVEL%%include/mongo/db/repl_block.h
+%%DEVEL%%include/mongo/db/replpair.h
+%%DEVEL%%include/mongo/db/resource.h
+%%DEVEL%%include/mongo/db/scanandorder.h
+%%DEVEL%%include/mongo/db/security.h
+%%DEVEL%%include/mongo/db/stats/counters.h
+%%DEVEL%%include/mongo/db/stats/fine_clock.h
+%%DEVEL%%include/mongo/db/stats/service_stats.h
+%%DEVEL%%include/mongo/db/stats/snapshots.h
+%%DEVEL%%include/mongo/db/stats/top.h
+%%DEVEL%%include/mongo/db/update.h
+%%DEVEL%%include/mongo/pch.h
+%%DEVEL%%include/mongo/s/balance.h
+%%DEVEL%%include/mongo/s/balancer_policy.h
+%%DEVEL%%include/mongo/s/chunk.h
+%%DEVEL%%include/mongo/s/config.h
+%%DEVEL%%include/mongo/s/cursors.h
+%%DEVEL%%include/mongo/s/d_logic.h
+%%DEVEL%%include/mongo/s/grid.h
+%%DEVEL%%include/mongo/s/request.h
+%%DEVEL%%include/mongo/s/server.h
+%%DEVEL%%include/mongo/s/shard.h
+%%DEVEL%%include/mongo/s/shardkey.h
+%%DEVEL%%include/mongo/s/stats.h
+%%DEVEL%%include/mongo/s/strategy.h
+%%DEVEL%%include/mongo/s/util.h
+%%DEVEL%%include/mongo/scripting/engine.h
+%%DEVEL%%include/mongo/scripting/engine_java.h
+%%DEVEL%%include/mongo/scripting/engine_spidermonkey.h
+%%DEVEL%%include/mongo/scripting/engine_v8.h
+%%DEVEL%%include/mongo/scripting/v8_db.h
+%%DEVEL%%include/mongo/scripting/v8_utils.h
+%%DEVEL%%include/mongo/scripting/v8_wrapper.h
+%%DEVEL%%include/mongo/targetver.h
+%%DEVEL%%include/mongo/util/allocator.h
+%%DEVEL%%include/mongo/util/array.h
+%%DEVEL%%include/mongo/util/assert_util.h
+%%DEVEL%%include/mongo/util/background.h
+%%DEVEL%%include/mongo/util/base64.h
+%%DEVEL%%include/mongo/util/concurrency/list.h
+%%DEVEL%%include/mongo/util/concurrency/msg.h
+%%DEVEL%%include/mongo/util/concurrency/mutex.h
+%%DEVEL%%include/mongo/util/concurrency/mvar.h
+%%DEVEL%%include/mongo/util/concurrency/rwlock.h
+%%DEVEL%%include/mongo/util/concurrency/spin_lock.h
+%%DEVEL%%include/mongo/util/concurrency/task.h
+%%DEVEL%%include/mongo/util/concurrency/thread_pool.h
+%%DEVEL%%include/mongo/util/concurrency/value.h
+%%DEVEL%%include/mongo/util/debug_util.h
+%%DEVEL%%include/mongo/util/embedded_builder.h
+%%DEVEL%%include/mongo/util/file.h
+%%DEVEL%%include/mongo/util/file_allocator.h
+%%DEVEL%%include/mongo/util/goodies.h
+%%DEVEL%%include/mongo/util/hashtab.h
+%%DEVEL%%include/mongo/util/hex.h
+%%DEVEL%%include/mongo/util/histogram.h
+%%DEVEL%%include/mongo/util/hostandport.h
+%%DEVEL%%include/mongo/util/httpclient.h
+%%DEVEL%%include/mongo/util/log.h
+%%DEVEL%%include/mongo/util/lruishmap.h
+%%DEVEL%%include/mongo/util/md5.h
+%%DEVEL%%include/mongo/util/md5.hpp
+%%DEVEL%%include/mongo/util/message.h
+%%DEVEL%%include/mongo/util/message_server.h
+%%DEVEL%%include/mongo/util/miniwebserver.h
+%%DEVEL%%include/mongo/util/mmap.h
+%%DEVEL%%include/mongo/util/mongoutils/checksum.h
+%%DEVEL%%include/mongo/util/mongoutils/html.h
+%%DEVEL%%include/mongo/util/mongoutils/str.h
+%%DEVEL%%include/mongo/util/ntservice.h
+%%DEVEL%%include/mongo/util/optime.h
+%%DEVEL%%include/mongo/util/password.h
+%%DEVEL%%include/mongo/util/processinfo.h
+%%DEVEL%%include/mongo/util/queue.h
+%%DEVEL%%include/mongo/util/ramlog.h
+%%DEVEL%%include/mongo/util/ramstore.h
+%%DEVEL%%include/mongo/util/sock.h
+%%DEVEL%%include/mongo/util/stringutils.h
+%%DEVEL%%include/mongo/util/text.h
+%%DEVEL%%include/mongo/util/unittest.h
+%%DEVEL%%include/mongo/util/version.h
+%%DEVEL%%include/mongo/util/winutil.h
+%%DEVEL%%@dirrm include/mongo/bson/util
+%%DEVEL%%@dirrm include/mongo/bson
+%%DEVEL%%@dirrm include/mongo/client
+%%DEVEL%%@dirrm include/mongo/db/repl
+%%DEVEL%%@dirrm include/mongo/db/stats
+%%DEVEL%%@dirrm include/mongo/db
+%%DEVEL%%@dirrm include/mongo/s
+%%DEVEL%%@dirrm include/mongo/scripting
+%%DEVEL%%@dirrm include/mongo/util/concurrency
+%%DEVEL%%@dirrm include/mongo/util/mongoutils
+%%DEVEL%%@dirrm include/mongo/util
+%%DEVEL%%@dirrm include/mongo
--- mongodb-1.6.5_1.patch ends here ---

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->garga 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed Dec 29 19:00:31 UTC 2010 
Responsible-Changed-Why:  
Submitter has GNATS access (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=153525 
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Wed Dec 29 19:00:37 UTC 2010 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

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

From: Edwin Groothuis <edwin@FreeBSD.org>
To: mail@derzinn.de
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/153525: [PATCH] databases/mongodb: Fix build for PREFIX != /usr/local and install header files
Date: Wed, 29 Dec 2010 19:00:34 UT

 Maintainer of databases/mongodb,
 
 Please note that PR ports/153525 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/153525
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org

From: Mirko Zinn <mail@derzinn.de>
To: bug-followup@FreeBSD.org
Cc: Renato Botelho <garga@FreeBSD.org>
Subject: Re: ports/153525: [PATCH] databases/mongodb: Fix build for PREFIX != /usr/local and install header files
Date: Wed, 29 Dec 2010 23:13:09 +0100

 This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
 --Apple-Mail-63--326507043
 Content-Transfer-Encoding: 7bit
 Content-Type: text/plain; charset=us-ascii
 
 i approve the patch. thanks.
 
 
 --Apple-Mail-63--326507043
 content-type: application/pgp-signature; x-mac-type=70674453;
 	name=PGP.sig
 content-description: Signierter Teil der Nachricht
 content-disposition: inline; filename=PGP.sig
 content-transfer-encoding: 7bit
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
 
 iEYEARECAAYFAk0bsngACgkQ5F/97S0F91P12gCePLj3NcBayhiGV5gU0LmpR9Dn
 Pe0AnjTz0lD+pYPLYoI9QDvbAM0JZ3aY
 =0cch
 -----END PGP SIGNATURE-----
 
 --Apple-Mail-63--326507043--
State-Changed-From-To: feedback->closed 
State-Changed-By: garga 
State-Changed-When: Thu Dec 30 10:29:28 UTC 2010 
State-Changed-Why:  
Committed. Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/153525: commit references a PR
Date: Thu, 30 Dec 2010 10:29:08 +0000 (UTC)

 garga       2010-12-30 10:29:03 UTC
 
   FreeBSD ports repository
 
   Modified files:
     databases/mongodb    Makefile pkg-plist 
   Log:
   - Fix build when PREFIX != /usr/local
   - Instead of replace all /usr/local occourences on SConstruct file, use --prefix
   argument
   - Get rid of manual installation and use scons install instead
   - Strip binaries on FreeBSD as scons were doing for solaris end linux
   - Add a new OPTION (off by default) called DEVEL to install library and header
   files, it's useful when you need to link binaries against libmongoclient
   - Bump PORTREVISION since pkg-plist has changed
   
   PR:             ports/153525
   Submitted by:   garga@
   Approved by:    maintainer
   
   Revision  Changes    Path
   1.18      +14 -10    ports/databases/mongodb/Makefile
   1.4       +173 -2    ports/databases/mongodb/pkg-plist
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
