* [gentoo-commits] proj/x11:master commit in: eclass/
@ 2011-02-06 15:49 Michał Górny
0 siblings, 0 replies; 24+ messages in thread
From: Michał Górny @ 2011-02-06 15:49 UTC (permalink / raw
To: gentoo-commits
commit: 222e6724aa2e15d8f0c4933599a9d4bb82699141
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 6 15:18:49 2011 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Feb 6 15:48:38 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=222e6724
[eclass] The 'xserver' module has been moved to git root.
---
eclass/xorg-2.eclass | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/eclass/xorg-2.eclass b/eclass/xorg-2.eclass
index f9a267e..f5b46eb 100644
--- a/eclass/xorg-2.eclass
+++ b/eclass/xorg-2.eclass
@@ -73,7 +73,6 @@ if [[ -z ${MODULE} ]]; then
x11-apps|x11-wm) MODULE=app/ ;;
x11-misc|x11-themes) MODULE=util/ ;;
x11-drivers) MODULE=driver/ ;;
- x11-base) MODULE=xserver/ ;;
x11-proto) MODULE=proto/ ;;
x11-libs) MODULE=lib/ ;;
*) MODULE= ;;
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/x11:master commit in: eclass/
@ 2011-02-06 15:49 Michał Górny
0 siblings, 0 replies; 24+ messages in thread
From: Michał Górny @ 2011-02-06 15:49 UTC (permalink / raw
To: gentoo-commits
commit: 8504220bd56d70e8e3780a8b33366c063acd08cc
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 6 15:13:05 2011 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Feb 6 15:48:37 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=8504220b
[eclass] Simplify -- put the slash in MODULE instead of PACKAGE.
---
eclass/xorg-2.eclass | 24 +++++++++++-------------
1 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/eclass/xorg-2.eclass b/eclass/xorg-2.eclass
index b160be8..f9a267e 100644
--- a/eclass/xorg-2.eclass
+++ b/eclass/xorg-2.eclass
@@ -68,30 +68,28 @@ BASE_INDIVIDUAL_URI="http://xorg.freedesktop.org/releases/individual"
# inherit to override the default autoconfigured module.
if [[ -z ${MODULE} ]]; then
case ${CATEGORY} in
- app-doc) MODULE="doc" ;;
- media-fonts) MODULE="font" ;;
- x11-apps|x11-wm) MODULE="app" ;;
- x11-misc|x11-themes) MODULE="util" ;;
- x11-drivers) MODULE="driver" ;;
- x11-base) MODULE="xserver" ;;
- x11-proto) MODULE="proto" ;;
- x11-libs) MODULE="lib" ;;
- *) MODULE="" ;;
+ app-doc) MODULE=doc/ ;;
+ media-fonts) MODULE=font/ ;;
+ x11-apps|x11-wm) MODULE=app/ ;;
+ x11-misc|x11-themes) MODULE=util/ ;;
+ x11-drivers) MODULE=driver/ ;;
+ x11-base) MODULE=xserver/ ;;
+ x11-proto) MODULE=proto/ ;;
+ x11-libs) MODULE=lib/ ;;
+ *) MODULE= ;;
esac
fi
# @ECLASS-VARIABLE: PACKAGE_NAME
# @DESCRIPTION:
-# For git checkout the git repository migth differ from package name.
+# For git checkout the git repository might differ from package name.
# This variable can be used for proper directory specification
: ${PACKAGE_NAME:=${PN}}
-# PACKAGE_NAME can be empty value
-[[ -n ${PACKAGE_NAME} ]] && PACKAGE_NAME="/${PACKAGE_NAME}"
if [[ -n ${GIT_ECLASS} ]]; then
EGIT_REPO_URI="git://anongit.freedesktop.org/git/xorg/${MODULE}${PACKAGE_NAME}"
else
- SRC_URI+=" ${BASE_INDIVIDUAL_URI}/${MODULE}/${P}.tar.bz2"
+ SRC_URI+=" ${BASE_INDIVIDUAL_URI}/${MODULE}${P}.tar.bz2"
fi
: ${SLOT:=0}
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/x11:master commit in: eclass/
@ 2011-02-18 13:19 Tomas Chvatal
0 siblings, 0 replies; 24+ messages in thread
From: Tomas Chvatal @ 2011-02-18 13:19 UTC (permalink / raw
To: gentoo-commits
commit: b496f16a827a4634278de5b7c095092efdb68aca
Author: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 18 12:46:23 2011 +0000
Commit: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
CommitDate: Fri Feb 18 12:46:23 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=b496f16a
Import virtualx.eclass from cvs.
---
eclass/virtualx.eclass | 163 ++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 163 insertions(+), 0 deletions(-)
diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
new file mode 100644
index 0000000..52d1284
--- /dev/null
+++ b/eclass/virtualx.eclass
@@ -0,0 +1,163 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/eclass/virtualx.eclass,v 1.35 2010/05/15 05:40:46 dirtyepic Exp $
+
+# Original author: Martin Schlemmer <azarah@gentoo.org>
+
+# @ECLASS: virtualx.eclass
+# @MAINTAINER:
+# x11@gentoo.org
+# @BLURB: This eclass can be used for packages that needs a working X environment to build.
+
+# @ECLASS-VARIABLE: VIRTUALX_REQUIRED
+# @DESCRIPTION:
+# Is a dependency on xorg-server and xhost needed?
+# Valid values are "always", "optional", and "manual".
+# "tests" is a synonym for "optional".
+: ${VIRTUALX_REQUIRED:=optional}
+
+# @ECLASS-VARIABLE: VIRTUALX_USE
+# @DESCRIPTION:
+# If VIRTUALX_REQUIRED=optional, what USE flag should control
+# the dependency?
+: ${VIRTUALX_USE:=test}
+
+# @ECLASS-VARIABLE: VIRTUALX_DEPEND
+# @DESCRIPTION:
+# Dep string available for use outside of eclass, in case a more
+# complicated dep is needed.
+VIRTUALX_DEPEND="!prefix? ( x11-base/xorg-server )
+ x11-apps/xhost"
+
+case ${VIRTUALX_REQUIRED} in
+ always)
+ DEPEND="${VIRTUALX_DEPEND}"
+ RDEPEND=""
+ ;;
+ optional|tests)
+ DEPEND="${VIRTUALX_USE}? ( ${VIRTUALX_DEPEND} )"
+ RDEPEND=""
+ IUSE="${VIRTUALX_USE}"
+ ;;
+ manual)
+ ;;
+ *)
+ eerror "Invalid value (${VIRTUALX_REQUIRED}) for VIRTUALX_REQUIRED"
+ eerror "Valid values are:"
+ eerror " always"
+ eerror " optional (default if unset)"
+ eerror " manual"
+ die "Invalid value (${VIRTUALX_REQUIRED}) for VIRTUALX_REQUIRED"
+ ;;
+esac
+
+virtualmake() {
+ local retval=0
+ local OLD_SANDBOX_ON="${SANDBOX_ON}"
+ local XVFB=$(type -p Xvfb)
+ local XHOST=$(type -p xhost)
+
+ # If $DISPLAY is not set, or xhost cannot connect to an X
+ # display, then do the Xvfb hack.
+ if [[ -n ${XVFB} && -n ${XHOST} ]] && \
+ ( [[ -z ${DISPLAY} ]] || ! (${XHOST} &>/dev/null) ) ; then
+ export XAUTHORITY=
+ # The following is derived from Mandrake's hack to allow
+ # compiling without the X display
+
+ einfo "Scanning for an open DISPLAY to start Xvfb ..."
+
+ # We really do not want SANDBOX enabled here
+ export SANDBOX_ON="0"
+
+ local i=0
+ XDISPLAY=$(i=0; while [[ -f /tmp/.X${i}-lock ]] ; do ((i++));done; echo ${i})
+
+ # If we are in a chrooted environment, and there is already a
+ # X server started outside of the chroot, Xvfb will fail to start
+ # on the same display (most cases this is :0 ), so make sure
+ # Xvfb is started, else bump the display number
+ #
+ # Azarah - 5 May 2002
+ #
+ # Changed the mode from 800x600x32 to 800x600x24 because the mfb
+ # support has been dropped in Xvfb in the xorg-x11 pre-releases.
+ # For now only depths up to 24-bit are supported.
+ #
+ # Sven Wegener <swegener@gentoo.org> - 22 Aug 2004
+ #
+ # Use "-fp built-ins" because it's only part of the default font path
+ # for Xorg but not the other DDXs (Xvfb, Kdrive, etc). Temporarily fixes
+ # bug 278487 until xorg-server is properly patched
+ #
+ # Rémi Cardona <remi@gentoo.org> (10 Aug 2009)
+ ${XVFB} :${XDISPLAY} -fp built-ins -screen 0 800x600x24 &>/dev/null &
+ sleep 2
+
+ local start=${XDISPLAY}
+ while [[ ! -f /tmp/.X${XDISPLAY}-lock ]] ; do
+ # Stop trying after 15 tries
+ if ((XDISPLAY - start > 15)) ; then
+
+ eerror ""
+ eerror "Unable to start Xvfb."
+ eerror ""
+ eerror "'${XVFB} :${XDISPLAY} -fp built-ins -screen 0 800x600x24' returns:"
+ eerror ""
+ ${XVFB} :${XDISPLAY} -fp built-ins -screen 0 800x600x24
+ eerror ""
+ eerror "If possible, correct the above error and try your emerge again."
+ eerror ""
+ die
+ fi
+
+ ((XDISPLAY++))
+ ${XVFB} :${XDISPLAY} -fp built-ins -screen 0 800x600x24 &>/dev/null &
+ sleep 2
+ done
+
+ # Now enable SANDBOX again if needed.
+ export SANDBOX_ON="${OLD_SANDBOX_ON}"
+
+ einfo "Starting Xvfb on \$DISPLAY=${XDISPLAY} ..."
+
+ export DISPLAY=:${XDISPLAY}
+ #Do not break on error, but setup $retval, as we need
+ #to kill Xvfb
+ ${maketype} "$@"
+ retval=$?
+
+ #Now kill Xvfb
+ kill $(cat /tmp/.X${XDISPLAY}-lock)
+ else
+ #Normal make if we can connect to an X display
+ ${maketype} "$@"
+ retval=$?
+ fi
+
+ return ${retval}
+}
+
+# @FUNCTION: Xmake
+# @DESCRIPTION:
+# Same as "make", but set up the Xvfb hack if needed.
+Xmake() {
+ export maketype="make"
+ virtualmake "$@"
+}
+
+# @FUNCTION: Xemake
+# @DESCRIPTION:
+# Same as "emake", but set up the Xvfb hack if needed.
+Xemake() {
+ export maketype="emake"
+ virtualmake "$@"
+}
+
+# @FUNCTION: Xeconf
+# @DESCRIPTION:
+# Same as "econf", but set up the Xvfb hack if needed.
+Xeconf() {
+ export maketype="econf"
+ virtualmake "$@"
+}
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/x11:master commit in: eclass/
@ 2011-02-18 13:19 Tomas Chvatal
0 siblings, 0 replies; 24+ messages in thread
From: Tomas Chvatal @ 2011-02-18 13:19 UTC (permalink / raw
To: gentoo-commits
commit: aa5bc2471592baebcee90c9851af4cff31124617
Author: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 18 13:18:50 2011 +0000
Commit: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
CommitDate: Fri Feb 18 13:18:50 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=aa5bc247
virtualx.eclass cleanups
---
eclass/virtualx.eclass | 105 +++++++++++++++++++++++++----------------------
1 files changed, 56 insertions(+), 49 deletions(-)
diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
index 52d1284..5312f77 100644
--- a/eclass/virtualx.eclass
+++ b/eclass/virtualx.eclass
@@ -6,28 +6,32 @@
# @ECLASS: virtualx.eclass
# @MAINTAINER:
-# x11@gentoo.org
+# x11@gentoo.org
# @BLURB: This eclass can be used for packages that needs a working X environment to build.
# @ECLASS-VARIABLE: VIRTUALX_REQUIRED
# @DESCRIPTION:
-# Is a dependency on xorg-server and xhost needed?
-# Valid values are "always", "optional", and "manual".
-# "tests" is a synonym for "optional".
+# Is a dependency on xorg-server and xhost needed?
+# Valid values are "always", "optional", and "manual".
+# "tests" is a synonym for "optional".
: ${VIRTUALX_REQUIRED:=optional}
# @ECLASS-VARIABLE: VIRTUALX_USE
# @DESCRIPTION:
-# If VIRTUALX_REQUIRED=optional, what USE flag should control
-# the dependency?
+# If VIRTUALX_REQUIRED=optional, what USE flag should control
+# the dependency?
: ${VIRTUALX_USE:=test}
# @ECLASS-VARIABLE: VIRTUALX_DEPEND
# @DESCRIPTION:
-# Dep string available for use outside of eclass, in case a more
-# complicated dep is needed.
-VIRTUALX_DEPEND="!prefix? ( x11-base/xorg-server )
- x11-apps/xhost"
+# Dep string available for use outside of eclass, in case a more
+# complicated dep is needed.
+VIRTUALX_DEPEND="
+ !prefix? ( x11-base/xorg-server[-minimal] )
+ x11-apps/xhost
+"
+
+has "${EAPI:-0}" 0 1 && die "virtualx eclass require EAPI=2 or newer."
case ${VIRTUALX_REQUIRED} in
always)
@@ -51,68 +55,61 @@ case ${VIRTUALX_REQUIRED} in
;;
esac
+# @FUNCTION: Xmake
+# @DESCRIPTION:
+# Function which attach to running X session or start new Xvfb session
+# where the $maketype variable content gets executed.
virtualmake() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ local i=0
local retval=0
local OLD_SANDBOX_ON="${SANDBOX_ON}"
local XVFB=$(type -p Xvfb)
local XHOST=$(type -p xhost)
+ local xvfbargs="-screen 0 800x600x24"
# If $DISPLAY is not set, or xhost cannot connect to an X
# display, then do the Xvfb hack.
if [[ -n ${XVFB} && -n ${XHOST} ]] && \
- ( [[ -z ${DISPLAY} ]] || ! (${XHOST} &>/dev/null) ) ; then
+ ( [[ -z ${DISPLAY} ]] || ! (${XHOST} &>/dev/null) ) ; then
+ debug-print "${FUNCNAME}: running Xvfb hack"
export XAUTHORITY=
# The following is derived from Mandrake's hack to allow
# compiling without the X display
einfo "Scanning for an open DISPLAY to start Xvfb ..."
-
- # We really do not want SANDBOX enabled here
- export SANDBOX_ON="0"
-
- local i=0
- XDISPLAY=$(i=0; while [[ -f /tmp/.X${i}-lock ]] ; do ((i++));done; echo ${i})
-
# If we are in a chrooted environment, and there is already a
# X server started outside of the chroot, Xvfb will fail to start
# on the same display (most cases this is :0 ), so make sure
# Xvfb is started, else bump the display number
#
# Azarah - 5 May 2002
- #
- # Changed the mode from 800x600x32 to 800x600x24 because the mfb
- # support has been dropped in Xvfb in the xorg-x11 pre-releases.
- # For now only depths up to 24-bit are supported.
- #
- # Sven Wegener <swegener@gentoo.org> - 22 Aug 2004
- #
- # Use "-fp built-ins" because it's only part of the default font path
- # for Xorg but not the other DDXs (Xvfb, Kdrive, etc). Temporarily fixes
- # bug 278487 until xorg-server is properly patched
- #
- # Rémi Cardona <remi@gentoo.org> (10 Aug 2009)
- ${XVFB} :${XDISPLAY} -fp built-ins -screen 0 800x600x24 &>/dev/null &
+ XDISPLAY=$(i=0; while [[ -f /tmp/.X${i}-lock ]] ; do ((i++));done; echo ${i})
+ debug-print "${FUNCNAME}: XDISPLAY=${XDISPLAY}"
+
+ # We really do not want SANDBOX enabled here
+ export SANDBOX_ON="0"
+
+ debug-print "${FUNCNAME}: ${XVFB} :${XDISPLAY} ${xvfbargs}"
+ ${XVFB} :${XDISPLAY} ${xvfbargs} &>/dev/null &
sleep 2
local start=${XDISPLAY}
- while [[ ! -f /tmp/.X${XDISPLAY}-lock ]] ; do
+ while [[ ! -f /tmp/.X${XDISPLAY}-lock ]]; do
# Stop trying after 15 tries
if ((XDISPLAY - start > 15)) ; then
-
- eerror ""
- eerror "Unable to start Xvfb."
- eerror ""
- eerror "'${XVFB} :${XDISPLAY} -fp built-ins -screen 0 800x600x24' returns:"
- eerror ""
- ${XVFB} :${XDISPLAY} -fp built-ins -screen 0 800x600x24
- eerror ""
+ eerror "'${XVFB} :${XDISPLAY} ${xvfbargs}' returns:"
+ echo
+ ${XVFB} :${XDISPLAY} ${xvfbargs}
+ echo
eerror "If possible, correct the above error and try your emerge again."
- eerror ""
- die
+ die "Unable to start Xvfb"
fi
((XDISPLAY++))
- ${XVFB} :${XDISPLAY} -fp built-ins -screen 0 800x600x24 &>/dev/null &
+ debug-print "${FUNCNAME}: ${XVFB} :${XDISPLAY} ${xvfbargs}"
+ ${XVFB} :${XDISPLAY} ${xvfbargs} &>/dev/null &
sleep 2
done
@@ -122,15 +119,16 @@ virtualmake() {
einfo "Starting Xvfb on \$DISPLAY=${XDISPLAY} ..."
export DISPLAY=:${XDISPLAY}
- #Do not break on error, but setup $retval, as we need
- #to kill Xvfb
+ # Do not break on error, but setup $retval, as we need
+ # to kill Xvfb
${maketype} "$@"
retval=$?
- #Now kill Xvfb
+ # Now kill Xvfb
kill $(cat /tmp/.X${XDISPLAY}-lock)
else
- #Normal make if we can connect to an X display
+ debug-print "${FUNCNAME}: attaching to running X display"
+ # Normal make if we can connect to an X display
${maketype} "$@"
retval=$?
fi
@@ -140,16 +138,23 @@ virtualmake() {
# @FUNCTION: Xmake
# @DESCRIPTION:
-# Same as "make", but set up the Xvfb hack if needed.
+# Same as "make", but set up the Xvfb hack if needed.
+# Deprecated call.
Xmake() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ ewarn "QA: you should not execute make directly"
+ ewarn "QA: rather execute emake -j1 if you have issues with parallel make"
export maketype="make"
virtualmake "$@"
}
# @FUNCTION: Xemake
# @DESCRIPTION:
-# Same as "emake", but set up the Xvfb hack if needed.
+# Same as "emake", but set up the Xvfb hack if needed.
Xemake() {
+ debug-print-function ${FUNCNAME} "$@"
+
export maketype="emake"
virtualmake "$@"
}
@@ -158,6 +163,8 @@ Xemake() {
# @DESCRIPTION:
# Same as "econf", but set up the Xvfb hack if needed.
Xeconf() {
+ debug-print-function ${FUNCNAME} "$@"
+
export maketype="econf"
virtualmake "$@"
}
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/x11:master commit in: eclass/
@ 2011-02-18 13:26 Tomas Chvatal
0 siblings, 0 replies; 24+ messages in thread
From: Tomas Chvatal @ 2011-02-18 13:26 UTC (permalink / raw
To: gentoo-commits
commit: 22e8804345000b5b6aabea1c739403da1117400d
Author: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 18 13:25:25 2011 +0000
Commit: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
CommitDate: Fri Feb 18 13:25:25 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=22e88043
virtualx.eclass fix typo
---
eclass/virtualx.eclass | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
index 5312f77..d921dec 100644
--- a/eclass/virtualx.eclass
+++ b/eclass/virtualx.eclass
@@ -55,7 +55,7 @@ case ${VIRTUALX_REQUIRED} in
;;
esac
-# @FUNCTION: Xmake
+# @FUNCTION: virtualmake
# @DESCRIPTION:
# Function which attach to running X session or start new Xvfb session
# where the $maketype variable content gets executed.
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/x11:master commit in: eclass/
@ 2011-02-18 14:48 Tomas Chvatal
0 siblings, 0 replies; 24+ messages in thread
From: Tomas Chvatal @ 2011-02-18 14:48 UTC (permalink / raw
To: gentoo-commits
commit: 5ac0f8a91e13e11f585486f1fc1555978fbde2e6
Author: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 18 14:47:08 2011 +0000
Commit: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
CommitDate: Fri Feb 18 14:47:08 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=5ac0f8a9
virtualx.eclass update qawarn comment.
---
eclass/virtualx.eclass | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
index d921dec..c248c4d 100644
--- a/eclass/virtualx.eclass
+++ b/eclass/virtualx.eclass
@@ -144,7 +144,7 @@ Xmake() {
debug-print-function ${FUNCNAME} "$@"
ewarn "QA: you should not execute make directly"
- ewarn "QA: rather execute emake -j1 if you have issues with parallel make"
+ ewarn "QA: rather execute Xemake -j1 if you have issues with parallel make"
export maketype="make"
virtualmake "$@"
}
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/x11:master commit in: eclass/
@ 2011-02-19 13:50 Tomas Chvatal
0 siblings, 0 replies; 24+ messages in thread
From: Tomas Chvatal @ 2011-02-19 13:50 UTC (permalink / raw
To: gentoo-commits
commit: 6c373f3730bc34b6ed063c4195d5d5f6fd05fb0a
Author: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 19 13:49:40 2011 +0000
Commit: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
CommitDate: Sat Feb 19 13:49:40 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=6c373f37
Update xorg-2 eclass WRT xorg-server once again.
---
eclass/xorg-2.eclass | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/eclass/xorg-2.eclass b/eclass/xorg-2.eclass
index f5b46eb..cf1e6dd 100644
--- a/eclass/xorg-2.eclass
+++ b/eclass/xorg-2.eclass
@@ -72,6 +72,7 @@ if [[ -z ${MODULE} ]]; then
media-fonts) MODULE=font/ ;;
x11-apps|x11-wm) MODULE=app/ ;;
x11-misc|x11-themes) MODULE=util/ ;;
+ x11-base) MODULE=xserver/ ;;
x11-drivers) MODULE=driver/ ;;
x11-proto) MODULE=proto/ ;;
x11-libs) MODULE=lib/ ;;
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/x11:master commit in: eclass/
@ 2011-02-21 18:20 Tomas Chvatal
0 siblings, 0 replies; 24+ messages in thread
From: Tomas Chvatal @ 2011-02-21 18:20 UTC (permalink / raw
To: gentoo-commits
commit: a692d69588c7f0cfb20edb4303c214290f1e7e4b
Author: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 21 18:19:25 2011 +0000
Commit: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
CommitDate: Mon Feb 21 18:19:25 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=a692d695
Introduce VIRTUALX_COMMAND instead of weird export maketype=...
---
eclass/virtualx.eclass | 26 ++++++++++++++++++--------
1 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
index c248c4d..2acdebb 100644
--- a/eclass/virtualx.eclass
+++ b/eclass/virtualx.eclass
@@ -31,6 +31,11 @@ VIRTUALX_DEPEND="
x11-apps/xhost
"
+# @ECLASS-VARIABLE: VIRTUALX_COMMAND
+# @DESCRIPTION:
+# Command (or eclass function call) to be run in the X11 environment
+: ${VIRTUALX_COMMAND:="emake"}
+
has "${EAPI:-0}" 0 1 && die "virtualx eclass require EAPI=2 or newer."
case ${VIRTUALX_REQUIRED} in
@@ -69,6 +74,14 @@ virtualmake() {
local XHOST=$(type -p xhost)
local xvfbargs="-screen 0 800x600x24"
+ # backcompat for maketype
+ if [[ -n ${maketype} ]]; then
+ ewarn "QA: ebuild is exporting \$maketype=${maketype}"
+ ewarn "QA: Ebuild should be migrated to use VIRTUALX_COMMAND=${maketype} instead."
+ ewarn "QA: Setting VIRTUALX_COMMAND to \$maketype conviniently for now."
+ VIRTUALX_COMMAND=${maketype}
+ fi
+
# If $DISPLAY is not set, or xhost cannot connect to an X
# display, then do the Xvfb hack.
if [[ -n ${XVFB} && -n ${XHOST} ]] && \
@@ -121,7 +134,7 @@ virtualmake() {
export DISPLAY=:${XDISPLAY}
# Do not break on error, but setup $retval, as we need
# to kill Xvfb
- ${maketype} "$@"
+ ${VIRTUALX_COMMAND} "$@"
retval=$?
# Now kill Xvfb
@@ -129,7 +142,7 @@ virtualmake() {
else
debug-print "${FUNCNAME}: attaching to running X display"
# Normal make if we can connect to an X display
- ${maketype} "$@"
+ ${VIRTUALX_COMMAND} "$@"
retval=$?
fi
@@ -145,8 +158,7 @@ Xmake() {
ewarn "QA: you should not execute make directly"
ewarn "QA: rather execute Xemake -j1 if you have issues with parallel make"
- export maketype="make"
- virtualmake "$@"
+ VIRTUALX_COMMAND="emake" virtualmake "$@"
}
# @FUNCTION: Xemake
@@ -155,8 +167,7 @@ Xmake() {
Xemake() {
debug-print-function ${FUNCNAME} "$@"
- export maketype="emake"
- virtualmake "$@"
+ VIRTUALX_COMMAND="emake" virtualmake "$@"
}
# @FUNCTION: Xeconf
@@ -165,6 +176,5 @@ Xemake() {
Xeconf() {
debug-print-function ${FUNCNAME} "$@"
- export maketype="econf"
- virtualmake "$@"
+ VIRTUALX_COMMAND="econf" virtualmake "$@"
}
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/x11:master commit in: eclass/
@ 2011-02-21 18:22 Tomas Chvatal
0 siblings, 0 replies; 24+ messages in thread
From: Tomas Chvatal @ 2011-02-21 18:22 UTC (permalink / raw
To: gentoo-commits
commit: e9e6c5c60b6f7d6ea58b82c7938e2a2b79574381
Author: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 21 18:20:58 2011 +0000
Commit: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
CommitDate: Mon Feb 21 18:20:58 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=e9e6c5c6
Fix copy/pasto
---
eclass/virtualx.eclass | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
index 2acdebb..c19abfb 100644
--- a/eclass/virtualx.eclass
+++ b/eclass/virtualx.eclass
@@ -167,7 +167,7 @@ Xmake() {
Xemake() {
debug-print-function ${FUNCNAME} "$@"
- VIRTUALX_COMMAND="emake" virtualmake "$@"
+ VIRTUALX_COMMAND="make" virtualmake "$@"
}
# @FUNCTION: Xeconf
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/x11:master commit in: eclass/
@ 2011-02-21 18:30 Tomas Chvatal
0 siblings, 0 replies; 24+ messages in thread
From: Tomas Chvatal @ 2011-02-21 18:30 UTC (permalink / raw
To: gentoo-commits
commit: 804d799bcf2db0daeab7de9d2b7e8ddce4cb1883
Author: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 21 18:29:30 2011 +0000
Commit: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
CommitDate: Mon Feb 21 18:29:30 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=804d799b
Fix comment + fix typo in ewarn.
---
eclass/virtualx.eclass | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
index c19abfb..9150c5a 100644
--- a/eclass/virtualx.eclass
+++ b/eclass/virtualx.eclass
@@ -63,7 +63,7 @@ esac
# @FUNCTION: virtualmake
# @DESCRIPTION:
# Function which attach to running X session or start new Xvfb session
-# where the $maketype variable content gets executed.
+# where the VIRTUALX_COMMAND variable content gets executed.
virtualmake() {
debug-print-function ${FUNCNAME} "$@"
@@ -78,7 +78,7 @@ virtualmake() {
if [[ -n ${maketype} ]]; then
ewarn "QA: ebuild is exporting \$maketype=${maketype}"
ewarn "QA: Ebuild should be migrated to use VIRTUALX_COMMAND=${maketype} instead."
- ewarn "QA: Setting VIRTUALX_COMMAND to \$maketype conviniently for now."
+ ewarn "QA: Setting VIRTUALX_COMMAND to \$maketype conveniently for now."
VIRTUALX_COMMAND=${maketype}
fi
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/x11:master commit in: eclass/
@ 2011-02-21 19:07 Tomas Chvatal
0 siblings, 0 replies; 24+ messages in thread
From: Tomas Chvatal @ 2011-02-21 19:07 UTC (permalink / raw
To: gentoo-commits
commit: 51b087f45fae09dcc3bdadadbfdca18a9377699e
Author: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 21 19:05:55 2011 +0000
Commit: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
CommitDate: Mon Feb 21 19:05:55 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=51b087f4
virtualx.eclass overhaul the VIRTUALX_REQUIRED, Deprecate VIRTUALX_USE and adjust the VIRTUALX_DEPEND a bit.
---
eclass/virtualx.eclass | 47 ++++++++++++++++++++++++++++-------------------
1 files changed, 28 insertions(+), 19 deletions(-)
diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
index 9150c5a..4ac7bed 100644
--- a/eclass/virtualx.eclass
+++ b/eclass/virtualx.eclass
@@ -11,22 +11,20 @@
# @ECLASS-VARIABLE: VIRTUALX_REQUIRED
# @DESCRIPTION:
-# Is a dependency on xorg-server and xhost needed?
-# Valid values are "always", "optional", and "manual".
-# "tests" is a synonym for "optional".
-: ${VIRTUALX_REQUIRED:=optional}
-
-# @ECLASS-VARIABLE: VIRTUALX_USE
-# @DESCRIPTION:
-# If VIRTUALX_REQUIRED=optional, what USE flag should control
-# the dependency?
-: ${VIRTUALX_USE:=test}
+# Variable specifying the dependency on xorg-server and xhost.
+# Possible special values are "always" and "manual", which specify
+# the dependency to be set unconditionaly or not at all.
+# Any other value is taken as useflag desired to be in control of
+# the dependency (eg. VIRTUALX_REQUIRED="kde" will add the dependency
+# into "kde? ( )" and add kde into IUSE.
+: ${VIRTUALX_REQUIRED:=test}
# @ECLASS-VARIABLE: VIRTUALX_DEPEND
# @DESCRIPTION:
# Dep string available for use outside of eclass, in case a more
# complicated dep is needed.
-VIRTUALX_DEPEND="
+# You can specify the variable BEFORE inherit to add more dependencies.
+VIRTUALX_DEPEND="${VIRTUALX_DEPEND}
!prefix? ( x11-base/xorg-server[-minimal] )
x11-apps/xhost
"
@@ -34,29 +32,40 @@ VIRTUALX_DEPEND="
# @ECLASS-VARIABLE: VIRTUALX_COMMAND
# @DESCRIPTION:
# Command (or eclass function call) to be run in the X11 environment
+# (within virtualmake function).
: ${VIRTUALX_COMMAND:="emake"}
has "${EAPI:-0}" 0 1 && die "virtualx eclass require EAPI=2 or newer."
case ${VIRTUALX_REQUIRED} in
+ manual)
+ ;;
always)
DEPEND="${VIRTUALX_DEPEND}"
RDEPEND=""
;;
optional|tests)
+ # deprecated section YAY.
+ ewarn "QA: VIRTUALX_REQUIRED=optional and VIRTUALX_REQUIRED=tests are deprecated."
+ ewarn "QA: You can drop the variable definition completely from ebuild,"
+ ewarn "QA: because it is default behaviour."
+
+ if [[ -n ${VIRTUALX_USE} ]]; then
+ # so they like to specify the useflag
+ ewarn "QA: VIRTUALX_USE variable is deprecated."
+ ewarn "QA: Please read eclass manpage to find out how to use VIRTUALX_REQUIRED"
+ ewarn "QA: to achieve the same behaviour."
+ fi
+
+ [[ -z ${VIRTUALX_USE} ]] && VIRTUALX_USE="test"
DEPEND="${VIRTUALX_USE}? ( ${VIRTUALX_DEPEND} )"
RDEPEND=""
IUSE="${VIRTUALX_USE}"
;;
- manual)
- ;;
*)
- eerror "Invalid value (${VIRTUALX_REQUIRED}) for VIRTUALX_REQUIRED"
- eerror "Valid values are:"
- eerror " always"
- eerror " optional (default if unset)"
- eerror " manual"
- die "Invalid value (${VIRTUALX_REQUIRED}) for VIRTUALX_REQUIRED"
+ DEPEND="${VIRTUALX_REQUIRED}? ( ${VIRTUALX_DEPEND} )"
+ RDEPEND=""
+ IUSE="${VIRTUALX_REQUIRED}"
;;
esac
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/x11:master commit in: eclass/
@ 2011-02-21 19:39 Tomas Chvatal
0 siblings, 0 replies; 24+ messages in thread
From: Tomas Chvatal @ 2011-02-21 19:39 UTC (permalink / raw
To: gentoo-commits
commit: c3676df02ea586927199c29409f8fdf62ff801ec
Author: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 21 19:37:53 2011 +0000
Commit: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
CommitDate: Mon Feb 21 19:37:53 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=c3676df0
virtualx.eclass add two more usefull debug-prints.
---
eclass/virtualx.eclass | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
index 4ac7bed..318067a 100644
--- a/eclass/virtualx.eclass
+++ b/eclass/virtualx.eclass
@@ -143,6 +143,7 @@ virtualmake() {
export DISPLAY=:${XDISPLAY}
# Do not break on error, but setup $retval, as we need
# to kill Xvfb
+ debug-print "${FUNCNAME}: ${VIRTUALX_COMMAND} \"$@\""
${VIRTUALX_COMMAND} "$@"
retval=$?
@@ -151,6 +152,7 @@ virtualmake() {
else
debug-print "${FUNCNAME}: attaching to running X display"
# Normal make if we can connect to an X display
+ debug-print "${FUNCNAME}: ${VIRTUALX_COMMAND} \"$@\""
${VIRTUALX_COMMAND} "$@"
retval=$?
fi
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/x11:master commit in: eclass/
@ 2011-02-21 19:48 Tomas Chvatal
0 siblings, 0 replies; 24+ messages in thread
From: Tomas Chvatal @ 2011-02-21 19:48 UTC (permalink / raw
To: gentoo-commits
commit: ab242437f816c5da9a4ab7317d03bf498b2315c8
Author: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 21 19:47:01 2011 +0000
Commit: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
CommitDate: Mon Feb 21 19:47:01 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=ab242437
virtualx.eclass nowdays everyone expect eclass functions to die on their own so do so.
---
eclass/virtualx.eclass | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
index 318067a..e6bb392 100644
--- a/eclass/virtualx.eclass
+++ b/eclass/virtualx.eclass
@@ -157,7 +157,8 @@ virtualmake() {
retval=$?
fi
- return ${retval}
+ # die if our command failed
+ [[ $? -ne 0 ]] && die "${FUNCNAME}: the ${VIRTALX_COMMAND} failed."
}
# @FUNCTION: Xmake
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/x11:master commit in: eclass/
@ 2011-02-22 13:28 Tomas Chvatal
0 siblings, 0 replies; 24+ messages in thread
From: Tomas Chvatal @ 2011-02-22 13:28 UTC (permalink / raw
To: gentoo-commits
commit: 8e0cc2d997e5e6712b38b0b81c82b0479a542d49
Author: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 22 13:23:18 2011 +0000
Commit: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
CommitDate: Tue Feb 22 13:28:01 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=8e0cc2d9
xorg-2.eclass add quotes.
---
eclass/xorg-2.eclass | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/eclass/xorg-2.eclass b/eclass/xorg-2.eclass
index cf1e6dd..04eeb56 100644
--- a/eclass/xorg-2.eclass
+++ b/eclass/xorg-2.eclass
@@ -353,11 +353,11 @@ xorg-2_src_install() {
if [[ ${CATEGORY} == x11-proto ]]; then
autotools-utils_src_install \
- ${PN/proto/}docdir=${EPREFIX}/usr/share/doc/${PF} \
- docdir=${EPREFIX}/usr/share/doc/${PF}
+ ${PN/proto/}docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ docdir="${EPREFIX}/usr/share/doc/${PF}"
else
autotools-utils_src_install \
- docdir=${EPREFIX}/usr/share/doc/${PF}
+ docdir="${EPREFIX}/usr/share/doc/${PF}"
fi
if [[ -n ${GIT_ECLASS} ]]; then
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/x11:master commit in: eclass/
@ 2011-02-24 14:31 Tomas Chvatal
0 siblings, 0 replies; 24+ messages in thread
From: Tomas Chvatal @ 2011-02-24 14:31 UTC (permalink / raw
To: gentoo-commits
commit: ad26a0ba070d1e3f7cf391ec0889a0586c12a43e
Author: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 24 14:10:34 2011 +0000
Commit: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
CommitDate: Thu Feb 24 14:10:34 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=ad26a0ba
Add common dependency handling for video drivers into eclass.
---
eclass/xorg-2.eclass | 38 +++++++++++++++++++++++++++++++++++---
1 files changed, 35 insertions(+), 3 deletions(-)
diff --git a/eclass/xorg-2.eclass b/eclass/xorg-2.eclass
index 04eeb56..103979b 100644
--- a/eclass/xorg-2.eclass
+++ b/eclass/xorg-2.eclass
@@ -174,9 +174,34 @@ fi
DEPEND+=" >=dev-util/pkgconfig-0.23"
-# Check deps on xorg-server
-has dri ${IUSE//+} && DEPEND+=" dri? ( >=x11-base/xorg-server-1.6.3.901-r2[-minimal] )"
-[[ -n "${DRIVER}" ]] && DEPEND+=" x11-base/xorg-server[xorg]"
+# Check deps on drivers
+if has dri ${IUSE//+}; then
+ COMMON_DEPEND+=" dri? (
+ x11-base/xorg-server[-minimal]
+ x11-libs/libdrm
+ )"
+ DEPEND+=" dri? (
+ x11-proto/xf86driproto
+ x11-proto/glproto
+ x11-proto/dri2proto
+ )"
+fi
+if [[ -n "${DRIVER}" ]]; then
+ COMMON_DEPEND+="
+ x11-base/xorg-server[xorg]
+ x11-libs/libpciaccess
+ "
+ # we also needs some protos and libs in all cases
+ DEPEND+="
+ x11-proto/fontsproto
+ x11-proto/randrproto
+ x11-proto/renderproto
+ x11-proto/videoproto
+ x11-proto/xextproto
+ x11-proto/xineramaproto
+ x11-proto/xproto
+ "
+fi
# Add deps on documentation
# Most docbooks use dtd version 4.2 and 4.3 add more when found
@@ -191,6 +216,13 @@ if has doc ${IUSE//+}; then
"
fi
+DEPEND+=" ${COMMON_DEPEND}"
+RDEPEND+=" ${COMMON_DEPEND}"
+unset COMMON_DEPEND
+
+debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: DEPEND=${DEPEND}"
+debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: RDEPEND=${RDEPEND}"
+
# @FUNCTION: xorg-2_pkg_setup
# @DESCRIPTION:
# Setup prefix compat
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/x11:master commit in: eclass/
@ 2011-03-01 18:57 Tomas Chvatal
0 siblings, 0 replies; 24+ messages in thread
From: Tomas Chvatal @ 2011-03-01 18:57 UTC (permalink / raw
To: gentoo-commits
commit: 9c91c3de17649fae9e77fbc74dd5924860eda5a1
Author: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 1 18:57:18 2011 +0000
Commit: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
CommitDate: Tue Mar 1 18:57:18 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=9c91c3de
[eclass] xorg-2 eclass moved to main tree.
---
eclass/xorg-2.eclass | 482 --------------------------------------------------
1 files changed, 0 insertions(+), 482 deletions(-)
diff --git a/eclass/xorg-2.eclass b/eclass/xorg-2.eclass
deleted file mode 100644
index 103979b..0000000
--- a/eclass/xorg-2.eclass
+++ /dev/null
@@ -1,482 +0,0 @@
-# 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.22 2011/01/15 17:55:21 scarabeus Exp $
-#
-# @ECLASS: xorg-2.eclass
-# @MAINTAINER:
-# x11@gentoo.org
-# @BLURB: Reduces code duplication in the modularized X11 ebuilds.
-# @DESCRIPTION:
-# This eclass makes trivial X ebuilds possible for apps, fonts, drivers,
-# and more. Many things that would normally be done in various functions
-# can be accessed by setting variables instead, such as patching,
-# running eautoreconf, passing options to configure and installing docs.
-#
-# All you need to do in a basic ebuild is inherit this eclass and set
-# DESCRIPTION, KEYWORDS and RDEPEND/DEPEND. If your package is hosted
-# with the other X packages, you don't need to set SRC_URI. Pretty much
-# everything else should be automatic.
-
-# Author: Tomáš Chvátal <scarabeus@gentoo.org>
-# Author: Donnie Berkholz <dberkholz@gentoo.org>
-
-GIT_ECLASS=""
-if [[ ${PV} == *9999* ]]; then
- GIT_ECLASS="git"
- XORG_EAUTORECONF="yes"
- SRC_URI=""
-fi
-
-# If we're a font package, but not the font.alias one
-FONT_ECLASS=""
-if [[ ${PN} == font* \
- && ${CATEGORY} = media-fonts \
- && ${PN} != font-alias \
- && ${PN} != font-util ]]; then
- # Activate font code in the rest of the eclass
- FONT="yes"
- FONT_ECLASS="font"
-fi
-
-inherit autotools-utils eutils libtool multilib toolchain-funcs flag-o-matic autotools \
- ${FONT_ECLASS} ${GIT_ECLASS}
-
-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" ;;
-esac
-
-# exports must be ALWAYS after inherit
-EXPORT_FUNCTIONS ${EXPORTED_FUNCTIONS}
-
-IUSE=""
-HOMEPAGE="http://xorg.freedesktop.org/"
-
-# @ECLASS-VARIABLE: XORG_EAUTORECONF
-# @DESCRIPTION:
-# If set to 'yes' and configure.ac exists, eautoreconf will run. Set
-# before inheriting this eclass.
-: ${XORG_EAUTORECONF:="no"}
-
-# Set up SRC_URI for individual modular releases
-BASE_INDIVIDUAL_URI="http://xorg.freedesktop.org/releases/individual"
-# @ECLASS-VARIABLE: MODULE
-# @DESCRIPTION:
-# The subdirectory to download source from. Possible settings are app,
-# doc, data, util, driver, font, lib, proto, xserver. Set above the
-# inherit to override the default autoconfigured module.
-if [[ -z ${MODULE} ]]; then
- case ${CATEGORY} in
- app-doc) MODULE=doc/ ;;
- media-fonts) MODULE=font/ ;;
- x11-apps|x11-wm) MODULE=app/ ;;
- x11-misc|x11-themes) MODULE=util/ ;;
- x11-base) MODULE=xserver/ ;;
- x11-drivers) MODULE=driver/ ;;
- x11-proto) MODULE=proto/ ;;
- x11-libs) MODULE=lib/ ;;
- *) MODULE= ;;
- esac
-fi
-
-# @ECLASS-VARIABLE: PACKAGE_NAME
-# @DESCRIPTION:
-# For git checkout the git repository might differ from package name.
-# This variable can be used for proper directory specification
-: ${PACKAGE_NAME:=${PN}}
-
-if [[ -n ${GIT_ECLASS} ]]; then
- EGIT_REPO_URI="git://anongit.freedesktop.org/git/xorg/${MODULE}${PACKAGE_NAME}"
-else
- SRC_URI+=" ${BASE_INDIVIDUAL_URI}/${MODULE}${P}.tar.bz2"
-fi
-
-: ${SLOT:=0}
-
-# Set the license for the package. This can be overridden by setting
-# LICENSE after the inherit. Nearly all FreeDesktop-hosted X packages
-# are under the MIT license. (This is what Red Hat does in their rpms)
-: ${LICENSE:=MIT}
-
-# Set up autotools shared dependencies
-# Remember that all versions here MUST be stable
-XORG_EAUTORECONF_ARCHES="x86-interix ppc-aix x86-winnt"
-EAUTORECONF_DEPEND+="
- >=sys-devel/libtool-2.2.6a
- sys-devel/m4"
-if [[ ${PN} != util-macros ]] ; then
- EAUTORECONF_DEPEND+=" >=x11-misc/util-macros-1.11.0"
- # Required even by xorg-server
- [[ ${PN} == "font-util" ]] || EAUTORECONF_DEPEND+=" >=media-fonts/font-util-1.1.1-r1"
-fi
-WANT_AUTOCONF="latest"
-WANT_AUTOMAKE="latest"
-for arch in ${XORG_EAUTORECONF_ARCHES}; do
- EAUTORECONF_DEPENDS+=" ${arch}? ( ${EAUTORECONF_DEPEND} )"
-done
-DEPEND+=" ${EAUTORECONF_DEPENDS}"
-[[ ${XORG_EAUTORECONF} != no ]] && DEPEND+=" ${EAUTORECONF_DEPEND}"
-unset EAUTORECONF_DEPENDS
-unset EAUTORECONF_DEPEND
-
-if [[ ${FONT} == yes ]]; then
- RDEPEND+=" media-fonts/encodings
- x11-apps/mkfontscale
- x11-apps/mkfontdir"
- PDEPEND+=" media-fonts/font-alias"
- DEPEND+=" >=media-fonts/font-util-1.1.1-r1"
-
- # @ECLASS-VARIABLE: FONT_DIR
- # @DESCRIPTION:
- # If you're creating a font package and the suffix of PN is not equal to
- # the subdirectory of /usr/share/fonts/ it should install into, set
- # FONT_DIR to that directory or directories. Set before inheriting this
- # eclass.
- [[ -z ${FONT_DIR} ]] && FONT_DIR=${PN##*-}
-
- # Fix case of font directories
- FONT_DIR=${FONT_DIR/ttf/TTF}
- FONT_DIR=${FONT_DIR/otf/OTF}
- FONT_DIR=${FONT_DIR/type1/Type1}
- FONT_DIR=${FONT_DIR/speedo/Speedo}
-
- # Set up configure options, wrapped so ebuilds can override if need be
- [[ -z ${FONT_OPTIONS} ]] && FONT_OPTIONS="--with-fontdir=\"${EPREFIX}/usr/share/fonts/${FONT_DIR}\""
-
- [[ ${PN##*-} = misc || ${PN##*-} = 75dpi || ${PN##*-} = 100dpi || ${PN##*-} = cyrillic ]] && IUSE+=" nls"
-fi
-
-# If we're a driver package, then enable DRIVER case
-[[ ${PN} == xf86-video-* || ${PN} == xf86-input-* ]] && DRIVER="yes"
-
-# @ECLASS-VARIABLE: XORG_STATIC
-# @DESCRIPTION:
-# Enables static-libs useflag. Set to no, if your package gets:
-#
-# QA: configure: WARNING: unrecognized options: --disable-static
-: ${XORG_STATIC:="yes"}
-
-# Add static-libs useflag where usefull.
-if [[ ${XORG_STATIC} == yes \
- && ${FONT} != yes \
- && ${CATEGORY} != app-doc \
- && ${CATEGORY} != x11-apps \
- && ${CATEGORY} != x11-proto \
- && ${CATEGORY} != x11-drivers \
- && ${CATEGORY} != media-fonts \
- && ${PN} != util-macros \
- && ${PN} != xbitmaps \
- && ${PN} != xorg-cf-files \
- && ${PN/xcursor} = ${PN} ]]; then
- IUSE+=" static-libs"
-fi
-
-DEPEND+=" >=dev-util/pkgconfig-0.23"
-
-# Check deps on drivers
-if has dri ${IUSE//+}; then
- COMMON_DEPEND+=" dri? (
- x11-base/xorg-server[-minimal]
- x11-libs/libdrm
- )"
- DEPEND+=" dri? (
- x11-proto/xf86driproto
- x11-proto/glproto
- x11-proto/dri2proto
- )"
-fi
-if [[ -n "${DRIVER}" ]]; then
- COMMON_DEPEND+="
- x11-base/xorg-server[xorg]
- x11-libs/libpciaccess
- "
- # we also needs some protos and libs in all cases
- DEPEND+="
- x11-proto/fontsproto
- x11-proto/randrproto
- x11-proto/renderproto
- x11-proto/videoproto
- x11-proto/xextproto
- x11-proto/xineramaproto
- x11-proto/xproto
- "
-fi
-
-# Add deps on documentation
-# Most docbooks use dtd version 4.2 and 4.3 add more when found
-if has doc ${IUSE//+}; then
- DEPEND+="
- doc? (
- app-text/xmlto
- app-doc/doxygen
- app-text/docbook-xml-dtd:4.2
- app-text/docbook-xml-dtd:4.3
- )
- "
-fi
-
-DEPEND+=" ${COMMON_DEPEND}"
-RDEPEND+=" ${COMMON_DEPEND}"
-unset COMMON_DEPEND
-
-debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: DEPEND=${DEPEND}"
-debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: RDEPEND=${RDEPEND}"
-
-# @FUNCTION: xorg-2_pkg_setup
-# @DESCRIPTION:
-# Setup prefix compat
-xorg-2_pkg_setup() {
- debug-print-function ${FUNCNAME} "$@"
-
- [[ ${FONT} == yes ]] && font_pkg_setup "$@"
-}
-
-# @FUNCTION: xorg-2_src_unpack
-# @DESCRIPTION:
-# Simply unpack source code.
-xorg-2_src_unpack() {
- debug-print-function ${FUNCNAME} "$@"
-
- if [[ -n ${GIT_ECLASS} ]]; then
- git_src_unpack
- else
- unpack ${A}
- fi
-
- [[ -n ${FONT_OPTIONS} ]] && einfo "Detected font directory: ${FONT_DIR}"
-}
-
-# @FUNCTION: xorg-2_patch_source
-# @DESCRIPTION:
-# Apply all patches
-xorg-2_patch_source() {
- debug-print-function ${FUNCNAME} "$@"
-
- # Use standardized names and locations with bulk patching
- # Patch directory is ${WORKDIR}/patch
- # See epatch() in eutils.eclass for more documentation
- EPATCH_SUFFIX=${EPATCH_SUFFIX:=patch}
-
- [[ -d "${EPATCH_SOURCE}" ]] && epatch
- autotools-utils_src_prepare "$@"
-}
-
-# @FUNCTION: xorg-2_reconf_source
-# @DESCRIPTION:
-# Run eautoreconf if necessary, and run elibtoolize.
-xorg-2_reconf_source() {
- debug-print-function ${FUNCNAME} "$@"
-
- case ${CHOST} in
- *-interix* | *-aix* | *-winnt*)
- # some hosts need full eautoreconf
- [[ -e "./configure.ac" || -e "./configure.in" ]] && eautoreconf || ewarn "Unable to autoreconf the configure script. Things may fail."
- ;;
- *)
- # elibtoolize required for BSD
- [[ ${XORG_EAUTORECONF} != no && ( -e "./configure.ac" || -e "./configure.in" ) ]] && eautoreconf || elibtoolize
- ;;
- esac
-}
-
-# @FUNCTION: xorg-2_src_prepare
-# @DESCRIPTION:
-# Prepare a package after unpacking, performing all X-related tasks.
-xorg-2_src_prepare() {
- debug-print-function ${FUNCNAME} "$@"
-
- [[ -n ${GIT_ECLASS} ]] && git_src_prepare
- xorg-2_patch_source
- xorg-2_reconf_source
-}
-
-# @FUNCTION: xorg-2_font_configure
-# @DESCRIPTION:
-# If a font package, perform any necessary configuration steps
-xorg-2_font_configure() {
- debug-print-function ${FUNCNAME} "$@"
-
- if has nls ${IUSE//+} && ! use nls; then
- if grep -q -s "disable-all-encodings" ${ECONF_SOURCE:-.}/configure; then
- FONT_OPTIONS+="
- --disable-all-encodings"
- else
- FONT_OPTIONS+="
- --disable-iso8859-2
- --disable-iso8859-3
- --disable-iso8859-4
- --disable-iso8859-5
- --disable-iso8859-6
- --disable-iso8859-7
- --disable-iso8859-8
- --disable-iso8859-9
- --disable-iso8859-10
- --disable-iso8859-11
- --disable-iso8859-12
- --disable-iso8859-13
- --disable-iso8859-14
- --disable-iso8859-15
- --disable-iso8859-16
- --disable-jisx0201
- --disable-koi8-r"
- fi
- fi
-}
-
-# @FUNCTION: xorg-2_flags_setup
-# @DESCRIPTION:
-# Set up CFLAGS for a debug build
-xorg-2_flags_setup() {
- debug-print-function ${FUNCNAME} "$@"
-
- # Win32 require special define
- [[ ${CHOST} == *-winnt* ]] && append-cppflags -DWIN32 -D__STDC__
- # hardened ldflags
- [[ ${PN} = xorg-server || -n ${DRIVER} ]] && append-ldflags -Wl,-z,lazy
-
- # Quite few libraries fail on runtime without these:
- if has static-libs ${IUSE//+}; then
- filter-flags -Wl,-Bdirect
- filter-ldflags -Bdirect
- filter-ldflags -Wl,-Bdirect
- fi
-}
-
-# @FUNCTION: xorg-2_src_configure
-# @DESCRIPTION:
-# Perform any necessary pre-configuration steps, then run configure
-xorg-2_src_configure() {
- debug-print-function ${FUNCNAME} "$@"
-
- xorg-2_flags_setup
-
- # @VARIABLE: CONFIGURE_OPTIONS
- # @DESCRIPTION:
- # Any options to pass to configure
- # @DEFAULT_UNSET
- CONFIGURE_OPTIONS=${CONFIGURE_OPTIONS:=""}
-
- [[ -n "${FONT}" ]] && xorg-2_font_configure
- local myeconfargs=(
- --disable-dependency-tracking
- ${CONFIGURE_OPTIONS}
- ${FONT_OPTIONS}
- )
-
- autotools-utils_src_configure "$@"
-}
-
-# @FUNCTION: xorg-2_src_compile
-# @DESCRIPTION:
-# Compile a package, performing all X-related tasks.
-xorg-2_src_compile() {
- debug-print-function ${FUNCNAME} "$@"
-
- autotools-utils_src_compile "$@"
-}
-
-# @FUNCTION: xorg-2_src_install
-# @DESCRIPTION:
-# Install a built package to ${D}, performing any necessary steps.
-# Creates a ChangeLog from git if using live ebuilds.
-xorg-2_src_install() {
- debug-print-function ${FUNCNAME} "$@"
-
- if [[ ${CATEGORY} == x11-proto ]]; then
- autotools-utils_src_install \
- ${PN/proto/}docdir="${EPREFIX}/usr/share/doc/${PF}" \
- docdir="${EPREFIX}/usr/share/doc/${PF}"
- else
- autotools-utils_src_install \
- docdir="${EPREFIX}/usr/share/doc/${PF}"
- fi
-
- if [[ -n ${GIT_ECLASS} ]]; then
- pushd "${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}" > /dev/null
- git log ${EGIT_COMMIT} > "${S}"/ChangeLog
- popd > /dev/null
- fi
-
- if [[ -e "${S}"/ChangeLog ]]; then
- dodoc "${S}"/ChangeLog || die "dodoc failed"
- fi
-
- # Don't install libtool archives (even with static-libs)
- remove_libtool_files all
-
- [[ -n ${FONT} ]] && remove_font_metadata
-}
-
-# @FUNCTION: xorg-2_pkg_postinst
-# @DESCRIPTION:
-# Run X-specific post-installation tasks on the live filesystem. The
-# only task right now is some setup for font packages.
-xorg-2_pkg_postinst() {
- debug-print-function ${FUNCNAME} "$@"
-
- [[ -n ${FONT} ]] && setup_fonts "$@"
-}
-
-# @FUNCTION: xorg-2_pkg_postrm
-# @DESCRIPTION:
-# Run X-specific post-removal tasks on the live filesystem. The only
-# task right now is some cleanup for font packages.
-xorg-2_pkg_postrm() {
- debug-print-function ${FUNCNAME} "$@"
-
- [[ -n ${FONT} ]] && font_pkg_postrm "$@"
-}
-
-# @FUNCTION: setup_fonts
-# @DESCRIPTION:
-# Generates needed files for fonts and fixes font permissions
-setup_fonts() {
- debug-print-function ${FUNCNAME} "$@"
-
- create_fonts_scale
- create_fonts_dir
- font_pkg_postinst
-}
-
-# @FUNCTION: remove_font_metadata
-# @DESCRIPTION:
-# Don't let the package install generated font files that may overlap
-# with other packages. Instead, they're generated in pkg_postinst().
-remove_font_metadata() {
- debug-print-function ${FUNCNAME} "$@"
-
- if [[ ${FONT_DIR} != Speedo && ${FONT_DIR} != CID ]]; then
- einfo "Removing font metadata"
- rm -rf "${ED}"/usr/share/fonts/${FONT_DIR}/fonts.{scale,dir,cache-1}
- fi
-}
-
-# @FUNCTION: create_fonts_scale
-# @DESCRIPTION:
-# Create fonts.scale file, used by the old server-side fonts subsystem.
-create_fonts_scale() {
- debug-print-function ${FUNCNAME} "$@"
-
- if [[ ${FONT_DIR} != Speedo && ${FONT_DIR} != CID ]]; then
- ebegin "Generating font.scale"
- mkfontscale \
- -a "${EROOT}/usr/share/fonts/encodings/encodings.dir" \
- -- "${EROOT}/usr/share/fonts/${FONT_DIR}"
- eend $?
- fi
-}
-
-# @FUNCTION: create_fonts_dir
-# @DESCRIPTION:
-# Create fonts.dir file, used by the old server-side fonts subsystem.
-create_fonts_dir() {
- debug-print-function ${FUNCNAME} "$@"
-
- ebegin "Generating fonts.dir"
- mkfontdir \
- -e "${EROOT}"/usr/share/fonts/encodings \
- -e "${EROOT}"/usr/share/fonts/encodings/large \
- -- "${EROOT}/usr/share/fonts/${FONT_DIR}"
- eend $?
-}
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/x11:master commit in: eclass/
@ 2011-03-09 13:52 Tomas Chvatal
0 siblings, 0 replies; 24+ messages in thread
From: Tomas Chvatal @ 2011-03-09 13:52 UTC (permalink / raw
To: gentoo-commits
commit: f3efd21914ab08218791c736301f0d932532b43c
Author: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 9 13:26:30 2011 +0000
Commit: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
CommitDate: Wed Mar 9 13:27:03 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=f3efd219
Drop vritualx.eclass. Moved to main tree.
---
eclass/virtualx.eclass | 192 ------------------------------------------------
1 files changed, 0 insertions(+), 192 deletions(-)
diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
deleted file mode 100644
index e6bb392..0000000
--- a/eclass/virtualx.eclass
+++ /dev/null
@@ -1,192 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/virtualx.eclass,v 1.35 2010/05/15 05:40:46 dirtyepic Exp $
-
-# Original author: Martin Schlemmer <azarah@gentoo.org>
-
-# @ECLASS: virtualx.eclass
-# @MAINTAINER:
-# x11@gentoo.org
-# @BLURB: This eclass can be used for packages that needs a working X environment to build.
-
-# @ECLASS-VARIABLE: VIRTUALX_REQUIRED
-# @DESCRIPTION:
-# Variable specifying the dependency on xorg-server and xhost.
-# Possible special values are "always" and "manual", which specify
-# the dependency to be set unconditionaly or not at all.
-# Any other value is taken as useflag desired to be in control of
-# the dependency (eg. VIRTUALX_REQUIRED="kde" will add the dependency
-# into "kde? ( )" and add kde into IUSE.
-: ${VIRTUALX_REQUIRED:=test}
-
-# @ECLASS-VARIABLE: VIRTUALX_DEPEND
-# @DESCRIPTION:
-# Dep string available for use outside of eclass, in case a more
-# complicated dep is needed.
-# You can specify the variable BEFORE inherit to add more dependencies.
-VIRTUALX_DEPEND="${VIRTUALX_DEPEND}
- !prefix? ( x11-base/xorg-server[-minimal] )
- x11-apps/xhost
-"
-
-# @ECLASS-VARIABLE: VIRTUALX_COMMAND
-# @DESCRIPTION:
-# Command (or eclass function call) to be run in the X11 environment
-# (within virtualmake function).
-: ${VIRTUALX_COMMAND:="emake"}
-
-has "${EAPI:-0}" 0 1 && die "virtualx eclass require EAPI=2 or newer."
-
-case ${VIRTUALX_REQUIRED} in
- manual)
- ;;
- always)
- DEPEND="${VIRTUALX_DEPEND}"
- RDEPEND=""
- ;;
- optional|tests)
- # deprecated section YAY.
- ewarn "QA: VIRTUALX_REQUIRED=optional and VIRTUALX_REQUIRED=tests are deprecated."
- ewarn "QA: You can drop the variable definition completely from ebuild,"
- ewarn "QA: because it is default behaviour."
-
- if [[ -n ${VIRTUALX_USE} ]]; then
- # so they like to specify the useflag
- ewarn "QA: VIRTUALX_USE variable is deprecated."
- ewarn "QA: Please read eclass manpage to find out how to use VIRTUALX_REQUIRED"
- ewarn "QA: to achieve the same behaviour."
- fi
-
- [[ -z ${VIRTUALX_USE} ]] && VIRTUALX_USE="test"
- DEPEND="${VIRTUALX_USE}? ( ${VIRTUALX_DEPEND} )"
- RDEPEND=""
- IUSE="${VIRTUALX_USE}"
- ;;
- *)
- DEPEND="${VIRTUALX_REQUIRED}? ( ${VIRTUALX_DEPEND} )"
- RDEPEND=""
- IUSE="${VIRTUALX_REQUIRED}"
- ;;
-esac
-
-# @FUNCTION: virtualmake
-# @DESCRIPTION:
-# Function which attach to running X session or start new Xvfb session
-# where the VIRTUALX_COMMAND variable content gets executed.
-virtualmake() {
- debug-print-function ${FUNCNAME} "$@"
-
- local i=0
- local retval=0
- local OLD_SANDBOX_ON="${SANDBOX_ON}"
- local XVFB=$(type -p Xvfb)
- local XHOST=$(type -p xhost)
- local xvfbargs="-screen 0 800x600x24"
-
- # backcompat for maketype
- if [[ -n ${maketype} ]]; then
- ewarn "QA: ebuild is exporting \$maketype=${maketype}"
- ewarn "QA: Ebuild should be migrated to use VIRTUALX_COMMAND=${maketype} instead."
- ewarn "QA: Setting VIRTUALX_COMMAND to \$maketype conveniently for now."
- VIRTUALX_COMMAND=${maketype}
- fi
-
- # If $DISPLAY is not set, or xhost cannot connect to an X
- # display, then do the Xvfb hack.
- if [[ -n ${XVFB} && -n ${XHOST} ]] && \
- ( [[ -z ${DISPLAY} ]] || ! (${XHOST} &>/dev/null) ) ; then
- debug-print "${FUNCNAME}: running Xvfb hack"
- export XAUTHORITY=
- # The following is derived from Mandrake's hack to allow
- # compiling without the X display
-
- einfo "Scanning for an open DISPLAY to start Xvfb ..."
- # If we are in a chrooted environment, and there is already a
- # X server started outside of the chroot, Xvfb will fail to start
- # on the same display (most cases this is :0 ), so make sure
- # Xvfb is started, else bump the display number
- #
- # Azarah - 5 May 2002
- XDISPLAY=$(i=0; while [[ -f /tmp/.X${i}-lock ]] ; do ((i++));done; echo ${i})
- debug-print "${FUNCNAME}: XDISPLAY=${XDISPLAY}"
-
- # We really do not want SANDBOX enabled here
- export SANDBOX_ON="0"
-
- debug-print "${FUNCNAME}: ${XVFB} :${XDISPLAY} ${xvfbargs}"
- ${XVFB} :${XDISPLAY} ${xvfbargs} &>/dev/null &
- sleep 2
-
- local start=${XDISPLAY}
- while [[ ! -f /tmp/.X${XDISPLAY}-lock ]]; do
- # Stop trying after 15 tries
- if ((XDISPLAY - start > 15)) ; then
- eerror "'${XVFB} :${XDISPLAY} ${xvfbargs}' returns:"
- echo
- ${XVFB} :${XDISPLAY} ${xvfbargs}
- echo
- eerror "If possible, correct the above error and try your emerge again."
- die "Unable to start Xvfb"
- fi
-
- ((XDISPLAY++))
- debug-print "${FUNCNAME}: ${XVFB} :${XDISPLAY} ${xvfbargs}"
- ${XVFB} :${XDISPLAY} ${xvfbargs} &>/dev/null &
- sleep 2
- done
-
- # Now enable SANDBOX again if needed.
- export SANDBOX_ON="${OLD_SANDBOX_ON}"
-
- einfo "Starting Xvfb on \$DISPLAY=${XDISPLAY} ..."
-
- export DISPLAY=:${XDISPLAY}
- # Do not break on error, but setup $retval, as we need
- # to kill Xvfb
- debug-print "${FUNCNAME}: ${VIRTUALX_COMMAND} \"$@\""
- ${VIRTUALX_COMMAND} "$@"
- retval=$?
-
- # Now kill Xvfb
- kill $(cat /tmp/.X${XDISPLAY}-lock)
- else
- debug-print "${FUNCNAME}: attaching to running X display"
- # Normal make if we can connect to an X display
- debug-print "${FUNCNAME}: ${VIRTUALX_COMMAND} \"$@\""
- ${VIRTUALX_COMMAND} "$@"
- retval=$?
- fi
-
- # die if our command failed
- [[ $? -ne 0 ]] && die "${FUNCNAME}: the ${VIRTALX_COMMAND} failed."
-}
-
-# @FUNCTION: Xmake
-# @DESCRIPTION:
-# Same as "make", but set up the Xvfb hack if needed.
-# Deprecated call.
-Xmake() {
- debug-print-function ${FUNCNAME} "$@"
-
- ewarn "QA: you should not execute make directly"
- ewarn "QA: rather execute Xemake -j1 if you have issues with parallel make"
- VIRTUALX_COMMAND="emake" virtualmake "$@"
-}
-
-# @FUNCTION: Xemake
-# @DESCRIPTION:
-# Same as "emake", but set up the Xvfb hack if needed.
-Xemake() {
- debug-print-function ${FUNCNAME} "$@"
-
- VIRTUALX_COMMAND="make" virtualmake "$@"
-}
-
-# @FUNCTION: Xeconf
-# @DESCRIPTION:
-# Same as "econf", but set up the Xvfb hack if needed.
-Xeconf() {
- debug-print-function ${FUNCNAME} "$@"
-
- VIRTUALX_COMMAND="econf" virtualmake "$@"
-}
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/x11:master commit in: eclass/
@ 2011-04-15 17:21 Michał Górny
0 siblings, 0 replies; 24+ messages in thread
From: Michał Górny @ 2011-04-15 17:21 UTC (permalink / raw
To: gentoo-commits
commit: 3720f9b8126e022c4153735e55a0e9138a98472e
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 15 16:48:21 2011 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Apr 15 17:21:54 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=3720f9b8
Sync the eclass from gx86 for updates.
---
eclass/xorg-2.eclass | 532 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 532 insertions(+), 0 deletions(-)
diff --git a/eclass/xorg-2.eclass b/eclass/xorg-2.eclass
new file mode 100644
index 0000000..3209172
--- /dev/null
+++ b/eclass/xorg-2.eclass
@@ -0,0 +1,532 @@
+# 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.39 2011/03/19 15:02:47 scarabeus Exp $
+#
+# @ECLASS: xorg-2.eclass
+# @MAINTAINER:
+# x11@gentoo.org
+# @BLURB: Reduces code duplication in the modularized X11 ebuilds.
+# @DESCRIPTION:
+# This eclass makes trivial X ebuilds possible for apps, fonts, drivers,
+# and more. Many things that would normally be done in various functions
+# can be accessed by setting variables instead, such as patching,
+# running eautoreconf, passing options to configure and installing docs.
+#
+# All you need to do in a basic ebuild is inherit this eclass and set
+# DESCRIPTION, KEYWORDS and RDEPEND/DEPEND. If your package is hosted
+# with the other X packages, you don't need to set SRC_URI. Pretty much
+# everything else should be automatic.
+
+# Author: Tomáš Chvátal <scarabeus@gentoo.org>
+# Author: Donnie Berkholz <dberkholz@gentoo.org>
+
+GIT_ECLASS=""
+if [[ ${PV} == *9999* ]]; then
+ GIT_ECLASS="git"
+ XORG_EAUTORECONF="yes"
+fi
+
+# If we're a font package, but not the font.alias one
+FONT_ECLASS=""
+if [[ ${PN} == font* \
+ && ${CATEGORY} = media-fonts \
+ && ${PN} != font-alias \
+ && ${PN} != font-util ]]; then
+ # Activate font code in the rest of the eclass
+ FONT="yes"
+ FONT_ECLASS="font"
+fi
+
+inherit autotools-utils eutils libtool multilib toolchain-funcs flag-o-matic autotools \
+ ${FONT_ECLASS} ${GIT_ECLASS}
+
+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=${EAPI} is not supported" ;;
+esac
+
+# exports must be ALWAYS after inherit
+EXPORT_FUNCTIONS ${EXPORTED_FUNCTIONS}
+
+IUSE=""
+HOMEPAGE="http://xorg.freedesktop.org/"
+
+# @ECLASS-VARIABLE: XORG_EAUTORECONF
+# @DESCRIPTION:
+# If set to 'yes' and configure.ac exists, eautoreconf will run. Set
+# before inheriting this eclass.
+: ${XORG_EAUTORECONF:="no"}
+
+# @ECLASS-VARIABLE: XORG_BASE_INDIVIDUAL_URI
+# @DESCRIPTION:
+# Set up SRC_URI for individual modular releases. If set to an empty
+# string, no SRC_URI will be provided by the eclass.
+: ${XORG_BASE_INDIVIDUAL_URI="http://xorg.freedesktop.org/releases/individual"}
+
+# @ECLASS-VARIABLE: XORG_MODULE
+# @DESCRIPTION:
+# The subdirectory to download source from. Possible settings are app,
+# doc, data, util, driver, font, lib, proto, xserver. Set above the
+# inherit to override the default autoconfigured module.
+if [[ -z ${XORG_MODULE} ]]; then
+ case ${CATEGORY} in
+ app-doc) XORG_MODULE=doc/ ;;
+ media-fonts) XORG_MODULE=font/ ;;
+ x11-apps|x11-wm) XORG_MODULE=app/ ;;
+ x11-misc|x11-themes) XORG_MODULE=util/ ;;
+ x11-base) XORG_MODULE=xserver/ ;;
+ x11-drivers) XORG_MODULE=driver/ ;;
+ x11-proto) XORG_MODULE=proto/ ;;
+ x11-libs) XORG_MODULE=lib/ ;;
+ *) XORG_MODULE= ;;
+ esac
+fi
+
+# backcompat, remove when everything in main tree fixed
+[[ -n ${MODULE} ]] && XORG_MODULE=${MODULE} && ewarn "$CATEGORY/$P 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.
+# This variable can be used for proper directory specification
+: ${XORG_PACKAGE_NAME:=${PN}}
+
+if [[ -n ${GIT_ECLASS} ]]; then
+ : ${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
+
+: ${SLOT:=0}
+
+# Set the license for the package. This can be overridden by setting
+# LICENSE after the inherit. Nearly all FreeDesktop-hosted X packages
+# are under the MIT license. (This is what Red Hat does in their rpms)
+: ${LICENSE:=MIT}
+
+# Set up autotools shared dependencies
+# Remember that all versions here MUST be stable
+XORG_EAUTORECONF_ARCHES="x86-interix ppc-aix x86-winnt"
+EAUTORECONF_DEPEND+="
+ >=sys-devel/libtool-2.2.6a
+ sys-devel/m4"
+if [[ ${PN} != util-macros ]] ; then
+ EAUTORECONF_DEPEND+=" >=x11-misc/util-macros-1.12.0"
+ # Required even by xorg-server
+ [[ ${PN} == "font-util" ]] || EAUTORECONF_DEPEND+=" >=media-fonts/font-util-1.2.0"
+fi
+WANT_AUTOCONF="latest"
+WANT_AUTOMAKE="latest"
+for arch in ${XORG_EAUTORECONF_ARCHES}; do
+ EAUTORECONF_DEPENDS+=" ${arch}? ( ${EAUTORECONF_DEPEND} )"
+done
+DEPEND+=" ${EAUTORECONF_DEPENDS}"
+[[ ${XORG_EAUTORECONF} != no ]] && DEPEND+=" ${EAUTORECONF_DEPEND}"
+unset EAUTORECONF_DEPENDS
+unset EAUTORECONF_DEPEND
+
+if [[ ${FONT} == yes ]]; then
+ RDEPEND+=" media-fonts/encodings
+ x11-apps/mkfontscale
+ x11-apps/mkfontdir"
+ PDEPEND+=" media-fonts/font-alias"
+ DEPEND+=" >=media-fonts/font-util-1.2.0"
+
+ # @ECLASS-VARIABLE: FONT_DIR
+ # @DESCRIPTION:
+ # If you're creating a font package and the suffix of PN is not equal to
+ # the subdirectory of /usr/share/fonts/ it should install into, set
+ # FONT_DIR to that directory or directories. Set before inheriting this
+ # eclass.
+ [[ -z ${FONT_DIR} ]] && FONT_DIR=${PN##*-}
+
+ # Fix case of font directories
+ FONT_DIR=${FONT_DIR/ttf/TTF}
+ FONT_DIR=${FONT_DIR/otf/OTF}
+ FONT_DIR=${FONT_DIR/type1/Type1}
+ FONT_DIR=${FONT_DIR/speedo/Speedo}
+
+ # Set up configure options, wrapped so ebuilds can override if need be
+ [[ -z ${FONT_OPTIONS} ]] && FONT_OPTIONS="--with-fontdir=\"${EPREFIX}/usr/share/fonts/${FONT_DIR}\""
+
+ [[ ${PN##*-} = misc || ${PN##*-} = 75dpi || ${PN##*-} = 100dpi || ${PN##*-} = cyrillic ]] && IUSE+=" nls"
+fi
+
+# If we're a driver package, then enable DRIVER case
+[[ ${PN} == xf86-video-* || ${PN} == xf86-input-* ]] && DRIVER="yes"
+
+# @ECLASS-VARIABLE: XORG_STATIC
+# @DESCRIPTION:
+# Enables static-libs useflag. Set to no, if your package gets:
+#
+# QA: configure: WARNING: unrecognized options: --disable-static
+: ${XORG_STATIC:="yes"}
+
+# Add static-libs useflag where usefull.
+if [[ ${XORG_STATIC} == yes \
+ && ${FONT} != yes \
+ && ${CATEGORY} != app-doc \
+ && ${CATEGORY} != x11-apps \
+ && ${CATEGORY} != x11-proto \
+ && ${CATEGORY} != x11-drivers \
+ && ${CATEGORY} != media-fonts \
+ && ${PN} != util-macros \
+ && ${PN} != xbitmaps \
+ && ${PN} != xorg-cf-files \
+ && ${PN/xcursor} = ${PN} ]]; then
+ IUSE+=" static-libs"
+fi
+
+DEPEND+=" >=dev-util/pkgconfig-0.23"
+
+# @ECLASS-VARIABLE: XORG_DRI
+# @DESCRIPTION:
+# Possible values are "always" or the value of the useflag DRI capabilities
+# are required for. Default value is "no"
+#
+# Eg. XORG_DRI="opengl" will pull all dri dependant deps for opengl useflag
+: ${XORG_DRI:="no"}
+
+DRI_COMMON_DEPEND="
+ x11-base/xorg-server[-minimal]
+ x11-libs/libdrm
+"
+DRI_DEPEND="
+ x11-proto/xf86driproto
+ x11-proto/glproto
+ x11-proto/dri2proto
+"
+case ${XORG_DRI} in
+ no)
+ ;;
+ always)
+ COMMON_DEPEND+=" ${DRI_COMMON_DEPEND}"
+ DEPEND+=" ${DRI_DEPEND}"
+ ;;
+ *)
+ COMMON_DEPEND+=" ${XORG_DRI}? ( ${DRI_COMMON_DEPEND} )"
+ DEPEND+=" ${XORG_DRI}? ( ${DRI_DEPEND} )"
+ IUSE+=" ${XORG_DRI}"
+ ;;
+esac
+unset DRI_DEPEND
+unset DRI_COMMONDEPEND
+
+if [[ -n "${DRIVER}" ]]; then
+ COMMON_DEPEND+="
+ x11-base/xorg-server[xorg]
+ "
+fi
+if [[ -n "${DRIVER}" && ${PN} == xf86-video-* ]]; then
+ COMMON_DEPEND+="
+ x11-libs/libpciaccess
+ "
+ # we also needs some protos and libs in all cases
+ DEPEND+="
+ x11-proto/fontsproto
+ x11-proto/randrproto
+ x11-proto/renderproto
+ x11-proto/videoproto
+ x11-proto/xextproto
+ x11-proto/xineramaproto
+ x11-proto/xproto
+ "
+fi
+
+# @ECLASS-VARIABLE: XORG_DOC
+# @DESCRIPTION:
+# Possible values are "always" or the value of the useflag doc packages
+# are required for. Default value is "no"
+#
+# Eg. XORG_DOC="manual" will pull all doc dependant deps for manual useflag
+: ${XORG_DOC:="no"}
+
+DOC_DEPEND="
+ doc? (
+ app-text/asciidoc
+ app-text/xmlto
+ app-doc/doxygen
+ app-text/docbook-xml-dtd:4.1.2
+ app-text/docbook-xml-dtd:4.2
+ app-text/docbook-xml-dtd:4.3
+ )
+"
+case ${XORG_DOC} in
+ no)
+ ;;
+ always)
+ DEPEND+=" ${DOC_DEPEND}"
+ ;;
+ *)
+ DEPEND+=" ${XORG_DOC}? ( ${DOC_DEPEND} )"
+ IUSE+=" ${XORG_DOC}"
+ ;;
+esac
+unset DOC_DEPEND
+
+DEPEND+=" ${COMMON_DEPEND}"
+RDEPEND+=" ${COMMON_DEPEND}"
+unset COMMON_DEPEND
+
+debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: DEPEND=${DEPEND}"
+debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: RDEPEND=${RDEPEND}"
+debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: PDEPEND=${PDEPEND}"
+
+# @FUNCTION: xorg-2_pkg_setup
+# @DESCRIPTION:
+# Setup prefix compat
+xorg-2_pkg_setup() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ [[ ${FONT} == yes ]] && font_pkg_setup "$@"
+}
+
+# @FUNCTION: xorg-2_src_unpack
+# @DESCRIPTION:
+# Simply unpack source code.
+xorg-2_src_unpack() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ if [[ -n ${GIT_ECLASS} ]]; then
+ git_src_unpack
+ else
+ unpack ${A}
+ fi
+
+ [[ -n ${FONT_OPTIONS} ]] && einfo "Detected font directory: ${FONT_DIR}"
+}
+
+# @FUNCTION: xorg-2_patch_source
+# @DESCRIPTION:
+# Apply all patches
+xorg-2_patch_source() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ # Use standardized names and locations with bulk patching
+ # Patch directory is ${WORKDIR}/patch
+ # See epatch() in eutils.eclass for more documentation
+ EPATCH_SUFFIX=${EPATCH_SUFFIX:=patch}
+
+ [[ -d "${EPATCH_SOURCE}" ]] && epatch
+ autotools-utils_src_prepare "$@"
+}
+
+# @FUNCTION: xorg-2_reconf_source
+# @DESCRIPTION:
+# Run eautoreconf if necessary, and run elibtoolize.
+xorg-2_reconf_source() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ case ${CHOST} in
+ *-interix* | *-aix* | *-winnt*)
+ # some hosts need full eautoreconf
+ [[ -e "./configure.ac" || -e "./configure.in" ]] && eautoreconf || ewarn "Unable to autoreconf the configure script. Things may fail."
+ ;;
+ *)
+ # elibtoolize required for BSD
+ [[ ${XORG_EAUTORECONF} != no && ( -e "./configure.ac" || -e "./configure.in" ) ]] && eautoreconf || elibtoolize
+ ;;
+ esac
+}
+
+# @FUNCTION: xorg-2_src_prepare
+# @DESCRIPTION:
+# Prepare a package after unpacking, performing all X-related tasks.
+xorg-2_src_prepare() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ [[ -n ${GIT_ECLASS} ]] && git_src_prepare
+ xorg-2_patch_source
+ xorg-2_reconf_source
+}
+
+# @FUNCTION: xorg-2_font_configure
+# @DESCRIPTION:
+# If a font package, perform any necessary configuration steps
+xorg-2_font_configure() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ if has nls ${IUSE//+} && ! use nls; then
+ if grep -q -s "disable-all-encodings" ${ECONF_SOURCE:-.}/configure; then
+ FONT_OPTIONS+="
+ --disable-all-encodings"
+ else
+ FONT_OPTIONS+="
+ --disable-iso8859-2
+ --disable-iso8859-3
+ --disable-iso8859-4
+ --disable-iso8859-5
+ --disable-iso8859-6
+ --disable-iso8859-7
+ --disable-iso8859-8
+ --disable-iso8859-9
+ --disable-iso8859-10
+ --disable-iso8859-11
+ --disable-iso8859-12
+ --disable-iso8859-13
+ --disable-iso8859-14
+ --disable-iso8859-15
+ --disable-iso8859-16
+ --disable-jisx0201
+ --disable-koi8-r"
+ fi
+ fi
+}
+
+# @FUNCTION: xorg-2_flags_setup
+# @DESCRIPTION:
+# Set up CFLAGS for a debug build
+xorg-2_flags_setup() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ # Win32 require special define
+ [[ ${CHOST} == *-winnt* ]] && append-cppflags -DWIN32 -D__STDC__
+ # hardened ldflags
+ [[ ${PN} = xorg-server || -n ${DRIVER} ]] && append-ldflags -Wl,-z,lazy
+
+ # Quite few libraries fail on runtime without these:
+ if has static-libs ${IUSE//+}; then
+ filter-flags -Wl,-Bdirect
+ filter-ldflags -Bdirect
+ filter-ldflags -Wl,-Bdirect
+ fi
+}
+
+# @FUNCTION: xorg-2_src_configure
+# @DESCRIPTION:
+# Perform any necessary pre-configuration steps, then run configure
+xorg-2_src_configure() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ xorg-2_flags_setup
+
+ # @VARIABLE: CONFIGURE_OPTIONS
+ # @DESCRIPTION:
+ # Any options to pass to configure
+ # @DEFAULT_UNSET
+ CONFIGURE_OPTIONS=${CONFIGURE_OPTIONS:=""}
+
+ [[ -n "${FONT}" ]] && xorg-2_font_configure
+ local myeconfargs=(
+ --disable-dependency-tracking
+ ${CONFIGURE_OPTIONS}
+ ${FONT_OPTIONS}
+ )
+
+ autotools-utils_src_configure "$@"
+}
+
+# @FUNCTION: xorg-2_src_compile
+# @DESCRIPTION:
+# Compile a package, performing all X-related tasks.
+xorg-2_src_compile() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ autotools-utils_src_compile "$@"
+}
+
+# @FUNCTION: xorg-2_src_install
+# @DESCRIPTION:
+# Install a built package to ${D}, performing any necessary steps.
+# Creates a ChangeLog from git if using live ebuilds.
+xorg-2_src_install() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ if [[ ${CATEGORY} == x11-proto ]]; then
+ autotools-utils_src_install \
+ ${PN/proto/}docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ docdir="${EPREFIX}/usr/share/doc/${PF}"
+ else
+ autotools-utils_src_install \
+ docdir="${EPREFIX}/usr/share/doc/${PF}"
+ fi
+
+ if [[ -n ${GIT_ECLASS} ]]; then
+ pushd "${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}" > /dev/null
+ git log ${EGIT_COMMIT} > "${S}"/ChangeLog
+ popd > /dev/null
+ fi
+
+ if [[ -e "${S}"/ChangeLog ]]; then
+ dodoc "${S}"/ChangeLog || die "dodoc failed"
+ fi
+
+ # Don't install libtool archives (even with static-libs)
+ remove_libtool_files all
+
+ [[ -n ${FONT} ]] && remove_font_metadata
+}
+
+# @FUNCTION: xorg-2_pkg_postinst
+# @DESCRIPTION:
+# Run X-specific post-installation tasks on the live filesystem. The
+# only task right now is some setup for font packages.
+xorg-2_pkg_postinst() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ [[ -n ${FONT} ]] && setup_fonts "$@"
+}
+
+# @FUNCTION: xorg-2_pkg_postrm
+# @DESCRIPTION:
+# Run X-specific post-removal tasks on the live filesystem. The only
+# task right now is some cleanup for font packages.
+xorg-2_pkg_postrm() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ [[ -n ${FONT} ]] && font_pkg_postrm "$@"
+}
+
+# @FUNCTION: setup_fonts
+# @DESCRIPTION:
+# Generates needed files for fonts and fixes font permissions
+setup_fonts() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ create_fonts_scale
+ create_fonts_dir
+ font_pkg_postinst
+}
+
+# @FUNCTION: remove_font_metadata
+# @DESCRIPTION:
+# Don't let the package install generated font files that may overlap
+# with other packages. Instead, they're generated in pkg_postinst().
+remove_font_metadata() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ if [[ ${FONT_DIR} != Speedo && ${FONT_DIR} != CID ]]; then
+ einfo "Removing font metadata"
+ rm -rf "${ED}"/usr/share/fonts/${FONT_DIR}/fonts.{scale,dir,cache-1}
+ fi
+}
+
+# @FUNCTION: create_fonts_scale
+# @DESCRIPTION:
+# Create fonts.scale file, used by the old server-side fonts subsystem.
+create_fonts_scale() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ if [[ ${FONT_DIR} != Speedo && ${FONT_DIR} != CID ]]; then
+ ebegin "Generating font.scale"
+ mkfontscale \
+ -a "${EROOT}/usr/share/fonts/encodings/encodings.dir" \
+ -- "${EROOT}/usr/share/fonts/${FONT_DIR}"
+ eend $?
+ fi
+}
+
+# @FUNCTION: create_fonts_dir
+# @DESCRIPTION:
+# Create fonts.dir file, used by the old server-side fonts subsystem.
+create_fonts_dir() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ ebegin "Generating fonts.dir"
+ mkfontdir \
+ -e "${EROOT}"/usr/share/fonts/encodings \
+ -e "${EROOT}"/usr/share/fonts/encodings/large \
+ -- "${EROOT}/usr/share/fonts/${FONT_DIR}"
+ eend $?
+}
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/x11:master commit in: eclass/
@ 2011-04-15 17:21 Michał Górny
0 siblings, 0 replies; 24+ messages in thread
From: Michał Górny @ 2011-04-15 17:21 UTC (permalink / raw
To: gentoo-commits
commit: ed186a1e2f73020c66080c19c9ee3538db193a79
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 15 17:02:09 2011 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Apr 15 17:21:54 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=ed186a1e
Support passing XORG_CONFIGURE_OPTIONS as an array.
---
eclass/xorg-2.eclass | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/eclass/xorg-2.eclass b/eclass/xorg-2.eclass
index 3209172..c0caa7a 100644
--- a/eclass/xorg-2.eclass
+++ b/eclass/xorg-2.eclass
@@ -401,17 +401,22 @@ xorg-2_src_configure() {
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.
+ 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 "$@"
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/x11:master commit in: eclass/
@ 2011-04-15 17:21 Michał Górny
0 siblings, 0 replies; 24+ messages in thread
From: Michał Górny @ 2011-04-15 17:21 UTC (permalink / raw
To: gentoo-commits
commit: d036dac5ef6f5fd10db5d858bf54aa9e6bf8f4a5
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 15 17:21:32 2011 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Apr 15 17:21:55 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=d036dac5
Add a QA warning for CONFIGURE_OPTIONS use.
---
eclass/xorg-2.eclass | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/eclass/xorg-2.eclass b/eclass/xorg-2.eclass
index c0caa7a..1191b00 100644
--- a/eclass/xorg-2.eclass
+++ b/eclass/xorg-2.eclass
@@ -407,6 +407,8 @@ xorg-2_src_configure() {
# @DEFAULT_UNSET
if [[ $(declare -p XORG_CONFIGURE_OPTIONS 2>&-) != "declare -a"* ]]; then
# fallback to CONFIGURE_OPTIONS, deprecated.
+ [[ -n "${CONFIGURE_OPTIONS}" ]] && \
+ eqawarn "CONFIGURE_OPTIONS are deprecated. Please migrate to XORG_CONFIGURE_OPTIONS."
local xorgconfadd=(${CONFIGURE_OPTIONS})
else
local xorgconfadd=("${XORG_CONFIGURE_OPTIONS[@]}")
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/x11:master commit in: eclass/
@ 2011-04-15 19:05 Michał Górny
0 siblings, 0 replies; 24+ messages in thread
From: Michał Górny @ 2011-04-15 19:05 UTC (permalink / raw
To: gentoo-commits
commit: 895bfe15bd153d72d2b9d217981d174023cfde06
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 15 19:05:37 2011 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Apr 15 19:05:37 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=895bfe15
[eclass] eqawarn -> ewarn.
---
eclass/xorg-2.eclass | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/eclass/xorg-2.eclass b/eclass/xorg-2.eclass
index 1191b00..99e4a1f 100644
--- a/eclass/xorg-2.eclass
+++ b/eclass/xorg-2.eclass
@@ -408,7 +408,7 @@ xorg-2_src_configure() {
if [[ $(declare -p XORG_CONFIGURE_OPTIONS 2>&-) != "declare -a"* ]]; then
# fallback to CONFIGURE_OPTIONS, deprecated.
[[ -n "${CONFIGURE_OPTIONS}" ]] && \
- eqawarn "CONFIGURE_OPTIONS are deprecated. Please migrate to XORG_CONFIGURE_OPTIONS."
+ ewarn "QA: CONFIGURE_OPTIONS are deprecated. Please migrate to XORG_CONFIGURE_OPTIONS."
local xorgconfadd=(${CONFIGURE_OPTIONS})
else
local xorgconfadd=("${XORG_CONFIGURE_OPTIONS[@]}")
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/x11:master commit in: eclass/
@ 2011-04-17 20:47 Tomas Chvatal
0 siblings, 0 replies; 24+ messages in thread
From: Tomas Chvatal @ 2011-04-17 20:47 UTC (permalink / raw
To: gentoo-commits
commit: d4240443b55f0685ceb4a145d8f266b021e9ff0e
Author: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 17 20:47:08 2011 +0000
Commit: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
CommitDate: Sun Apr 17 20:47:08 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=d4240443
[xorg-2] Update util-macros dependency.
---
eclass/xorg-2.eclass | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/eclass/xorg-2.eclass b/eclass/xorg-2.eclass
index 99e4a1f..6ff0d37 100644
--- a/eclass/xorg-2.eclass
+++ b/eclass/xorg-2.eclass
@@ -112,7 +112,7 @@ EAUTORECONF_DEPEND+="
>=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
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/x11:master commit in: eclass/
@ 2011-04-20 11:06 Tomas Chvatal
0 siblings, 0 replies; 24+ messages in thread
From: Tomas Chvatal @ 2011-04-20 11:06 UTC (permalink / raw
To: gentoo-commits
commit: e3bcdfa8270c9f8c25a6d348b5bede386c4e2e3f
Author: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 20 11:06:47 2011 +0000
Commit: Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
CommitDate: Wed Apr 20 11:06:47 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=e3bcdfa8
[eclass] migrate to use git-2 eclass. Update deprecated warnings.
---
eclass/xorg-2.eclass | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/eclass/xorg-2.eclass b/eclass/xorg-2.eclass
index 6ff0d37..ac0f166 100644
--- a/eclass/xorg-2.eclass
+++ b/eclass/xorg-2.eclass
@@ -22,7 +22,7 @@
GIT_ECLASS=""
if [[ ${PV} == *9999* ]]; then
- GIT_ECLASS="git"
+ GIT_ECLASS="git-2"
XORG_EAUTORECONF="yes"
fi
@@ -83,9 +83,6 @@ if [[ -z ${XORG_MODULE} ]]; then
esac
fi
-# backcompat, remove when everything in main tree fixed
-[[ -n ${MODULE} ]] && XORG_MODULE=${MODULE} && ewarn "$CATEGORY/$P 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.
@@ -289,7 +286,7 @@ xorg-2_src_unpack() {
debug-print-function ${FUNCNAME} "$@"
if [[ -n ${GIT_ECLASS} ]]; then
- git_src_unpack
+ git-2_src_unpack
else
unpack ${A}
fi
@@ -336,7 +333,6 @@ xorg-2_reconf_source() {
xorg-2_src_prepare() {
debug-print-function ${FUNCNAME} "$@"
- [[ -n ${GIT_ECLASS} ]] && git_src_prepare
xorg-2_patch_source
xorg-2_reconf_source
}
@@ -408,7 +404,7 @@ xorg-2_src_configure() {
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."
+ 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[@]}")
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/x11:master commit in: eclass/
@ 2011-04-20 12:49 Michał Górny
0 siblings, 0 replies; 24+ messages in thread
From: Michał Górny @ 2011-04-20 12:49 UTC (permalink / raw
To: gentoo-commits
commit: 0485a74b68c3d0379e88198901e157e87640b4eb
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 20 12:49:14 2011 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Apr 20 12:49:14 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=0485a74b
Moved to gx86.
---
eclass/xorg-2.eclass | 535 --------------------------------------------------
1 files changed, 0 insertions(+), 535 deletions(-)
diff --git a/eclass/xorg-2.eclass b/eclass/xorg-2.eclass
deleted file mode 100644
index ac0f166..0000000
--- a/eclass/xorg-2.eclass
+++ /dev/null
@@ -1,535 +0,0 @@
-# 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.39 2011/03/19 15:02:47 scarabeus Exp $
-#
-# @ECLASS: xorg-2.eclass
-# @MAINTAINER:
-# x11@gentoo.org
-# @BLURB: Reduces code duplication in the modularized X11 ebuilds.
-# @DESCRIPTION:
-# This eclass makes trivial X ebuilds possible for apps, fonts, drivers,
-# and more. Many things that would normally be done in various functions
-# can be accessed by setting variables instead, such as patching,
-# running eautoreconf, passing options to configure and installing docs.
-#
-# All you need to do in a basic ebuild is inherit this eclass and set
-# DESCRIPTION, KEYWORDS and RDEPEND/DEPEND. If your package is hosted
-# with the other X packages, you don't need to set SRC_URI. Pretty much
-# everything else should be automatic.
-
-# Author: Tomáš Chvátal <scarabeus@gentoo.org>
-# Author: Donnie Berkholz <dberkholz@gentoo.org>
-
-GIT_ECLASS=""
-if [[ ${PV} == *9999* ]]; then
- GIT_ECLASS="git-2"
- XORG_EAUTORECONF="yes"
-fi
-
-# If we're a font package, but not the font.alias one
-FONT_ECLASS=""
-if [[ ${PN} == font* \
- && ${CATEGORY} = media-fonts \
- && ${PN} != font-alias \
- && ${PN} != font-util ]]; then
- # Activate font code in the rest of the eclass
- FONT="yes"
- FONT_ECLASS="font"
-fi
-
-inherit autotools-utils eutils libtool multilib toolchain-funcs flag-o-matic autotools \
- ${FONT_ECLASS} ${GIT_ECLASS}
-
-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=${EAPI} is not supported" ;;
-esac
-
-# exports must be ALWAYS after inherit
-EXPORT_FUNCTIONS ${EXPORTED_FUNCTIONS}
-
-IUSE=""
-HOMEPAGE="http://xorg.freedesktop.org/"
-
-# @ECLASS-VARIABLE: XORG_EAUTORECONF
-# @DESCRIPTION:
-# If set to 'yes' and configure.ac exists, eautoreconf will run. Set
-# before inheriting this eclass.
-: ${XORG_EAUTORECONF:="no"}
-
-# @ECLASS-VARIABLE: XORG_BASE_INDIVIDUAL_URI
-# @DESCRIPTION:
-# Set up SRC_URI for individual modular releases. If set to an empty
-# string, no SRC_URI will be provided by the eclass.
-: ${XORG_BASE_INDIVIDUAL_URI="http://xorg.freedesktop.org/releases/individual"}
-
-# @ECLASS-VARIABLE: XORG_MODULE
-# @DESCRIPTION:
-# The subdirectory to download source from. Possible settings are app,
-# doc, data, util, driver, font, lib, proto, xserver. Set above the
-# inherit to override the default autoconfigured module.
-if [[ -z ${XORG_MODULE} ]]; then
- case ${CATEGORY} in
- app-doc) XORG_MODULE=doc/ ;;
- media-fonts) XORG_MODULE=font/ ;;
- x11-apps|x11-wm) XORG_MODULE=app/ ;;
- x11-misc|x11-themes) XORG_MODULE=util/ ;;
- x11-base) XORG_MODULE=xserver/ ;;
- x11-drivers) XORG_MODULE=driver/ ;;
- x11-proto) XORG_MODULE=proto/ ;;
- x11-libs) XORG_MODULE=lib/ ;;
- *) XORG_MODULE= ;;
- esac
-fi
-
-# @ECLASS-VARIABLE: XORG_PACKAGE_NAME
-# @DESCRIPTION:
-# For git checkout the git repository might differ from package name.
-# This variable can be used for proper directory specification
-: ${XORG_PACKAGE_NAME:=${PN}}
-
-if [[ -n ${GIT_ECLASS} ]]; then
- : ${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
-
-: ${SLOT:=0}
-
-# Set the license for the package. This can be overridden by setting
-# LICENSE after the inherit. Nearly all FreeDesktop-hosted X packages
-# are under the MIT license. (This is what Red Hat does in their rpms)
-: ${LICENSE:=MIT}
-
-# Set up autotools shared dependencies
-# Remember that all versions here MUST be stable
-XORG_EAUTORECONF_ARCHES="x86-interix ppc-aix x86-winnt"
-EAUTORECONF_DEPEND+="
- >=sys-devel/libtool-2.2.6a
- sys-devel/m4"
-if [[ ${PN} != util-macros ]] ; then
- 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
-WANT_AUTOCONF="latest"
-WANT_AUTOMAKE="latest"
-for arch in ${XORG_EAUTORECONF_ARCHES}; do
- EAUTORECONF_DEPENDS+=" ${arch}? ( ${EAUTORECONF_DEPEND} )"
-done
-DEPEND+=" ${EAUTORECONF_DEPENDS}"
-[[ ${XORG_EAUTORECONF} != no ]] && DEPEND+=" ${EAUTORECONF_DEPEND}"
-unset EAUTORECONF_DEPENDS
-unset EAUTORECONF_DEPEND
-
-if [[ ${FONT} == yes ]]; then
- RDEPEND+=" media-fonts/encodings
- x11-apps/mkfontscale
- x11-apps/mkfontdir"
- PDEPEND+=" media-fonts/font-alias"
- DEPEND+=" >=media-fonts/font-util-1.2.0"
-
- # @ECLASS-VARIABLE: FONT_DIR
- # @DESCRIPTION:
- # If you're creating a font package and the suffix of PN is not equal to
- # the subdirectory of /usr/share/fonts/ it should install into, set
- # FONT_DIR to that directory or directories. Set before inheriting this
- # eclass.
- [[ -z ${FONT_DIR} ]] && FONT_DIR=${PN##*-}
-
- # Fix case of font directories
- FONT_DIR=${FONT_DIR/ttf/TTF}
- FONT_DIR=${FONT_DIR/otf/OTF}
- FONT_DIR=${FONT_DIR/type1/Type1}
- FONT_DIR=${FONT_DIR/speedo/Speedo}
-
- # Set up configure options, wrapped so ebuilds can override if need be
- [[ -z ${FONT_OPTIONS} ]] && FONT_OPTIONS="--with-fontdir=\"${EPREFIX}/usr/share/fonts/${FONT_DIR}\""
-
- [[ ${PN##*-} = misc || ${PN##*-} = 75dpi || ${PN##*-} = 100dpi || ${PN##*-} = cyrillic ]] && IUSE+=" nls"
-fi
-
-# If we're a driver package, then enable DRIVER case
-[[ ${PN} == xf86-video-* || ${PN} == xf86-input-* ]] && DRIVER="yes"
-
-# @ECLASS-VARIABLE: XORG_STATIC
-# @DESCRIPTION:
-# Enables static-libs useflag. Set to no, if your package gets:
-#
-# QA: configure: WARNING: unrecognized options: --disable-static
-: ${XORG_STATIC:="yes"}
-
-# Add static-libs useflag where usefull.
-if [[ ${XORG_STATIC} == yes \
- && ${FONT} != yes \
- && ${CATEGORY} != app-doc \
- && ${CATEGORY} != x11-apps \
- && ${CATEGORY} != x11-proto \
- && ${CATEGORY} != x11-drivers \
- && ${CATEGORY} != media-fonts \
- && ${PN} != util-macros \
- && ${PN} != xbitmaps \
- && ${PN} != xorg-cf-files \
- && ${PN/xcursor} = ${PN} ]]; then
- IUSE+=" static-libs"
-fi
-
-DEPEND+=" >=dev-util/pkgconfig-0.23"
-
-# @ECLASS-VARIABLE: XORG_DRI
-# @DESCRIPTION:
-# Possible values are "always" or the value of the useflag DRI capabilities
-# are required for. Default value is "no"
-#
-# Eg. XORG_DRI="opengl" will pull all dri dependant deps for opengl useflag
-: ${XORG_DRI:="no"}
-
-DRI_COMMON_DEPEND="
- x11-base/xorg-server[-minimal]
- x11-libs/libdrm
-"
-DRI_DEPEND="
- x11-proto/xf86driproto
- x11-proto/glproto
- x11-proto/dri2proto
-"
-case ${XORG_DRI} in
- no)
- ;;
- always)
- COMMON_DEPEND+=" ${DRI_COMMON_DEPEND}"
- DEPEND+=" ${DRI_DEPEND}"
- ;;
- *)
- COMMON_DEPEND+=" ${XORG_DRI}? ( ${DRI_COMMON_DEPEND} )"
- DEPEND+=" ${XORG_DRI}? ( ${DRI_DEPEND} )"
- IUSE+=" ${XORG_DRI}"
- ;;
-esac
-unset DRI_DEPEND
-unset DRI_COMMONDEPEND
-
-if [[ -n "${DRIVER}" ]]; then
- COMMON_DEPEND+="
- x11-base/xorg-server[xorg]
- "
-fi
-if [[ -n "${DRIVER}" && ${PN} == xf86-video-* ]]; then
- COMMON_DEPEND+="
- x11-libs/libpciaccess
- "
- # we also needs some protos and libs in all cases
- DEPEND+="
- x11-proto/fontsproto
- x11-proto/randrproto
- x11-proto/renderproto
- x11-proto/videoproto
- x11-proto/xextproto
- x11-proto/xineramaproto
- x11-proto/xproto
- "
-fi
-
-# @ECLASS-VARIABLE: XORG_DOC
-# @DESCRIPTION:
-# Possible values are "always" or the value of the useflag doc packages
-# are required for. Default value is "no"
-#
-# Eg. XORG_DOC="manual" will pull all doc dependant deps for manual useflag
-: ${XORG_DOC:="no"}
-
-DOC_DEPEND="
- doc? (
- app-text/asciidoc
- app-text/xmlto
- app-doc/doxygen
- app-text/docbook-xml-dtd:4.1.2
- app-text/docbook-xml-dtd:4.2
- app-text/docbook-xml-dtd:4.3
- )
-"
-case ${XORG_DOC} in
- no)
- ;;
- always)
- DEPEND+=" ${DOC_DEPEND}"
- ;;
- *)
- DEPEND+=" ${XORG_DOC}? ( ${DOC_DEPEND} )"
- IUSE+=" ${XORG_DOC}"
- ;;
-esac
-unset DOC_DEPEND
-
-DEPEND+=" ${COMMON_DEPEND}"
-RDEPEND+=" ${COMMON_DEPEND}"
-unset COMMON_DEPEND
-
-debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: DEPEND=${DEPEND}"
-debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: RDEPEND=${RDEPEND}"
-debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: PDEPEND=${PDEPEND}"
-
-# @FUNCTION: xorg-2_pkg_setup
-# @DESCRIPTION:
-# Setup prefix compat
-xorg-2_pkg_setup() {
- debug-print-function ${FUNCNAME} "$@"
-
- [[ ${FONT} == yes ]] && font_pkg_setup "$@"
-}
-
-# @FUNCTION: xorg-2_src_unpack
-# @DESCRIPTION:
-# Simply unpack source code.
-xorg-2_src_unpack() {
- debug-print-function ${FUNCNAME} "$@"
-
- if [[ -n ${GIT_ECLASS} ]]; then
- git-2_src_unpack
- else
- unpack ${A}
- fi
-
- [[ -n ${FONT_OPTIONS} ]] && einfo "Detected font directory: ${FONT_DIR}"
-}
-
-# @FUNCTION: xorg-2_patch_source
-# @DESCRIPTION:
-# Apply all patches
-xorg-2_patch_source() {
- debug-print-function ${FUNCNAME} "$@"
-
- # Use standardized names and locations with bulk patching
- # Patch directory is ${WORKDIR}/patch
- # See epatch() in eutils.eclass for more documentation
- EPATCH_SUFFIX=${EPATCH_SUFFIX:=patch}
-
- [[ -d "${EPATCH_SOURCE}" ]] && epatch
- autotools-utils_src_prepare "$@"
-}
-
-# @FUNCTION: xorg-2_reconf_source
-# @DESCRIPTION:
-# Run eautoreconf if necessary, and run elibtoolize.
-xorg-2_reconf_source() {
- debug-print-function ${FUNCNAME} "$@"
-
- case ${CHOST} in
- *-interix* | *-aix* | *-winnt*)
- # some hosts need full eautoreconf
- [[ -e "./configure.ac" || -e "./configure.in" ]] && eautoreconf || ewarn "Unable to autoreconf the configure script. Things may fail."
- ;;
- *)
- # elibtoolize required for BSD
- [[ ${XORG_EAUTORECONF} != no && ( -e "./configure.ac" || -e "./configure.in" ) ]] && eautoreconf || elibtoolize
- ;;
- esac
-}
-
-# @FUNCTION: xorg-2_src_prepare
-# @DESCRIPTION:
-# Prepare a package after unpacking, performing all X-related tasks.
-xorg-2_src_prepare() {
- debug-print-function ${FUNCNAME} "$@"
-
- xorg-2_patch_source
- xorg-2_reconf_source
-}
-
-# @FUNCTION: xorg-2_font_configure
-# @DESCRIPTION:
-# If a font package, perform any necessary configuration steps
-xorg-2_font_configure() {
- debug-print-function ${FUNCNAME} "$@"
-
- if has nls ${IUSE//+} && ! use nls; then
- if grep -q -s "disable-all-encodings" ${ECONF_SOURCE:-.}/configure; then
- FONT_OPTIONS+="
- --disable-all-encodings"
- else
- FONT_OPTIONS+="
- --disable-iso8859-2
- --disable-iso8859-3
- --disable-iso8859-4
- --disable-iso8859-5
- --disable-iso8859-6
- --disable-iso8859-7
- --disable-iso8859-8
- --disable-iso8859-9
- --disable-iso8859-10
- --disable-iso8859-11
- --disable-iso8859-12
- --disable-iso8859-13
- --disable-iso8859-14
- --disable-iso8859-15
- --disable-iso8859-16
- --disable-jisx0201
- --disable-koi8-r"
- fi
- fi
-}
-
-# @FUNCTION: xorg-2_flags_setup
-# @DESCRIPTION:
-# Set up CFLAGS for a debug build
-xorg-2_flags_setup() {
- debug-print-function ${FUNCNAME} "$@"
-
- # Win32 require special define
- [[ ${CHOST} == *-winnt* ]] && append-cppflags -DWIN32 -D__STDC__
- # hardened ldflags
- [[ ${PN} = xorg-server || -n ${DRIVER} ]] && append-ldflags -Wl,-z,lazy
-
- # Quite few libraries fail on runtime without these:
- if has static-libs ${IUSE//+}; then
- filter-flags -Wl,-Bdirect
- filter-ldflags -Bdirect
- filter-ldflags -Wl,-Bdirect
- fi
-}
-
-# @FUNCTION: xorg-2_src_configure
-# @DESCRIPTION:
-# Perform any necessary pre-configuration steps, then run configure
-xorg-2_src_configure() {
- debug-print-function ${FUNCNAME} "$@"
-
- xorg-2_flags_setup
-
- # @VARIABLE: XORG_CONFIGURE_OPTIONS
- # @DESCRIPTION:
- # Array of an additional options to pass to configure.
- # @DEFAULT_UNSET
- 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
- ${FONT_OPTIONS}
- "${xorgconfadd[@]}"
- )
-
- autotools-utils_src_configure "$@"
-}
-
-# @FUNCTION: xorg-2_src_compile
-# @DESCRIPTION:
-# Compile a package, performing all X-related tasks.
-xorg-2_src_compile() {
- debug-print-function ${FUNCNAME} "$@"
-
- autotools-utils_src_compile "$@"
-}
-
-# @FUNCTION: xorg-2_src_install
-# @DESCRIPTION:
-# Install a built package to ${D}, performing any necessary steps.
-# Creates a ChangeLog from git if using live ebuilds.
-xorg-2_src_install() {
- debug-print-function ${FUNCNAME} "$@"
-
- if [[ ${CATEGORY} == x11-proto ]]; then
- autotools-utils_src_install \
- ${PN/proto/}docdir="${EPREFIX}/usr/share/doc/${PF}" \
- docdir="${EPREFIX}/usr/share/doc/${PF}"
- else
- autotools-utils_src_install \
- docdir="${EPREFIX}/usr/share/doc/${PF}"
- fi
-
- if [[ -n ${GIT_ECLASS} ]]; then
- pushd "${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}" > /dev/null
- git log ${EGIT_COMMIT} > "${S}"/ChangeLog
- popd > /dev/null
- fi
-
- if [[ -e "${S}"/ChangeLog ]]; then
- dodoc "${S}"/ChangeLog || die "dodoc failed"
- fi
-
- # Don't install libtool archives (even with static-libs)
- remove_libtool_files all
-
- [[ -n ${FONT} ]] && remove_font_metadata
-}
-
-# @FUNCTION: xorg-2_pkg_postinst
-# @DESCRIPTION:
-# Run X-specific post-installation tasks on the live filesystem. The
-# only task right now is some setup for font packages.
-xorg-2_pkg_postinst() {
- debug-print-function ${FUNCNAME} "$@"
-
- [[ -n ${FONT} ]] && setup_fonts "$@"
-}
-
-# @FUNCTION: xorg-2_pkg_postrm
-# @DESCRIPTION:
-# Run X-specific post-removal tasks on the live filesystem. The only
-# task right now is some cleanup for font packages.
-xorg-2_pkg_postrm() {
- debug-print-function ${FUNCNAME} "$@"
-
- [[ -n ${FONT} ]] && font_pkg_postrm "$@"
-}
-
-# @FUNCTION: setup_fonts
-# @DESCRIPTION:
-# Generates needed files for fonts and fixes font permissions
-setup_fonts() {
- debug-print-function ${FUNCNAME} "$@"
-
- create_fonts_scale
- create_fonts_dir
- font_pkg_postinst
-}
-
-# @FUNCTION: remove_font_metadata
-# @DESCRIPTION:
-# Don't let the package install generated font files that may overlap
-# with other packages. Instead, they're generated in pkg_postinst().
-remove_font_metadata() {
- debug-print-function ${FUNCNAME} "$@"
-
- if [[ ${FONT_DIR} != Speedo && ${FONT_DIR} != CID ]]; then
- einfo "Removing font metadata"
- rm -rf "${ED}"/usr/share/fonts/${FONT_DIR}/fonts.{scale,dir,cache-1}
- fi
-}
-
-# @FUNCTION: create_fonts_scale
-# @DESCRIPTION:
-# Create fonts.scale file, used by the old server-side fonts subsystem.
-create_fonts_scale() {
- debug-print-function ${FUNCNAME} "$@"
-
- if [[ ${FONT_DIR} != Speedo && ${FONT_DIR} != CID ]]; then
- ebegin "Generating font.scale"
- mkfontscale \
- -a "${EROOT}/usr/share/fonts/encodings/encodings.dir" \
- -- "${EROOT}/usr/share/fonts/${FONT_DIR}"
- eend $?
- fi
-}
-
-# @FUNCTION: create_fonts_dir
-# @DESCRIPTION:
-# Create fonts.dir file, used by the old server-side fonts subsystem.
-create_fonts_dir() {
- debug-print-function ${FUNCNAME} "$@"
-
- ebegin "Generating fonts.dir"
- mkfontdir \
- -e "${EROOT}"/usr/share/fonts/encodings \
- -e "${EROOT}"/usr/share/fonts/encodings/large \
- -- "${EROOT}/usr/share/fonts/${FONT_DIR}"
- eend $?
-}
^ permalink raw reply related [flat|nested] 24+ messages in thread
end of thread, other threads:[~2011-04-20 12:49 UTC | newest]
Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-18 13:19 [gentoo-commits] proj/x11:master commit in: eclass/ Tomas Chvatal
-- strict thread matches above, loose matches on Subject: below --
2011-04-20 12:49 Michał Górny
2011-04-20 11:06 Tomas Chvatal
2011-04-17 20:47 Tomas Chvatal
2011-04-15 19:05 Michał Górny
2011-04-15 17:21 Michał Górny
2011-04-15 17:21 Michał Górny
2011-04-15 17:21 Michał Górny
2011-03-09 13:52 Tomas Chvatal
2011-03-01 18:57 Tomas Chvatal
2011-02-24 14:31 Tomas Chvatal
2011-02-22 13:28 Tomas Chvatal
2011-02-21 19:48 Tomas Chvatal
2011-02-21 19:39 Tomas Chvatal
2011-02-21 19:07 Tomas Chvatal
2011-02-21 18:30 Tomas Chvatal
2011-02-21 18:22 Tomas Chvatal
2011-02-21 18:20 Tomas Chvatal
2011-02-19 13:50 Tomas Chvatal
2011-02-18 14:48 Tomas Chvatal
2011-02-18 13:26 Tomas Chvatal
2011-02-18 13:19 Tomas Chvatal
2011-02-06 15:49 Michał Górny
2011-02-06 15:49 Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox