--- eclass/xorg-2.eclass 2011/03/17 22:40:20 1.35 +++ eclass/xorg-2.eclass 2011/05/14 16:27:50 1.44 @@ -1,6 +1,6 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/xorg-2.eclass,v 1.35 2011/03/17 22:40:20 scarabeus Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/xorg-2.eclass,v 1.44 2011/05/14 16:27:50 scarabeus Exp $ # # @ECLASS: xorg-2.eclass # @MAINTAINER: @@ -22,7 +22,7 @@ GIT_ECLASS="" if [[ ${PV} == *9999* ]]; then - GIT_ECLASS="git" + GIT_ECLASS="git-2" XORG_EAUTORECONF="yes" fi @@ -43,7 +43,7 @@ EXPORTED_FUNCTIONS="src_unpack src_compile src_install pkg_postinst pkg_postrm" case "${EAPI:-0}" in 3|4) EXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS} src_prepare src_configure" ;; - *) die "EAPI-UNSUPPORTED" ;; + *) die "EAPI=${EAPI} is not supported" ;; esac # exports must be ALWAYS after inherit @@ -83,9 +83,6 @@ esac fi -# backcompat, remove when everything in main tree fixed -[[ -n ${MODULE} ]] && XORG_MODULE=${MODULE} && ewarn "Your ebuild is using MODULE variable, please migrate to XORG_MODULE to preserve namespace." - # @ECLASS-VARIABLE: XORG_PACKAGE_NAME # @DESCRIPTION: # For git checkout the git repository might differ from package name. @@ -93,7 +90,7 @@ : ${XORG_PACKAGE_NAME:=${PN}} if [[ -n ${GIT_ECLASS} ]]; then - EGIT_REPO_URI="git://anongit.freedesktop.org/git/xorg/${XORG_MODULE}${XORG_PACKAGE_NAME}" + : ${EGIT_REPO_URI:="git://anongit.freedesktop.org/git/xorg/${XORG_MODULE}${XORG_PACKAGE_NAME}"} elif [[ -n ${XORG_BASE_INDIVIDUAL_URI} ]]; then SRC_URI="${XORG_BASE_INDIVIDUAL_URI}/${XORG_MODULE}${P}.tar.bz2" fi @@ -112,7 +109,7 @@ >=sys-devel/libtool-2.2.6a sys-devel/m4" if [[ ${PN} != util-macros ]] ; then - EAUTORECONF_DEPEND+=" >=x11-misc/util-macros-1.12.0" + EAUTORECONF_DEPEND+=" >=x11-misc/util-macros-1.13.0" # Required even by xorg-server [[ ${PN} == "font-util" ]] || EAUTORECONF_DEPEND+=" >=media-fonts/font-util-1.2.0" fi @@ -207,7 +204,7 @@ *) COMMON_DEPEND+=" ${XORG_DRI}? ( ${DRI_COMMON_DEPEND} )" DEPEND+=" ${XORG_DRI}? ( ${DRI_DEPEND} )" - IUSE="${XORG_DRI}" + IUSE+=" ${XORG_DRI}" ;; esac unset DRI_DEPEND @@ -218,6 +215,13 @@ x11-base/xorg-server[xorg] " fi +if [[ -n "${DRIVER}" && ${PN} == xf86-input-* ]]; then + DEPEND+=" + x11-proto/inputproto + x11-proto/kbproto + x11-proto/xproto + " +fi if [[ -n "${DRIVER}" && ${PN} == xf86-video-* ]]; then COMMON_DEPEND+=" x11-libs/libpciaccess @@ -260,7 +264,7 @@ ;; *) DEPEND+=" ${XORG_DOC}? ( ${DOC_DEPEND} )" - IUSE="${XORG_DOC}" + IUSE+=" ${XORG_DOC}" ;; esac unset DOC_DEPEND @@ -289,7 +293,7 @@ debug-print-function ${FUNCNAME} "$@" if [[ -n ${GIT_ECLASS} ]]; then - git_src_unpack + git-2_src_unpack else unpack ${A} fi @@ -336,7 +340,6 @@ xorg-2_src_prepare() { debug-print-function ${FUNCNAME} "$@" - [[ -n ${GIT_ECLASS} ]] && git_src_prepare xorg-2_patch_source xorg-2_reconf_source } @@ -401,17 +404,24 @@ xorg-2_flags_setup - # @VARIABLE: CONFIGURE_OPTIONS + # @VARIABLE: XORG_CONFIGURE_OPTIONS # @DESCRIPTION: - # Any options to pass to configure + # Array of an additional options to pass to configure. # @DEFAULT_UNSET - CONFIGURE_OPTIONS=${CONFIGURE_OPTIONS:=""} + if [[ $(declare -p XORG_CONFIGURE_OPTIONS 2>&-) != "declare -a"* ]]; then + # fallback to CONFIGURE_OPTIONS, deprecated. + [[ -n "${CONFIGURE_OPTIONS}" ]] && \ + ewarn "QA: CONFIGURE_OPTIONS are deprecated. Please migrate to XORG_CONFIGURE_OPTIONS to preserve namespace." + local xorgconfadd=(${CONFIGURE_OPTIONS}) + else + local xorgconfadd=("${XORG_CONFIGURE_OPTIONS[@]}") + fi [[ -n "${FONT}" ]] && xorg-2_font_configure local myeconfargs=( --disable-dependency-tracking - ${CONFIGURE_OPTIONS} ${FONT_OPTIONS} + "${xorgconfadd[@]}" ) autotools-utils_src_configure "$@"