From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Mar 8 20:40:01 2007 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7642916A405 for ; Thu, 8 Mar 2007 20:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 536CB13C494 for ; Thu, 8 Mar 2007 20:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l28Ke1ep038777 for ; Thu, 8 Mar 2007 20:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l28Ke1Km038776; Thu, 8 Mar 2007 20:40:01 GMT (envelope-from gnats) Resent-Date: Thu, 8 Mar 2007 20:40:01 GMT Resent-Message-Id: <200703082040.l28Ke1Km038776@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Thierry Thomas Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C54DF16A400; Thu, 8 Mar 2007 20:31:52 +0000 (UTC) (envelope-from thierry@pompo.net) Received: from graf.pompo.net (graf.pompo.net [81.56.186.139]) by mx1.freebsd.org (Postfix) with ESMTP id 38BB013C481; Thu, 8 Mar 2007 20:31:52 +0000 (UTC) (envelope-from thierry@pompo.net) Received: by graf.pompo.net (Postfix, from userid 1001) id 669E41142C; Thu, 8 Mar 2007 21:31:46 +0100 (CET) Message-Id: <20070308203146.669E41142C@graf.pompo.net> Date: Thu, 8 Mar 2007 21:31:46 +0100 (CET) From: Thierry Thomas To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Marcus Alves Grando Subject: ports/110104: databases/sqlite3: create a slave port for threads-override-locks. X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Thierry Thomas List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2007 20:40:01 -0000 >Number: 110104 >Category: ports >Synopsis: databases/sqlite3: create a slave port for threads-override-locks. >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Mar 08 20:40:00 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Thierry Thomas >Release: FreeBSD 6.2-STABLE i386 >Organization: Kabbale Eros >Environment: System: FreeBSD graf.pompo.net 6.2-STABLE FreeBSD 6.2-STABLE #0: Sun Jan 28 10:29:56 CET 2007 thierry@graf.pompo.net:/usr/obj/usr/src/sys/GRAF060511 i386 >Description: Some ports / packages (e.g. deskutils/pinot) work better when threads-override-locks is enabled in sqlite3. For packaging reasons I'm proposing to create a slave port for this option. The attached patch and shar file do the following: - create sqlite3-threads as a slave port, which sets USE_THOL; - update sqlite3 to handle this variable; - define conflicts between sqlite3-threads & sqlite3; - sqlite3-threads will touch a dummy file etc/sqlite3_installed_with_threads-override-locks to test which package has been installed - the current option WITH_THREADS is only available in the master port. >How-To-Repeat: N/A >Fix: Please accept the following patches: --- sqlite3.diff begins here --- diff -urN databases/sqlite3.orig/Makefile databases/sqlite3/Makefile --- databases/sqlite3.orig/Makefile Wed Feb 14 07:46:41 2007 +++ databases/sqlite3/Makefile Wed Mar 7 23:47:58 2007 @@ -10,6 +10,9 @@ PORTVERSION= 3.3.12 CATEGORIES= databases MASTER_SITES= http://www.sqlite.org/ +.if defined(USE_THOL) +PKGNAMESUFFIX= -threads +.endif MAINTAINER= mnag@FreeBSD.org COMMENT= An SQL database engine in a C library w/ Tcl wrapper @@ -29,14 +32,25 @@ OPTIONS= DEBUG "Enable debugging & verbose explain" off \ DOCS "Building docs (depends on TCL)" on \ FTS1 "Enable FTS1 (Full Text Search) module" off \ - TCLWRAPPER "TCL wrapper for SQLITE" off \ - THREADS "Enable threads support" off + TCLWRAPPER "TCL wrapper for SQLITE" off # Defaults, for building the docs: TCL_V?= 8.4 MAKE_ARGS+= TCLSH=tclsh${TCL_V} MAKE_ENV+= TCL_VER=${TCL_V} +.if !defined(USE_THOL) +OPTIONS+= THREADS "Enable threads support" off +PLIST_SUB+= THOL="@comment " +CONFLICTS= sqlite-threads-3* +.else +CONFIGURE_ARGS+=--enable-threadsafe --enable-threads-override-locks +PLIST_SUB+= THOL="" +CONFLICTS= sqlite-3* +.endif + +SLAVEDIRS= databases/sqlite3-threads + .include .if defined(WITH_DEBUG) @@ -68,8 +82,8 @@ CONFIGURE_ARGS+= --enable-threadsafe .endif -post-patch: -.if defined(WITH_THREADS) +pre-configure: +.if defined(WITH_THREADS) || defined(USE_THOL) @${REINPLACE_CMD} -e "s|-lpthread|${PTHREAD_LIBS}|g" \ ${WRKSRC}/configure @${REINPLACE_CMD} -E -e "s|(Libs:.*)|\1 ${PTHREAD_LIBS}|" \ @@ -99,5 +113,8 @@ .endif @${MKDIR} ${EXAMPLESDIR} @${INSTALL_DATA} ${FILESDIR}/example.tcl ${EXAMPLESDIR} +.if defined(USE_THOL) + ${TOUCH} ${PREFIX}/etc/sqlite3_installed_with_threads-override-locks +.endif .include diff -urN databases/sqlite3.orig/pkg-plist databases/sqlite3/pkg-plist --- databases/sqlite3.orig/pkg-plist Wed Feb 14 07:46:41 2007 +++ databases/sqlite3/pkg-plist Wed Mar 7 23:39:08 2007 @@ -1,5 +1,6 @@ bin/sqlite3 %%WITH_TCLWRAPPER%%bin/tclsqlite3 +%%THOL%%etc/sqlite3_installed_with_threads-override-locks include/sqlite3.h include/sqlite3ext.h lib/libsqlite3.a --- sqlite3.diff ends here --- --- sqlite3-threads.shar begins here --- # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # databases/sqlite3-threads # databases/sqlite3-threads/Makefile # echo c - databases/sqlite3-threads mkdir -p databases/sqlite3-threads > /dev/null 2>&1 echo x - databases/sqlite3-threads/Makefile sed 's/^X//' >databases/sqlite3-threads/Makefile << 'END-of-databases/sqlite3-threads/Makefile' X# New ports collection makefile for: sqlite3-threads X# Date created: 07 March 2007 X# Whom: thierry@pompo.net X# X# $FreeBSD$ X# X XPORTNAME= sqlite3 X XCOMMENT= SQLite 3 with threads overriding each others locks enabled X XMASTERDIR= ${.CURDIR}/../sqlite3 X XUSE_THOL= yes X X.include "${MASTERDIR}/Makefile" END-of-databases/sqlite3-threads/Makefile exit --- sqlite3-threads.shar ends here --- >Release-Note: >Audit-Trail: >Unformatted: