From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 5892313877A for ; Fri, 8 Aug 2014 17:57:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D097DE0933; Fri, 8 Aug 2014 17:57:34 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5715EE0933 for ; Fri, 8 Aug 2014 17:57:34 +0000 (UTC) Received: from flycatcher.gentoo.org (flycatcher.gentoo.org [81.93.255.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1D2E2340331 for ; Fri, 8 Aug 2014 17:57:33 +0000 (UTC) Received: by flycatcher.gentoo.org (Postfix, from userid 2288) id C9D832004E; Fri, 8 Aug 2014 17:57:28 +0000 (UTC) From: "Christoph Junghans (ottxor)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, ottxor@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in eclass: db-use.eclass ChangeLog X-VCS-Repository: gentoo-x86 X-VCS-Files: db-use.eclass ChangeLog X-VCS-Directories: eclass X-VCS-Committer: ottxor X-VCS-Committer-Name: Christoph Junghans Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Message-Id: <20140808175729.C9D832004E@flycatcher.gentoo.org> Date: Fri, 8 Aug 2014 17:57:28 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: de4d5f4d-8c6d-4c6f-bc2e-41dde9a5dbb5 X-Archives-Hash: fcf3245d4501170d60692e80d6a7ea37 ottxor 14/08/08 17:57:28 Modified: db-use.eclass ChangeLog Log: added prefix support Revision Changes Path 1.12 eclass/db-use.eclass file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/db-use.eclass?rev=1.12&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/db-use.eclass?rev=1.12&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/db-use.eclass?r1=1.11&r2=1.12 Index: db-use.eclass =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/db-use.eclass,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- db-use.eclass 21 Jul 2013 09:23:45 -0000 1.11 +++ db-use.eclass 8 Aug 2014 17:57:28 -0000 1.12 @@ -1,6 +1,6 @@ -# Copyright 1999-2013 Gentoo Foundation +# Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/db-use.eclass,v 1.11 2013/07/21 09:23:45 pacho Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/db-use.eclass,v 1.12 2014/08/08 17:57:28 ottxor Exp $ # This is a common location for functions that aid the use of sys-libs/db # # Bugs: maintainer-needed@gentoo.org @@ -27,6 +27,7 @@ #Find the version that correspond to the given atom db_findver() { + has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX= if [ $# -ne 1 ]; then eerror "Function db_findver needs one argument" >&2 eerror "args given:" >&2 @@ -39,7 +40,7 @@ PKG="$(best_version $1)" VER="$(get_version_component_range 1-2 "${PKG/*db-/}")" - if [ -d /usr/include/db$(db_ver_to_slot "$VER") ]; then + if [ -d "${EPREFIX}"/usr/include/db$(db_ver_to_slot "$VER") ]; then #einfo "Found db version ${VER}" >&2 echo -n "$VER" return 0 @@ -54,12 +55,13 @@ # to test for, it will aim to find the library corresponding to it. db_includedir() { + has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX= if [ $# -eq 0 ]; then VER="$(db_findver sys-libs/db)" || return 1 VER="$(db_ver_to_slot "$VER")" echo "include version ${VER}" >&2 - if [ -d "/usr/include/db${VER}" ]; then - echo -n "/usr/include/db${VER}" + if [ -d "${EPREFIX}/usr/include/db${VER}" ]; then + echo -n "${EPREFIX}/usr/include/db${VER}" return 0 else eerror "sys-libs/db package requested, but headers not found" >&2 @@ -70,8 +72,8 @@ for x in $@ do if VER=$(db_findver "=sys-libs/db-${x}*") && - [ -d "/usr/include/db$(db_ver_to_slot $VER)" ]; then - echo -n "/usr/include/db$(db_ver_to_slot $VER)" + [ -d "${EPREFIX}/usr/include/db$(db_ver_to_slot $VER)" ]; then + echo -n "${EPREFIX}/usr/include/db$(db_ver_to_slot $VER)" return 0 fi done @@ -87,9 +89,10 @@ # packages to test for, it will aim to find the library corresponding to it. db_libname() { + has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX= if [ $# -eq 0 ]; then VER="$(db_findver sys-libs/db)" || return 1 - if [ -e "/usr/$(get_libdir)/libdb-${VER}.so" ]; then + if [ -e "${EPREFIX}/usr/$(get_libdir)/libdb-${VER}$(get_libname)" ]; then echo -n "db-${VER}" return 0 else @@ -101,7 +104,7 @@ for x in $@ do if VER=$(db_findver "=sys-libs/db-${x}*"); then - if [ -e "/usr/$(get_libdir)/libdb-${VER}.so" ]; then + if [ -e "${EPREFIX}/usr/$(get_libdir)/libdb-${VER}$(get_libname)" ]; then echo -n "db-${VER}" return 0 fi 1.1345 eclass/ChangeLog file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1345&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1345&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1344&r2=1.1345 Index: ChangeLog =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v retrieving revision 1.1344 retrieving revision 1.1345 diff -u -r1.1344 -r1.1345 --- ChangeLog 7 Aug 2014 07:37:54 -0000 1.1344 +++ ChangeLog 8 Aug 2014 17:57:28 -0000 1.1345 @@ -1,6 +1,9 @@ # ChangeLog for eclass directory # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1344 2014/08/07 07:37:54 polynomial-c Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1345 2014/08/08 17:57:28 ottxor Exp $ + + 08 Aug 2014; Christoph Junghans db-use.eclass: + added prefix support 07 Aug 2014; Lars Wendler apache-2.eclass: Fixed numerous misquotings by introducing arrays. Removed some useless "die"