/[gentoo-x86]/eclass/xorg-2.eclass
Gentoo

Diff of /eclass/xorg-2.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.41 Revision 1.49
1# Copyright 1999-2010 Gentoo Foundation 1# Copyright 1999-2011 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/xorg-2.eclass,v 1.41 2011/04/20 12:48:38 mgorny Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/xorg-2.eclass,v 1.49 2011/10/09 07:45:53 mgorny Exp $
4# 4
5# @ECLASS: xorg-2.eclass 5# @ECLASS: xorg-2.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# x11@gentoo.org 7# x11@gentoo.org
8# @AUTHOR:
9# Author: Tomáš Chvátal <scarabeus@gentoo.org>
10# Author: Donnie Berkholz <dberkholz@gentoo.org>
8# @BLURB: Reduces code duplication in the modularized X11 ebuilds. 11# @BLURB: Reduces code duplication in the modularized X11 ebuilds.
9# @DESCRIPTION: 12# @DESCRIPTION:
10# This eclass makes trivial X ebuilds possible for apps, fonts, drivers, 13# This eclass makes trivial X ebuilds possible for apps, fonts, drivers,
11# and more. Many things that would normally be done in various functions 14# and more. Many things that would normally be done in various functions
12# can be accessed by setting variables instead, such as patching, 15# can be accessed by setting variables instead, such as patching,
14# 17#
15# All you need to do in a basic ebuild is inherit this eclass and set 18# All you need to do in a basic ebuild is inherit this eclass and set
16# DESCRIPTION, KEYWORDS and RDEPEND/DEPEND. If your package is hosted 19# DESCRIPTION, KEYWORDS and RDEPEND/DEPEND. If your package is hosted
17# with the other X packages, you don't need to set SRC_URI. Pretty much 20# with the other X packages, you don't need to set SRC_URI. Pretty much
18# everything else should be automatic. 21# everything else should be automatic.
19
20# Author: Tomáš Chvátal <scarabeus@gentoo.org>
21# Author: Donnie Berkholz <dberkholz@gentoo.org>
22 22
23GIT_ECLASS="" 23GIT_ECLASS=""
24if [[ ${PV} == *9999* ]]; then 24if [[ ${PV} == *9999* ]]; then
25 GIT_ECLASS="git-2" 25 GIT_ECLASS="git-2"
26 XORG_EAUTORECONF="yes" 26 XORG_EAUTORECONF="yes"
88# For git checkout the git repository might differ from package name. 88# For git checkout the git repository might differ from package name.
89# This variable can be used for proper directory specification 89# This variable can be used for proper directory specification
90: ${XORG_PACKAGE_NAME:=${PN}} 90: ${XORG_PACKAGE_NAME:=${PN}}
91 91
92if [[ -n ${GIT_ECLASS} ]]; then 92if [[ -n ${GIT_ECLASS} ]]; then
93 : ${EGIT_REPO_URI:="git://anongit.freedesktop.org/git/xorg/${XORG_MODULE}${XORG_PACKAGE_NAME}"} 93 : ${EGIT_REPO_URI:="git://anongit.freedesktop.org/git/xorg/${XORG_MODULE}${XORG_PACKAGE_NAME} http://anongit.freedesktop.org/git/xorg/${XORG_MODULE}${XORG_PACKAGE_NAME}"}
94elif [[ -n ${XORG_BASE_INDIVIDUAL_URI} ]]; then 94elif [[ -n ${XORG_BASE_INDIVIDUAL_URI} ]]; then
95 SRC_URI="${XORG_BASE_INDIVIDUAL_URI}/${XORG_MODULE}${P}.tar.bz2" 95 SRC_URI="${XORG_BASE_INDIVIDUAL_URI}/${XORG_MODULE}${P}.tar.bz2"
96fi 96fi
97 97
98: ${SLOT:=0} 98: ${SLOT:=0}
107XORG_EAUTORECONF_ARCHES="x86-interix ppc-aix x86-winnt" 107XORG_EAUTORECONF_ARCHES="x86-interix ppc-aix x86-winnt"
108EAUTORECONF_DEPEND+=" 108EAUTORECONF_DEPEND+="
109 >=sys-devel/libtool-2.2.6a 109 >=sys-devel/libtool-2.2.6a
110 sys-devel/m4" 110 sys-devel/m4"
111if [[ ${PN} != util-macros ]] ; then 111if [[ ${PN} != util-macros ]] ; then
112 EAUTORECONF_DEPEND+=" >=x11-misc/util-macros-1.13.0" 112 EAUTORECONF_DEPEND+=" >=x11-misc/util-macros-1.14.0"
113 # Required even by xorg-server 113 # Required even by xorg-server
114 [[ ${PN} == "font-util" ]] || EAUTORECONF_DEPEND+=" >=media-fonts/font-util-1.2.0" 114 [[ ${PN} == "font-util" ]] || EAUTORECONF_DEPEND+=" >=media-fonts/font-util-1.2.0"
115fi 115fi
116WANT_AUTOCONF="latest" 116WANT_AUTOCONF="latest"
117WANT_AUTOMAKE="latest" 117WANT_AUTOMAKE="latest"
213if [[ -n "${DRIVER}" ]]; then 213if [[ -n "${DRIVER}" ]]; then
214 COMMON_DEPEND+=" 214 COMMON_DEPEND+="
215 x11-base/xorg-server[xorg] 215 x11-base/xorg-server[xorg]
216 " 216 "
217fi 217fi
218if [[ -n "${DRIVER}" && ${PN} == xf86-input-* ]]; then
219 DEPEND+="
220 x11-proto/inputproto
221 x11-proto/kbproto
222 x11-proto/xproto
223 "
224fi
218if [[ -n "${DRIVER}" && ${PN} == xf86-video-* ]]; then 225if [[ -n "${DRIVER}" && ${PN} == xf86-video-* ]]; then
219 COMMON_DEPEND+=" 226 COMMON_DEPEND+="
220 x11-libs/libpciaccess 227 x11-libs/libpciaccess
221 " 228 "
222 # we also needs some protos and libs in all cases 229 # we also needs some protos and libs in all cases
401 # @DESCRIPTION: 408 # @DESCRIPTION:
402 # Array of an additional options to pass to configure. 409 # Array of an additional options to pass to configure.
403 # @DEFAULT_UNSET 410 # @DEFAULT_UNSET
404 if [[ $(declare -p XORG_CONFIGURE_OPTIONS 2>&-) != "declare -a"* ]]; then 411 if [[ $(declare -p XORG_CONFIGURE_OPTIONS 2>&-) != "declare -a"* ]]; then
405 # fallback to CONFIGURE_OPTIONS, deprecated. 412 # fallback to CONFIGURE_OPTIONS, deprecated.
406 [[ -n "${CONFIGURE_OPTIONS}" ]] && \ 413 if [[ -n "${CONFIGURE_OPTIONS}" ]]; then
407 ewarn "QA: CONFIGURE_OPTIONS are deprecated. Please migrate to XORG_CONFIGURE_OPTIONS to preserve namespace." 414 eqawarn "CONFIGURE_OPTIONS are deprecated. Please migrate to XORG_CONFIGURE_OPTIONS"
415 eqawarn "to preserve namespace."
416 fi
417
408 local xorgconfadd=(${CONFIGURE_OPTIONS}) 418 local xorgconfadd=(${CONFIGURE_OPTIONS})
409 else 419 else
410 local xorgconfadd=("${XORG_CONFIGURE_OPTIONS[@]}") 420 local xorgconfadd=("${XORG_CONFIGURE_OPTIONS[@]}")
411 fi 421 fi
412 422
510# Create fonts.scale file, used by the old server-side fonts subsystem. 520# Create fonts.scale file, used by the old server-side fonts subsystem.
511create_fonts_scale() { 521create_fonts_scale() {
512 debug-print-function ${FUNCNAME} "$@" 522 debug-print-function ${FUNCNAME} "$@"
513 523
514 if [[ ${FONT_DIR} != Speedo && ${FONT_DIR} != CID ]]; then 524 if [[ ${FONT_DIR} != Speedo && ${FONT_DIR} != CID ]]; then
515 ebegin "Generating font.scale" 525 ebegin "Generating fonts.scale"
516 mkfontscale \ 526 mkfontscale \
517 -a "${EROOT}/usr/share/fonts/encodings/encodings.dir" \ 527 -a "${EROOT}/usr/share/fonts/encodings/encodings.dir" \
518 -- "${EROOT}/usr/share/fonts/${FONT_DIR}" 528 -- "${EROOT}/usr/share/fonts/${FONT_DIR}"
519 eend $? 529 eend $?
520 fi 530 fi

Legend:
Removed from v.1.41  
changed lines
  Added in v.1.49

  ViewVC Help
Powered by ViewVC 1.1.20