public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [RFC] New eclass for x11 packages
@ 2010-02-18 22:33 Tomáš Chvátal
  2010-02-18 22:39 ` Jeremy Olexa
                   ` (5 more replies)
  0 siblings, 6 replies; 21+ messages in thread
From: Tomáš Chvátal @ 2010-02-18 22:33 UTC (permalink / raw
  To: gentoo-dev, x11


[-- Attachment #1.1: Type: text/plain, Size: 1148 bytes --]

Hi,
we prepared new eclass for x11 packages that should be used as
replacement for x-modular.eclass.

After long discussion with others on irc we choose to name it as
xorg-2.eclass.

Whats new/changed:

1 removed function call (pkg_preinst iirc) and 1 new added pkg_setup.

Requires eapi3 or any later when added, so wont work with eapi 012.

Removed most code that kept backcompat up to old mono xorg :]

Added static-libs useflag hopefully everywhere where usefull.

Fonts handling slightly rewritten to be done as written in specs (or i
hope i did so :]).

Removed weird debug useflag handling which just altered C/XX/FLAGS.

Prefix support done.

Its used everywhere in x11 overlay and you can see it also as attachment
to this mail.

Please help us to find issues we might miss, before inclusion. Which
will happen in 14 days since today (4.3. 2010) if nothing major will be
found.

Cheers

--------
Tomáš Chvátal
Gentoo Linux Developer [Council/KDE/Overlays/QA/X11]
E-Mail          : scarabeus@gentoo.org
GnuPG FP        : 94A4 5CCD 85D3 DE24 FE99 F924 1C1E 9CDE 0341 4587
GnuPG ID        : 03414587

[-- Attachment #1.2: xorg-2.eclass --]
[-- Type: text/plain, Size: 12744 bytes --]

# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
#
# @ECLASS: xorg-2.eclass
# @MAINTAINER:
# x11@gentoo.org

# Author: Tomáš Chvátal <scarabeus@gentoo.org>
# Author: Donnie Berkholz <dberkholz@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.

GIT_ECLASS=""
if [[ ${PV} == *9999* ]]; then
	GIT_ECLASS="git"
	SNAPSHOT="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 eutils base 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) EXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS} src_prepare src_configure" ;;
	*) DEPEND="EAPI-UNSUPPORTED" ;;
esac

# exports must be ALWAYS after inherit
EXPORT_FUNCTIONS ${EXPORTED_FUNCTIONS}

# @ECLASS-VARIABLE: XDIR
# @DESCRIPTION:
# Directory prefix to use for everything. If you want to install to a
# non-default prefix (e.g., /opt/xorg), change XDIR. This has not been
# recently tested. You may need to uncomment the setting of datadir and
# mandir in xorg-2_src_install() or add it back in if it's no longer
# there. You may also want to change the SLOT.
: ${XDIR:=/usr}

IUSE=""
HOMEPAGE="http://xorg.freedesktop.org/"

# @ECLASS-VARIABLE: SNAPSHOT
# @DESCRIPTION:
# If set to 'yes' and configure.ac exists, eautoreconf will run. Set
# before inheriting this eclass.
: ${SNAPSHOT:="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
	MODULE=""
	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"     ;;
	esac
fi

if [[ -n ${GIT_ECLASS} ]]; then
	EGIT_REPO_URI="git://anongit.freedesktop.org/git/xorg/${MODULE}/${PN}"
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 shared dependencies
if [[ ${SNAPSHOT} != no ]]; then
	DEPEND+="
		>=sys-devel/libtool-2.2.6a
		sys-devel/m4"
	# These 2 versions MUST BE STABLE
	[[ ${PN} == util-macros ]] || DEPEND+=" >=x11-misc/util-macros-1.3.0"
	[[ ${PN} == font-util ]] || DEPEND+=" >=media-fonts/font-util-1.1.1-r1"
	WANT_AUTOCONF="latest"
	WANT_AUTOMAKE="latest"
fi

if [[ ${FONT} == yes ]]; then
	DEPEND+=" >=media-fonts/font-util-1.1.1-r1"
	RDEPEND+=" media-fonts/encodings
		x11-apps/mkfontscale
		x11-apps/mkfontdir"
	PDEPEND+=" media-fonts/font-alias"

	# @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"

# Add static-libs useflag where usefull.
if [[ ${FONT} != yes \
		&& ${CATEGORY} != app-doc \
		&& ${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 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]"

# @FUNCTION: xorg-2_pkg_setup
# @USAGE:
# @DESCRIPTION:
# Setup prefix compat
xorg-2_pkg_setup() {
	[[ ${FONT} == yes ]] && font_pkg_setup
}

# @FUNCTION: xorg-2_src_unpack
# @USAGE:
# @DESCRIPTION:
# Simply unpack source code.
xorg-2_src_unpack() {
	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
# @USAGE:
# @DESCRIPTION:
# Apply all patches
xorg-2_patch_source() {
	# 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
	base_src_prepare
	epatch_user
}

# @FUNCTION: xorg-2_reconf_source
# @USAGE:
# @DESCRIPTION:
# Run eautoreconf if necessary, and run elibtoolize.
xorg-2_reconf_source() {
	case ${CHOST} in
		*-interix* | *-aix* | *-winnt*)
			# some hosts need full eautoreconf
			[[ -e "./configure.ac" ]] && eautoreconf || ewarn "Unable to autoreconf the configure script. Things may fail."
			;;
		*)
			[[ ${SNAPSHOT} != no && -e "./configure.ac" ]] && eautoreconf
			# Fix shared lib issues on MIPS, FBSD, etc etc
			elibtoolize
			;;
	esac
}

# @FUNCTION: xorg-2_src_prepare
# @USAGE:
# @DESCRIPTION:
# Prepare a package after unpacking, performing all X-related tasks.
xorg-2_src_prepare() {
	[[ -n ${GIT_ECLASS} ]] && git_src_prepare
	xorg-2_patch_source
	xorg-2_reconf_source
}

# @FUNCTION: xorg-2_font_configure
# @USAGE:
# @DESCRIPTION:
# If a font package, perform any necessary configuration steps
xorg-2_font_configure() {
	if has nls ${IUSE//+} && ! use nls; then
		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
}

# @FUNCTION: x-modular_flags_setup
# @USAGE:
# @DESCRIPTION:
# Set up CFLAGS for a debug build
xorg-2_flags_setup() {
	# Win32 require special define
	[[ ${CHOST} == *-winnt* ]] && append-flags -DWIN32 -D__STDC__

	# hardened dependant ldflags
	if [[ ${PN} = xorg-server || -n ${DRIVER} ]]; then
		append-ldflags -Wl,-z,lazy
		# (#116698) breaks loading
		filter-ldflags -Wl,-z,now
	fi
}

# @FUNCTION: xorg-2_src_configure
# @USAGE:
# @DESCRIPTION:
# Perform any necessary pre-configuration steps, then run configure
xorg-2_src_configure() {
	local myopts=""

	xorg-2_flags_setup
	[[ -n "${FONT}" ]] && xorg-2_font_configure

# @VARIABLE: CONFIGURE_OPTIONS
# @DESCRIPTION:
# Any options to pass to configure
	CONFIGURE_OPTIONS=${CONFIGURE_OPTIONS:=""}
	if [[ -x ${ECONF_SOURCE:-.}/configure ]]; then
		if has static-libs ${IUSE//+}; then
			myopts+=" $(use_enable static-libs static)"
		fi
		econf --prefix="${EPREFIX}"${XDIR} \
			--datadir="${EPREFIX}"${XDIR}/share \
			${FONT_OPTIONS} \
			${CONFIGURE_OPTIONS} \
			${myopts}
	fi
}

# @FUNCTION: xorg-2_src_compile
# @USAGE:
# @DESCRIPTION:
# Compile a package, performing all X-related tasks.
xorg-2_src_compile() {
	base_src_compile
}

# @FUNCTION: xorg-2_src_install
# @USAGE:
# @DESCRIPTION:
# Install a built package to ${D}, performing any necessary steps.
# Creates a ChangeLog from git if using live ebuilds.
xorg-2_src_install() {
	# Install everything to ${XDIR}
	if [[ ${CATEGORY} == x11-proto ]]; then
		emake \
			${PN/proto/}docdir=${EPREFIX}/usr/share/doc/${PF} \
			DESTDIR="${D}" \
			install \
			|| die "emake install failed"
	else
		emake \
			docdir=${EPREFIX}/usr/share/doc/${PF} \
			DESTDIR="${D}" \
			install \
			|| die "emake install failed"
	fi

	if [[ -n ${GIT_ECLASS} ]]; then
		pushd "${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}" > /dev/null
		git log ${GIT_TREE} > "${S}"/ChangeLog
		popd > /dev/null
	fi

	if [[ -e "${S}"/ChangeLog ]]; then
		dodoc "${S}"/ChangeLog
	fi
# @VARIABLE: DOCS
# @DESCRIPTION:
# Any documentation to install
	if [[ -n ${DOCS} ]]; then
		dodoc ${DOCS} || die "dodoc failed"
	fi

	# Don't install libtool archives for server modules
	if [[ -e "${D%/}${EPREFIX}/usr/$(get_libdir)/xorg/modules" ]]; then
		find "${D%/}${EPREFIX}/usr/$(get_libdir)/xorg/modules" -name '*.la' \
			| xargs rm -f
	fi

	[[ -n ${FONT} ]] && remove_font_metadata
}

# @FUNCTION: xorg-2_pkg_postinst
# @USAGE:
# @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() {
	[[ -n "${FONT}" ]] && setup_fonts
}

# @FUNCTION: xorg-2_pkg_postrm
# @USAGE:
# @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() {
	if [[ -n "${FONT}" ]]; then
		cleanup_fonts
		font_pkg_postrm
	fi
}

# @FUNCTION: cleanup_fonts
# @USAGE:
# @DESCRIPTION:
# Get rid of font directories that only contain generated files
cleanup_fonts() {
	local allowed_files="encodings.dir fonts.alias fonts.cache-1 fonts.dir fonts.scale"
	local real_dir=${EROOT}usr/share/fonts/${FONT_DIR}
	local fle allowed_file

	unset KEEP_FONTDIR

	einfo "Checking ${real_dir} for useless files"
	pushd ${real_dir} &> /dev/null
	for fle in *; do
		unset MATCH
		for allowed_file in ${allowed_files}; do
			if [[ ${fle} = ${allowed_file} ]]; then
				# If it's allowed, then move on to the next file
				MATCH="yes"
				break
			fi
		done
		# If we found a match in allowed files, move on to the next file
		[[ -n ${MATCH} ]] && continue
		# If we get this far, there wasn't a match in the allowed files
		KEEP_FONTDIR="yes"
		# We don't need to check more files if we're already keeping it
		break
	done
	popd &> /dev/null
	# If there are no files worth keeping, then get rid of the dir
	[[ -z "${KEEP_FONTDIR}" ]] && rm -rf ${real_dir}
}

# @FUNCTION: setup_fonts
# @USAGE:
# @DESCRIPTION:
# Generates needed files for fonts and fixes font permissions
setup_fonts() {
	create_fonts_scale
	create_fonts_dir
	font_pkg_postinst
}

# @FUNCTION: remove_font_metadata
# @USAGE:
# @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() {
	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
# @USAGE:
# @DESCRIPTION:
# Create fonts.scale file, used by the old server-side fonts subsystem.
create_fonts_scale() {
	if [[ ${DIR} != Speedo && ${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
# @USAGE:
# @DESCRIPTION:
# Create fonts.dir file, used by the old server-side fonts subsystem.
create_fonts_dir() {
	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 $?
}

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [gentoo-dev] [RFC] New eclass for x11 packages
  2010-02-18 22:33 [gentoo-dev] [RFC] New eclass for x11 packages Tomáš Chvátal
@ 2010-02-18 22:39 ` Jeremy Olexa
  2010-02-18 23:04   ` Tomáš Chvátal
  2010-02-18 23:06 ` Tomáš Chvátal
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 21+ messages in thread
From: Jeremy Olexa @ 2010-02-18 22:39 UTC (permalink / raw
  To: gentoo-dev


On Thu, 18 Feb 2010 23:33:42 +0100, Tomáš Chvátal <scarabeus@gentoo.org>
wrote:
> Requires eapi3 or any later when added, so wont work with eapi 012.

Hey, can you explain why you choose to do this and what benefit there is
to doing so? Thanks.
-Jeremy



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [gentoo-dev] [RFC] New eclass for x11 packages
  2010-02-18 22:39 ` Jeremy Olexa
@ 2010-02-18 23:04   ` Tomáš Chvátal
  0 siblings, 0 replies; 21+ messages in thread
From: Tomáš Chvátal @ 2010-02-18 23:04 UTC (permalink / raw
  To: gentoo-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dne 18.2.2010 23:39, Jeremy Olexa napsal(a):
> 
> On Thu, 18 Feb 2010 23:33:42 +0100, Tomáš Chvátal <scarabeus@gentoo.org>
> wrote:
>> Requires eapi3 or any later when added, so wont work with eapi 012.
> 
> Hey, can you explain why you choose to do this and what benefit there is
> to doing so? Thanks.
> -Jeremy
> 
Only one: no need for backcompat and limit the subset of eapis we have
to bother with.

Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkt9x2gACgkQHB6c3gNBRYc0IwCglQY66MwCOCVmjJHOofzmt1cQ
DaoAn0EhAWL05AoOQE6oKA+ZMQvPY5lR
=2G6w
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [gentoo-dev] [RFC] New eclass for x11 packages
  2010-02-18 22:33 [gentoo-dev] [RFC] New eclass for x11 packages Tomáš Chvátal
  2010-02-18 22:39 ` Jeremy Olexa
@ 2010-02-18 23:06 ` Tomáš Chvátal
  2010-02-18 23:11 ` David Leverton
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 21+ messages in thread
From: Tomáš Chvátal @ 2010-02-18 23:06 UTC (permalink / raw
  To: gentoo-dev


[-- Attachment #1.1: Type: text/plain, Size: 192 bytes --]

As I got few pointers from Samuli i fixed few slight issues he found
out. For the history of changes of course git log works quite well :]

See attached diff and new full eclass.

Tomas

[-- Attachment #1.2: xorg-2.eclass --]
[-- Type: text/plain, Size: 12554 bytes --]

# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
#
# @ECLASS: xorg-2.eclass
# @MAINTAINER:
# x11@gentoo.org

# Author: Tomáš Chvátal <scarabeus@gentoo.org>
# Author: Donnie Berkholz <dberkholz@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.

GIT_ECLASS=""
if [[ ${PV} == *9999* ]]; then
	GIT_ECLASS="git"
	SNAPSHOT="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 eutils base 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) EXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS} src_prepare src_configure" ;;
	*) DEPEND="EAPI-UNSUPPORTED" ;;
esac

# exports must be ALWAYS after inherit
EXPORT_FUNCTIONS ${EXPORTED_FUNCTIONS}

# @ECLASS-VARIABLE: XDIR
# @DESCRIPTION:
# Directory prefix to use for everything. If you want to install to a
# non-default prefix (e.g., /opt/xorg), change XDIR. This has not been
# recently tested. You may need to uncomment the setting of datadir and
# mandir in xorg-2_src_install() or add it back in if it's no longer
# there. You may also want to change the SLOT.
: ${XDIR:=/usr}

IUSE=""
HOMEPAGE="http://xorg.freedesktop.org/"

# @ECLASS-VARIABLE: SNAPSHOT
# @DESCRIPTION:
# If set to 'yes' and configure.ac exists, eautoreconf will run. Set
# before inheriting this eclass.
: ${SNAPSHOT:="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
	MODULE=""
	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"     ;;
	esac
fi

if [[ -n ${GIT_ECLASS} ]]; then
	EGIT_REPO_URI="git://anongit.freedesktop.org/git/xorg/${MODULE}/${PN}"
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 shared dependencies
if [[ ${SNAPSHOT} != no ]]; then
	DEPEND+="
		>=sys-devel/libtool-2.2.6a
		sys-devel/m4"
	# These 2 versions MUST BE STABLE
	[[ ${PN} == util-macros ]] || DEPEND+=" >=x11-misc/util-macros-1.3.0"
	[[ ${PN} == font-util ]] || DEPEND+=" >=media-fonts/font-util-1.1.1-r1"
	WANT_AUTOCONF="latest"
	WANT_AUTOMAKE="latest"
fi

if [[ ${FONT} == yes ]]; then
	DEPEND+=" >=media-fonts/font-util-1.1.1-r1"
	RDEPEND+=" media-fonts/encodings
		x11-apps/mkfontscale
		x11-apps/mkfontdir"
	PDEPEND+=" media-fonts/font-alias"

	# @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"

# Add static-libs useflag where usefull.
if [[ ${FONT} != yes \
		&& ${CATEGORY} != app-doc \
		&& ${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 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]"

# @FUNCTION: xorg-2_pkg_setup
# @USAGE:
# @DESCRIPTION:
# Setup prefix compat
xorg-2_pkg_setup() {
	[[ ${FONT} == yes ]] && font_pkg_setup
}

# @FUNCTION: xorg-2_src_unpack
# @USAGE:
# @DESCRIPTION:
# Simply unpack source code.
xorg-2_src_unpack() {
	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
# @USAGE:
# @DESCRIPTION:
# Apply all patches
xorg-2_patch_source() {
	# 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
	base_src_prepare
	epatch_user
}

# @FUNCTION: xorg-2_reconf_source
# @USAGE:
# @DESCRIPTION:
# Run eautoreconf if necessary, and run elibtoolize.
xorg-2_reconf_source() {
	case ${CHOST} in
		*-interix* | *-aix* | *-winnt*)
			# some hosts need full eautoreconf
			[[ -e "./configure.ac" ]] && eautoreconf || ewarn "Unable to autoreconf the configure script. Things may fail."
			;;
		*)
			# elibtoolize required for BSD
			[[ ${SNAPSHOT} != no && -e "./configure.ac" ]] && eautoreconf || elibtoolize
			;;
	esac
}

# @FUNCTION: xorg-2_src_prepare
# @USAGE:
# @DESCRIPTION:
# Prepare a package after unpacking, performing all X-related tasks.
xorg-2_src_prepare() {
	[[ -n ${GIT_ECLASS} ]] && git_src_prepare
	xorg-2_patch_source
	xorg-2_reconf_source
}

# @FUNCTION: xorg-2_font_configure
# @USAGE:
# @DESCRIPTION:
# If a font package, perform any necessary configuration steps
xorg-2_font_configure() {
	if has nls ${IUSE//+} && ! use nls; then
		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
}

# @FUNCTION: x-modular_flags_setup
# @USAGE:
# @DESCRIPTION:
# Set up CFLAGS for a debug build
xorg-2_flags_setup() {
	# Win32 require special define
	[[ ${CHOST} == *-winnt* ]] && append-cppflags -DWIN32 -D__STDC__
}

# @FUNCTION: xorg-2_src_configure
# @USAGE:
# @DESCRIPTION:
# Perform any necessary pre-configuration steps, then run configure
xorg-2_src_configure() {
	local myopts=""

	xorg-2_flags_setup
	[[ -n "${FONT}" ]] && xorg-2_font_configure

# @VARIABLE: CONFIGURE_OPTIONS
# @DESCRIPTION:
# Any options to pass to configure
	CONFIGURE_OPTIONS=${CONFIGURE_OPTIONS:=""}
	if [[ -x ${ECONF_SOURCE:-.}/configure ]]; then
		if has static-libs ${IUSE//+}; then
			myopts+=" $(use_enable static-libs static)"
		fi
		econf --prefix="${EPREFIX}"${XDIR} \
			--datadir="${EPREFIX}"${XDIR}/share \
			${FONT_OPTIONS} \
			${CONFIGURE_OPTIONS} \
			${myopts}
	fi
}

# @FUNCTION: xorg-2_src_compile
# @USAGE:
# @DESCRIPTION:
# Compile a package, performing all X-related tasks.
xorg-2_src_compile() {
	base_src_compile
}

# @FUNCTION: xorg-2_src_install
# @USAGE:
# @DESCRIPTION:
# Install a built package to ${D}, performing any necessary steps.
# Creates a ChangeLog from git if using live ebuilds.
xorg-2_src_install() {
	# Install everything to ${XDIR}
	if [[ ${CATEGORY} == x11-proto ]]; then
		emake \
			${PN/proto/}docdir=${EPREFIX}/usr/share/doc/${PF} \
			DESTDIR="${D}" \
			install \
			|| die "emake install failed"
	else
		emake \
			docdir=${EPREFIX}/usr/share/doc/${PF} \
			DESTDIR="${D}" \
			install \
			|| die "emake install failed"
	fi

	if [[ -n ${GIT_ECLASS} ]]; then
		pushd "${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}" > /dev/null
		git log ${GIT_TREE} > "${S}"/ChangeLog
		popd > /dev/null
	fi

	if [[ -e "${S}"/ChangeLog ]]; then
		dodoc "${S}"/ChangeLog
	fi
# @VARIABLE: DOCS
# @DESCRIPTION:
# Any documentation to install
	if [[ -n ${DOCS} ]]; then
		dodoc ${DOCS} || die "dodoc failed"
	fi

	# Don't install libtool archives for server modules
	if [[ -e "${D%/}${EPREFIX}/usr/$(get_libdir)/xorg/modules" ]]; then
		find "${D%/}${EPREFIX}/usr/$(get_libdir)/xorg/modules" -name '*.la' \
			| xargs rm -f
	fi

	[[ -n ${FONT} ]] && remove_font_metadata
}

# @FUNCTION: xorg-2_pkg_postinst
# @USAGE:
# @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() {
	[[ -n ${FONT} ]] && setup_fonts
}

# @FUNCTION: xorg-2_pkg_postrm
# @USAGE:
# @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() {
	if [[ -n ${FONT} ]]; then
		cleanup_fonts
		font_pkg_postrm
	fi
}

# @FUNCTION: cleanup_fonts
# @USAGE:
# @DESCRIPTION:
# Get rid of font directories that only contain generated files
cleanup_fonts() {
	local allowed_files="encodings.dir fonts.alias fonts.cache-1 fonts.dir fonts.scale"
	local real_dir=${EROOT}usr/share/fonts/${FONT_DIR}
	local fle allowed_file

	unset KEEP_FONTDIR

	einfo "Checking ${real_dir} for useless files"
	pushd ${real_dir} &> /dev/null
	for fle in *; do
		unset MATCH
		for allowed_file in ${allowed_files}; do
			if [[ ${fle} = ${allowed_file} ]]; then
				# If it's allowed, then move on to the next file
				MATCH="yes"
				break
			fi
		done
		# If we found a match in allowed files, move on to the next file
		[[ -n ${MATCH} ]] && continue
		# If we get this far, there wasn't a match in the allowed files
		KEEP_FONTDIR="yes"
		# We don't need to check more files if we're already keeping it
		break
	done
	popd &> /dev/null
	# If there are no files worth keeping, then get rid of the dir
	[[ -z "${KEEP_FONTDIR}" ]] && rm -rf ${real_dir}
}

# @FUNCTION: setup_fonts
# @USAGE:
# @DESCRIPTION:
# Generates needed files for fonts and fixes font permissions
setup_fonts() {
	create_fonts_scale
	create_fonts_dir
	font_pkg_postinst
}

# @FUNCTION: remove_font_metadata
# @USAGE:
# @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() {
	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
# @USAGE:
# @DESCRIPTION:
# Create fonts.scale file, used by the old server-side fonts subsystem.
create_fonts_scale() {
	if [[ ${DIR} != Speedo && ${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
# @USAGE:
# @DESCRIPTION:
# Create fonts.dir file, used by the old server-side fonts subsystem.
create_fonts_dir() {
	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 $?
}

[-- Attachment #1.3: xorg-2.eclass.diff --]
[-- Type: text/plain, Size: 1661 bytes --]

diff --git a/eclass/xorg-2.eclass b/eclass/xorg-2.eclass
index 1282d76..7b4718b 100644
--- a/eclass/xorg-2.eclass
+++ b/eclass/xorg-2.eclass
@@ -211,9 +211,8 @@ xorg-2_reconf_source() {
 			[[ -e "./configure.ac" ]] && eautoreconf || ewarn "Unable to autoreconf the configure script. Things may fail."
 			;;
 		*)
-			[[ ${SNAPSHOT} != no && -e "./configure.ac" ]] && eautoreconf
-			# Fix shared lib issues on MIPS, FBSD, etc etc
-			elibtoolize
+			# elibtoolize required for BSD
+			[[ ${SNAPSHOT} != no && -e "./configure.ac" ]] && eautoreconf || elibtoolize
 			;;
 	esac
 }
@@ -261,14 +260,7 @@ xorg-2_font_configure() {
 # Set up CFLAGS for a debug build
 xorg-2_flags_setup() {
 	# Win32 require special define
-	[[ ${CHOST} == *-winnt* ]] && append-flags -DWIN32 -D__STDC__
-
-	# hardened dependant ldflags
-	if [[ ${PN} = xorg-server || -n ${DRIVER} ]]; then
-		append-ldflags -Wl,-z,lazy
-		# (#116698) breaks loading
-		filter-ldflags -Wl,-z,now
-	fi
+	[[ ${CHOST} == *-winnt* ]] && append-cppflags -DWIN32 -D__STDC__
 }
 
 # @FUNCTION: xorg-2_src_configure
@@ -357,7 +349,7 @@ xorg-2_src_install() {
 # 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() {
-	[[ -n "${FONT}" ]] && setup_fonts
+	[[ -n ${FONT} ]] && setup_fonts
 }
 
 # @FUNCTION: xorg-2_pkg_postrm
@@ -366,7 +358,7 @@ xorg-2_pkg_postinst() {
 # 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() {
-	if [[ -n "${FONT}" ]]; then
+	if [[ -n ${FONT} ]]; then
 		cleanup_fonts
 		font_pkg_postrm
 	fi

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: [gentoo-dev] [RFC] New eclass for x11 packages
  2010-02-18 22:33 [gentoo-dev] [RFC] New eclass for x11 packages Tomáš Chvátal
  2010-02-18 22:39 ` Jeremy Olexa
  2010-02-18 23:06 ` Tomáš Chvátal
@ 2010-02-18 23:11 ` David Leverton
  2010-02-18 23:16   ` Tomáš Chvátal
  2010-02-19  1:22 ` [gentoo-dev] " Ryan Hill
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 21+ messages in thread
From: David Leverton @ 2010-02-18 23:11 UTC (permalink / raw
  To: gentoo-dev

On Thursday 18 February 2010 22:33:42 Tomáš Chvátal wrote:
>	[[ ${PN} == util-macros ]] || DEPEND+=" >=x11-misc/util-macros-1.3.0"
>	[[ ${PN} == font-util ]] || DEPEND+=" >=media-fonts/font-util-1.1.1-r1"

Do non-fonts really need font-util there?  Looks like that sets up a nice 
circular dependency.

>			[[ -e "./configure.ac" ]] && eautoreconf || ewarn "Unable to autoreconf 
the configure script. Things may fail."

That'll ewarn if configure.ac doesn't exist at all.  Doesn't eautoreconf die 
anyway if it fails, and if not, is it a good idea for failures to only give a 
warning?



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [gentoo-dev] [RFC] New eclass for x11 packages
  2010-02-18 23:11 ` David Leverton
@ 2010-02-18 23:16   ` Tomáš Chvátal
  2010-02-18 23:20     ` Tomáš Chvátal
  2010-02-18 23:22     ` David Leverton
  0 siblings, 2 replies; 21+ messages in thread
From: Tomáš Chvátal @ 2010-02-18 23:16 UTC (permalink / raw
  To: gentoo-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dne 19.2.2010 00:11, David Leverton napsal(a):
> On Thursday 18 February 2010 22:33:42 Tomáš Chvátal wrote:
>> 	[[ ${PN} == util-macros ]] || DEPEND+=" >=x11-misc/util-macros-1.3.0"
>> 	[[ ${PN} == font-util ]] || DEPEND+=" >=media-fonts/font-util-1.1.1-r1"
> 
> Do non-fonts really need font-util there?  Looks like that sets up a nice 
> circular dependency.
The same dep is in x-modular eclass. I spoted it in some fonts packages
as required so i left it there.
Good work/idea would be if someone doublecheck that one :]

> 
>> 			[[ -e "./configure.ac" ]] && eautoreconf || ewarn "Unable to autoreconf 
> the configure script. Things may fail."
> 
> That'll ewarn if configure.ac doesn't exist at all.  Doesn't eautoreconf die 
> anyway if it fails, and if not, is it a good idea for failures to only give a 
> warning?
> 
That || die is not for eautoreconf

[[ -e "something" ]] && somethingexists || somethingisnotexisting

For your behaviour it would have to look like this

[[ -e "something" ]] && { somethingexists || die if the commands failed ; }

Tomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkt9ymYACgkQHB6c3gNBRYe5kQCgjpAgHUl7icElBtdAUHTcfPOI
wjkAn1CFH/9VxaO9IBnNMlVpLQT60JX+
=+A3h
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [gentoo-dev] [RFC] New eclass for x11 packages
  2010-02-18 23:16   ` Tomáš Chvátal
@ 2010-02-18 23:20     ` Tomáš Chvátal
  2010-02-18 23:22     ` David Leverton
  1 sibling, 0 replies; 21+ messages in thread
From: Tomáš Chvátal @ 2010-02-18 23:20 UTC (permalink / raw
  To: gentoo-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>> 			[[ -e "./configure.ac" ]] && eautoreconf || ewarn "Unable to autoreconf 
>> the configure script. Things may fail."
> 
>> That'll ewarn if configure.ac doesn't exist at all.  Doesn't eautoreconf die 
>> anyway if it fails, and if not, is it a good idea for failures to only give a 
>> warning?
> 
> That || die is not for eautoreconf
> 
> [[ -e "something" ]] && somethingexists || somethingisnotexisting
> 
> For your behaviour it would have to look like this
> 
> [[ -e "something" ]] && { somethingexists || die if the commands failed ; }
> 
Mea culpa,
now I see you ask if I should not die if that configure.ac is not found.
Well the issue is that things Might fail, not 100% fail :] and it is for
prefix only so we can update behaviour for it later to be more strict.

Tomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkt9y1EACgkQHB6c3gNBRYdkqQCgpCsvS1tJQbeP7sZaxP9xNn1m
ogsAoIrPbn8ilxnTd5oXT77lSXsju0g4
=4/mJ
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [gentoo-dev] [RFC] New eclass for x11 packages
  2010-02-18 23:16   ` Tomáš Chvátal
  2010-02-18 23:20     ` Tomáš Chvátal
@ 2010-02-18 23:22     ` David Leverton
  1 sibling, 0 replies; 21+ messages in thread
From: David Leverton @ 2010-02-18 23:22 UTC (permalink / raw
  To: gentoo-dev

On Thursday 18 February 2010 23:16:54 Tomáš Chvátal wrote:
> That || die is not for eautoreconf
>
> [[ -e "something" ]] && somethingexists || somethingisnotexisting
>
> For your behaviour it would have to look like this
>
> [[ -e "something" ]] && { somethingexists || die if the commands failed ; }

Do you mean that it's /supposed/ to ewarn if configure.ac doesn't exist?  Do 
you expect that to happen for X.org packages that have a configure script at 
all?  (Which IIRC is all of them; if there are any that don't have a 
configure, there's obviously no reason to worry about not being able to 
rebuild it.)



^ permalink raw reply	[flat|nested] 21+ messages in thread

* [gentoo-dev] Re: [RFC] New eclass for x11 packages
  2010-02-18 22:33 [gentoo-dev] [RFC] New eclass for x11 packages Tomáš Chvátal
                   ` (2 preceding siblings ...)
  2010-02-18 23:11 ` David Leverton
@ 2010-02-19  1:22 ` Ryan Hill
  2010-02-24 20:54   ` Tomáš Chvátal
  2010-02-22 10:50 ` [gentoo-dev] " Michael Haubenwallner
  2010-03-10 14:13 ` Tomáš Chvátal
  5 siblings, 1 reply; 21+ messages in thread
From: Ryan Hill @ 2010-02-19  1:22 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 2414 bytes --]

On Thu, 18 Feb 2010 23:33:42 +0100
Tomáš Chvátal <scarabeus@gentoo.org> wrote:

> Hi,
> we prepared new eclass for x11 packages that should be used as
> replacement for x-modular.eclass.
> 
> After long discussion with others on irc we choose to name it as
> xorg-2.eclass.
> 
> Whats new/changed:

> Fonts handling slightly rewritten to be done as written in specs (or i
> hope i did so :]).

It'd be nice to move all of the fonts stuff to font.eclass.  Right now we
have two similar-but-not-quite font systems that tend to do the same thing
but drift apart sometimes in incompatible ways.

But I know I don't have time to do it and it seems to work well enough right now, so
meh. ;)

>>> 	[[ ${PN} == util-macros ]] || DEPEND+=" >=x11-misc/util-macros-1.3.0"
>>> 	[[ ${PN} == font-util ]] || DEPEND+=" >=media-fonts/font-util-1.1.1-r1"  
>> 
>> Do non-fonts really need font-util there?  Looks like that sets up a nice 
>> circular dependency.  
>The same dep is in x-modular eclass. I spoted it in some fonts packages
>as required so i left it there.
>Good work/idea would be if someone doublecheck that one :]

Hmm, I don't see it in x-modular.  It shouldn't be required for non-fonts
unless something in git needs it for some wacky reason.


  remove_font_metadata() {
	  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
  }

Sorry, I forgot I was going to follow up on this..  FONT_DIR is a
space-separated list of directories.  The only example of a font with
multiple directories I know of is font-misc-ethiopic.  In that case, the
command run here would be:

  rm -rf /usr/share/fonts/TTF OTF/fonts.{scale,dir,cache-1}

:/

cleanup_fonts(), create_fonts_scale(), and create_fonts_dir() are similarly
broken with multiple directories.


  create_fonts_scale() {
	  if [[ ${DIR} != Speedo && ${DIR} != CID ]]; then

I think you mean ${FONT_DIR} here.  

Honestly, you might consider dropping TTF from font-misc-ethiopic and only
install the OTF version.  It would simplify things greatly.


-- 
fonts,                                            by design, by neglect
gcc-porting,                              for a fact or just for effect
wxwidgets @ gentoo     EFFD 380E 047A 4B51 D2BD C64F 8AA8 8346 F9A4 0662

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [gentoo-dev] [RFC] New eclass for x11 packages
  2010-02-18 22:33 [gentoo-dev] [RFC] New eclass for x11 packages Tomáš Chvátal
                   ` (3 preceding siblings ...)
  2010-02-19  1:22 ` [gentoo-dev] " Ryan Hill
@ 2010-02-22 10:50 ` Michael Haubenwallner
  2010-02-22 14:20   ` Tomáš Chvátal
  2010-03-10 14:13 ` Tomáš Chvátal
  5 siblings, 1 reply; 21+ messages in thread
From: Michael Haubenwallner @ 2010-02-22 10:50 UTC (permalink / raw
  To: gentoo-dev



Tomáš Chvátal wrote:
> Hi,
> we prepared new eclass for x11 packages that should be used as
> replacement for x-modular.eclass.

> Prefix support done.

There's one thing I don't find addressed yet:

When some patch[1] necessary for some (prefix-) platform has to touch
configure.ac or Makefile.am, rendering eautoreconf mandatory on
*each* platform, there's no way to tell xorg-2_reconf_source() to
do the eautoreconf instead of elibtoolize *unconditionally*.

We had to have libXaw.ebuild do the eautoreconf unconditionally[2] after
x-modular_src_unpack() - which just did elibtoolize on some platforms,
causing elibtoolize to get run twice, resulting in bug#232820 [3].

Even if libXaw doesn't need those patches any more it seems,
there's no reason such patches won't become necessary again.

[1] http://overlays.gentoo.org/proj/alt/browser/trunk/prefix-overlay/x11-libs/libXaw/files/libXaw-1.0.5-darwin.patch?rev=37037
[2] http://overlays.gentoo.org/proj/alt/browser/trunk/prefix-overlay/x11-libs/libXaw/libXaw-1.0.6.ebuild?rev=49677#L43
[3] http://bugs.gentoo.org/show_bug.cgi?id=232820

/haubi/

PS: Just a suggestion what an ebuild could do in this case:
 src_prepare() {
     xorg-2_src_prepare --force-eautoreconf
 }
-- 
Michael Haubenwallner
Gentoo on a different level



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [gentoo-dev] [RFC] New eclass for x11 packages
  2010-02-22 10:50 ` [gentoo-dev] " Michael Haubenwallner
@ 2010-02-22 14:20   ` Tomáš Chvátal
  2010-02-22 15:50     ` Michael Haubenwallner
  0 siblings, 1 reply; 21+ messages in thread
From: Tomáš Chvátal @ 2010-02-22 14:20 UTC (permalink / raw
  To: gentoo-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dne 22.2.2010 11:50, Michael Haubenwallner napsal(a):
> 
> PS: Just a suggestion what an ebuild could do in this case:
>  src_prepare() {
>      xorg-2_src_prepare --force-eautoreconf
>  }
SNAPSHOT="yes" xorg-2_src_prepare

^ this does not fit your needs? It does exactly what you want :]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuCksgACgkQHB6c3gNBRYdg1gCgt5MdaHdYiwrNQp8RlXAStjRt
9EQAn3ds4jUA+9iT0zm8FFBgbQa2n6d5
=5ret
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [gentoo-dev] [RFC] New eclass for x11 packages
  2010-02-22 14:20   ` Tomáš Chvátal
@ 2010-02-22 15:50     ` Michael Haubenwallner
  2010-02-22 15:57       ` Tomáš Chvátal
  0 siblings, 1 reply; 21+ messages in thread
From: Michael Haubenwallner @ 2010-02-22 15:50 UTC (permalink / raw
  To: gentoo-dev



Tomáš Chvátal wrote:
> Dne 22.2.2010 11:50, Michael Haubenwallner napsal(a):
>> PS: Just a suggestion what an ebuild could do in this case:
>>  src_prepare() {
>>      xorg-2_src_prepare --force-eautoreconf
>>  }
> SNAPSHOT="yes" xorg-2_src_prepare
> 
> ^ this does not fit your needs? It does exactly what you want :]

Uhh, this doesn't look like the "clean" way and depends on 
exakt knowledge how xorg-2_src_prepare works - shouldn't
eclasses provide something like an "intuitive API" to some
degree, especially if they are "new"?

However - I'll continue looking into the eclass impl details...

/haubi/
-- 
Michael Haubenwallner
Gentoo on a different level



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [gentoo-dev] [RFC] New eclass for x11 packages
  2010-02-22 15:50     ` Michael Haubenwallner
@ 2010-02-22 15:57       ` Tomáš Chvátal
  2010-02-27 12:18         ` Tomáš Chvátal
  0 siblings, 1 reply; 21+ messages in thread
From: Tomáš Chvátal @ 2010-02-22 15:57 UTC (permalink / raw
  To: gentoo-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dne 22.2.2010 16:50, Michael Haubenwallner napsal(a):
> 
> 
> Tomáš Chvátal wrote:
>> Dne 22.2.2010 11:50, Michael Haubenwallner napsal(a):
>>> PS: Just a suggestion what an ebuild could do in this case:
>>>  src_prepare() {
>>>      xorg-2_src_prepare --force-eautoreconf
>>>  }
>> SNAPSHOT="yes" xorg-2_src_prepare
>>
>> ^ this does not fit your needs? It does exactly what you want :]
> 
> Uhh, this doesn't look like the "clean" way and depends on 
> exakt knowledge how xorg-2_src_prepare works - shouldn't
> eclasses provide something like an "intuitive API" to some
> degree, especially if they are "new"?
> 
> However - I'll continue looking into the eclass impl details...
> 
> /haubi/
I was just asking, not implying that it is best solution :]

Feel free to provide some patches to make it more intuitive, i am too
busy this week and i wont probably do any gentoo work expect applying
submitted patches :]

Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuCqUwACgkQHB6c3gNBRYc2LACghRaSmPl+kccp/DHNPBa3Q6v6
xnEAoLoM0EmpUIS2ZF8CISVPLOuFmWRD
=wx2f
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [gentoo-dev] Re: [RFC] New eclass for x11 packages
  2010-02-19  1:22 ` [gentoo-dev] " Ryan Hill
@ 2010-02-24 20:54   ` Tomáš Chvátal
  0 siblings, 0 replies; 21+ messages in thread
From: Tomáš Chvátal @ 2010-02-24 20:54 UTC (permalink / raw
  To: gentoo-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dne 19.2.2010 02:22, Ryan Hill napsal(a):
> On Thu, 18 Feb 2010 23:33:42 +0100
> Tomáš Chvátal <scarabeus@gentoo.org> wrote:
> 
>> Hi,
>> we prepared new eclass for x11 packages that should be used as
>> replacement for x-modular.eclass.
>>
>> After long discussion with others on irc we choose to name it as
>> xorg-2.eclass.
>>
>> Whats new/changed:
> 
>> Fonts handling slightly rewritten to be done as written in specs (or i
>> hope i did so :]).
> 
> It'd be nice to move all of the fonts stuff to font.eclass.  Right now we
> have two similar-but-not-quite font systems that tend to do the same thing
> but drift apart sometimes in incompatible ways.
> 
> But I know I don't have time to do it and it seems to work well enough right now, so
> meh. ;)
> 
>>>> 	[[ ${PN} == util-macros ]] || DEPEND+=" >=x11-misc/util-macros-1.3.0"
>>>> 	[[ ${PN} == font-util ]] || DEPEND+=" >=media-fonts/font-util-1.1.1-r1"  
>>>
>>> Do non-fonts really need font-util there?  Looks like that sets up a nice 
>>> circular dependency.  
>> The same dep is in x-modular eclass. I spoted it in some fonts packages
>> as required so i left it there.
>> Good work/idea would be if someone doublecheck that one :]
> 
> Hmm, I don't see it in x-modular.  It shouldn't be required for non-fonts
> unless something in git needs it for some wacky reason.
> 
> 
>   remove_font_metadata() {
> 	  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
>   }
> 
> Sorry, I forgot I was going to follow up on this..  FONT_DIR is a
> space-separated list of directories.  The only example of a font with
> multiple directories I know of is font-misc-ethiopic.  In that case, the
> command run here would be:
> 
>   rm -rf /usr/share/fonts/TTF OTF/fonts.{scale,dir,cache-1}
> 
> :/
> 
> cleanup_fonts(), create_fonts_scale(), and create_fonts_dir() are similarly
> broken with multiple directories.
> 
> 
>   create_fonts_scale() {
> 	  if [[ ${DIR} != Speedo && ${DIR} != CID ]]; then
> 
> I think you mean ${FONT_DIR} here.  
YEAH :P Fixed in git.
> 
> Honestly, you might consider dropping TTF from font-misc-ethiopic and only
> install the OTF version.  It would simplify things greatly.
> 
> 
Well everywhere the FONT_DIR is treated as one dir, so maybe we should
just bash to submission the one offending ebuild and be done with it.

I can of course write logic to count with space separated list...
You decide, after all you are font guy :P Or actually anyone share your
opinions about this :]

Tomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuFkh4ACgkQHB6c3gNBRYfQJQCfZnjWiT6GtKloZCMncnWe/Aas
VRsAoM5nHXldDiygrYMyZPg9aLB46G0V
=Kooc
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [gentoo-dev] [RFC] New eclass for x11 packages
  2010-02-22 15:57       ` Tomáš Chvátal
@ 2010-02-27 12:18         ` Tomáš Chvátal
  2010-03-01  8:58           ` Michael Haubenwallner
  0 siblings, 1 reply; 21+ messages in thread
From: Tomáš Chvátal @ 2010-02-27 12:18 UTC (permalink / raw
  To: gentoo-dev


[-- Attachment #1.1: Type: text/plain, Size: 250 bytes --]

Ok,
as per discussion with remi i slightly updated the eclassdoc and renamed
snapshot variable into saner XORG_EAUTORECONF.

Everything is eclassdoced so it will show up on man xorg-2.eclass when
in main tree.

Does it fit your needs?

Tom

[-- Attachment #1.2: xorg-2.eclass --]
[-- Type: text/plain, Size: 12170 bytes --]

# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
#
# @ECLASS: xorg-2.eclass
# @MAINTAINER:
# x11@gentoo.org

# Author: Tomáš Chvátal <scarabeus@gentoo.org>
# Author: Donnie Berkholz <dberkholz@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.

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 eutils base 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) EXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS} src_prepare src_configure" ;;
	*) DEPEND="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
	MODULE=""
	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"     ;;
	esac
fi

if [[ -n ${GIT_ECLASS} ]]; then
	EGIT_REPO_URI="git://anongit.freedesktop.org/git/xorg/${MODULE}/${PN}"
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 shared dependencies
if [[ ${XORG_EAUTORECONF} != no ]]; then
	DEPEND+="
		>=sys-devel/libtool-2.2.6a
		sys-devel/m4"
	# This MUST BE STABLE
	[[ ${PN} == util-macros ]] || DEPEND+=" >=x11-misc/util-macros-1.5.0"
	WANT_AUTOCONF="latest"
	WANT_AUTOMAKE="latest"
fi

if [[ ${FONT} == yes ]]; then
	# This MUST BE STABLE
	[[ ${PN} != "font-util" ]] && DEPEND+=" >=media-fonts/font-util-1.1.1-r1"
	RDEPEND+=" media-fonts/encodings
		x11-apps/mkfontscale
		x11-apps/mkfontdir"
	PDEPEND+=" media-fonts/font-alias"

	# @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"

# Add static-libs useflag where usefull.
if [[ ${FONT} != yes \
		&& ${CATEGORY} != app-doc \
		&& ${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 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]"

# @FUNCTION: xorg-2_pkg_setup
# @USAGE:
# @DESCRIPTION:
# Setup prefix compat
xorg-2_pkg_setup() {
	[[ ${FONT} == yes ]] && font_pkg_setup
}

# @FUNCTION: xorg-2_src_unpack
# @USAGE:
# @DESCRIPTION:
# Simply unpack source code.
xorg-2_src_unpack() {
	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
# @USAGE:
# @DESCRIPTION:
# Apply all patches
xorg-2_patch_source() {
	# 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
	base_src_prepare
	epatch_user
}

# @FUNCTION: xorg-2_reconf_source
# @USAGE:
# @DESCRIPTION:
# Run eautoreconf if necessary, and run elibtoolize.
xorg-2_reconf_source() {
	case ${CHOST} in
		*-interix* | *-aix* | *-winnt*)
			# some hosts need full eautoreconf
			[[ -e "./configure.ac" ]] && eautoreconf || ewarn "Unable to autoreconf the configure script. Things may fail."
			;;
		*)
			# elibtoolize required for BSD
			[[ ${XORG_EAUTORECONF} != no && -e "./configure.ac" ]] && eautoreconf || elibtoolize
			;;
	esac
}

# @FUNCTION: xorg-2_src_prepare
# @USAGE:
# @DESCRIPTION:
# Prepare a package after unpacking, performing all X-related tasks.
xorg-2_src_prepare() {
	[[ -n ${GIT_ECLASS} ]] && git_src_prepare
	xorg-2_patch_source
	xorg-2_reconf_source
}

# @FUNCTION: xorg-2_font_configure
# @USAGE:
# @DESCRIPTION:
# If a font package, perform any necessary configuration steps
xorg-2_font_configure() {
	if has nls ${IUSE//+} && ! use nls; then
		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
}

# @FUNCTION: x-modular_flags_setup
# @USAGE:
# @DESCRIPTION:
# Set up CFLAGS for a debug build
xorg-2_flags_setup() {
	# Win32 require special define
	[[ ${CHOST} == *-winnt* ]] && append-cppflags -DWIN32 -D__STDC__
	# hardened ldflags
	[[ ${PN} = xorg-server || -n ${DRIVER} ]] && append-ldflags -Wl,-z,lazy
}

# @FUNCTION: xorg-2_src_configure
# @USAGE:
# @DESCRIPTION:
# Perform any necessary pre-configuration steps, then run configure
xorg-2_src_configure() {
	local myopts=""

	xorg-2_flags_setup
	[[ -n "${FONT}" ]] && xorg-2_font_configure

# @VARIABLE: CONFIGURE_OPTIONS
# @DESCRIPTION:
# Any options to pass to configure
	CONFIGURE_OPTIONS=${CONFIGURE_OPTIONS:=""}
	if [[ -x ${ECONF_SOURCE:-.}/configure ]]; then
		if has static-libs ${IUSE//+}; then
			myopts+=" $(use_enable static-libs static)"
		fi
		econf \
			${FONT_OPTIONS} \
			${CONFIGURE_OPTIONS} \
			${myopts}
	fi
}

# @FUNCTION: xorg-2_src_compile
# @USAGE:
# @DESCRIPTION:
# Compile a package, performing all X-related tasks.
xorg-2_src_compile() {
	base_src_compile
}

# @FUNCTION: xorg-2_src_install
# @USAGE:
# @DESCRIPTION:
# Install a built package to ${D}, performing any necessary steps.
# Creates a ChangeLog from git if using live ebuilds.
xorg-2_src_install() {
	if [[ ${CATEGORY} == x11-proto ]]; then
		emake \
			${PN/proto/}docdir=${EPREFIX}/usr/share/doc/${PF} \
			DESTDIR="${D}" \
			install || die "emake install failed"
	else
		emake \
			docdir=${EPREFIX}/usr/share/doc/${PF} \
			DESTDIR="${D}" \
			install || die "emake install failed"
	fi

	if [[ -n ${GIT_ECLASS} ]]; then
		pushd "${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}" > /dev/null
		git log ${GIT_TREE} > "${S}"/ChangeLog
		popd > /dev/null
	fi

	if [[ -e "${S}"/ChangeLog ]]; then
		dodoc "${S}"/ChangeLog
	fi
# @VARIABLE: DOCS
# @DESCRIPTION:
# Any documentation to install
	if [[ -n ${DOCS} ]]; then
		dodoc ${DOCS} || die "dodoc failed"
	fi

	# Don't install libtool archives for server modules
	if [[ -e "${D%/}${EPREFIX}/usr/$(get_libdir)/xorg/modules" ]]; then
		find "${D%/}${EPREFIX}/usr/$(get_libdir)/xorg/modules" -name '*.la' \
			-exec rm -f {} ';'
	fi

	[[ -n ${FONT} ]] && remove_font_metadata
}

# @FUNCTION: xorg-2_pkg_postinst
# @USAGE:
# @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() {
	[[ -n ${FONT} ]] && setup_fonts
}

# @FUNCTION: xorg-2_pkg_postrm
# @USAGE:
# @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() {
	if [[ -n ${FONT} ]]; then
		cleanup_fonts
		font_pkg_postrm
	fi
}

# @FUNCTION: cleanup_fonts
# @USAGE:
# @DESCRIPTION:
# Get rid of font directories that only contain generated files
cleanup_fonts() {
	local allowed_files="encodings.dir fonts.alias fonts.cache-1 fonts.dir fonts.scale"
	local real_dir=${EROOT}usr/share/fonts/${FONT_DIR}
	local fle allowed_file

	unset KEEP_FONTDIR

	einfo "Checking ${real_dir} for useless files"
	pushd ${real_dir} &> /dev/null
	for fle in *; do
		unset MATCH
		for allowed_file in ${allowed_files}; do
			if [[ ${fle} = ${allowed_file} ]]; then
				# If it's allowed, then move on to the next file
				MATCH="yes"
				break
			fi
		done
		# If we found a match in allowed files, move on to the next file
		[[ -n ${MATCH} ]] && continue
		# If we get this far, there wasn't a match in the allowed files
		KEEP_FONTDIR="yes"
		# We don't need to check more files if we're already keeping it
		break
	done
	popd &> /dev/null
	# If there are no files worth keeping, then get rid of the dir
	[[ -z "${KEEP_FONTDIR}" ]] && rm -rf ${real_dir}
}

# @FUNCTION: setup_fonts
# @USAGE:
# @DESCRIPTION:
# Generates needed files for fonts and fixes font permissions
setup_fonts() {
	create_fonts_scale
	create_fonts_dir
	font_pkg_postinst
}

# @FUNCTION: remove_font_metadata
# @USAGE:
# @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() {
	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
# @USAGE:
# @DESCRIPTION:
# Create fonts.scale file, used by the old server-side fonts subsystem.
create_fonts_scale() {
	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
# @USAGE:
# @DESCRIPTION:
# Create fonts.dir file, used by the old server-side fonts subsystem.
create_fonts_dir() {
	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 $?
}

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [gentoo-dev] [RFC] New eclass for x11 packages
  2010-02-27 12:18         ` Tomáš Chvátal
@ 2010-03-01  8:58           ` Michael Haubenwallner
  2010-03-01 10:38             ` Samuli Suominen
  0 siblings, 1 reply; 21+ messages in thread
From: Michael Haubenwallner @ 2010-03-01  8:58 UTC (permalink / raw
  To: gentoo-dev



Tomáš Chvátal wrote:
> and renamed snapshot variable into saner XORG_EAUTORECONF.

> Does it fit your needs?

Sane enough for me ;), thank you!

/haubi/
-- 
Michael Haubenwallner
Gentoo on a different level



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [gentoo-dev] [RFC] New eclass for x11 packages
  2010-03-01  8:58           ` Michael Haubenwallner
@ 2010-03-01 10:38             ` Samuli Suominen
  2010-03-07 10:52               ` Rémi Cardona
  0 siblings, 1 reply; 21+ messages in thread
From: Samuli Suominen @ 2010-03-01 10:38 UTC (permalink / raw
  To: gentoo-dev

On 03/01/2010 10:58 AM, Michael Haubenwallner wrote:
> 
> 
> Tomáš Chvátal wrote:
>> and renamed snapshot variable into saner XORG_EAUTORECONF.
> 
>> Does it fit your needs?
> 
> Sane enough for me ;), thank you!
> 
> /haubi/

I'd prefer EAUTORECONF (as it's already used in xfconf.eclass for the
same purpose, and has no reason to differ) or even SNAPSHOT, but XORG_
prefix seems redudant

- Samuli



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [gentoo-dev] [RFC] New eclass for x11 packages
  2010-03-01 10:38             ` Samuli Suominen
@ 2010-03-07 10:52               ` Rémi Cardona
  0 siblings, 0 replies; 21+ messages in thread
From: Rémi Cardona @ 2010-03-07 10:52 UTC (permalink / raw
  To: gentoo-dev

Le 01/03/2010 11:38, Samuli Suominen a écrit :
> I'd prefer EAUTORECONF (as it's already used in xfconf.eclass for the
> same purpose, and has no reason to differ) or even SNAPSHOT, but XORG_
> prefix seems redudant

We decided to put the prefix to make things clearer for ebuild writers
and to make the eclass variables consistent. The 5 extra chars are worth it.

Besides, this option isn't used a lot, so it won't clutter up portage
too much ;)

Cheers,

Rémi



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [gentoo-dev] [RFC] New eclass for x11 packages
  2010-02-18 22:33 [gentoo-dev] [RFC] New eclass for x11 packages Tomáš Chvátal
                   ` (4 preceding siblings ...)
  2010-02-22 10:50 ` [gentoo-dev] " Michael Haubenwallner
@ 2010-03-10 14:13 ` Tomáš Chvátal
  2010-03-10 19:40   ` Dawid Węgliński
  5 siblings, 1 reply; 21+ messages in thread
From: Tomáš Chvátal @ 2010-03-10 14:13 UTC (permalink / raw
  To: gentoo-dev


[-- Attachment #1.1: Type: text/plain, Size: 208 bytes --]

As last step i fixed issue with circular dependencies.
So please speak-up now because if no complains are sent, i will add this
eclass in 5 hours into main tree.

For the eclass see attachment.

Tomas

[-- Attachment #1.2: xorg-2.eclass --]
[-- Type: text/plain, Size: 12194 bytes --]

# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
#
# @ECLASS: xorg-2.eclass
# @MAINTAINER:
# x11@gentoo.org

# Author: Tomáš Chvátal <scarabeus@gentoo.org>
# Author: Donnie Berkholz <dberkholz@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.

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 eutils base 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) EXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS} src_prepare src_configure" ;;
	*) DEPEND="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
	MODULE=""
	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"     ;;
	esac
fi

if [[ -n ${GIT_ECLASS} ]]; then
	EGIT_REPO_URI="git://anongit.freedesktop.org/git/xorg/${MODULE}/${PN}"
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 shared dependencies
if [[ ${XORG_EAUTORECONF} != no ]]; then
	DEPEND+="
		>=sys-devel/libtool-2.2.6a
		sys-devel/m4"
	# This MUST BE STABLE
	if [[ ${PN} != util-macros ]] ; then
		DEPEND+=" >=x11-misc/util-macros-1.5.0"
		# Required even by xorg-server
		[[ ${PN} == "font-util" ]] || DEPEND+=" >=media-fonts/font-util-1.1.1-r1"
	fi
	WANT_AUTOCONF="latest"
	WANT_AUTOMAKE="latest"
fi

if [[ ${FONT} == yes ]]; then
	RDEPEND+=" media-fonts/encodings
		x11-apps/mkfontscale
		x11-apps/mkfontdir"
	PDEPEND+=" media-fonts/font-alias"

	# @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"

# Add static-libs useflag where usefull.
if [[ ${FONT} != yes \
		&& ${CATEGORY} != app-doc \
		&& ${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 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]"

# @FUNCTION: xorg-2_pkg_setup
# @USAGE:
# @DESCRIPTION:
# Setup prefix compat
xorg-2_pkg_setup() {
	[[ ${FONT} == yes ]] && font_pkg_setup
}

# @FUNCTION: xorg-2_src_unpack
# @USAGE:
# @DESCRIPTION:
# Simply unpack source code.
xorg-2_src_unpack() {
	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
# @USAGE:
# @DESCRIPTION:
# Apply all patches
xorg-2_patch_source() {
	# 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
	base_src_prepare
	epatch_user
}

# @FUNCTION: xorg-2_reconf_source
# @USAGE:
# @DESCRIPTION:
# Run eautoreconf if necessary, and run elibtoolize.
xorg-2_reconf_source() {
	case ${CHOST} in
		*-interix* | *-aix* | *-winnt*)
			# some hosts need full eautoreconf
			[[ -e "./configure.ac" ]] && eautoreconf || ewarn "Unable to autoreconf the configure script. Things may fail."
			;;
		*)
			# elibtoolize required for BSD
			[[ ${XORG_EAUTORECONF} != no && -e "./configure.ac" ]] && eautoreconf || elibtoolize
			;;
	esac
}

# @FUNCTION: xorg-2_src_prepare
# @USAGE:
# @DESCRIPTION:
# Prepare a package after unpacking, performing all X-related tasks.
xorg-2_src_prepare() {
	[[ -n ${GIT_ECLASS} ]] && git_src_prepare
	xorg-2_patch_source
	xorg-2_reconf_source
}

# @FUNCTION: xorg-2_font_configure
# @USAGE:
# @DESCRIPTION:
# If a font package, perform any necessary configuration steps
xorg-2_font_configure() {
	if has nls ${IUSE//+} && ! use nls; then
		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
}

# @FUNCTION: x-modular_flags_setup
# @USAGE:
# @DESCRIPTION:
# Set up CFLAGS for a debug build
xorg-2_flags_setup() {
	# Win32 require special define
	[[ ${CHOST} == *-winnt* ]] && append-cppflags -DWIN32 -D__STDC__
	# hardened ldflags
	[[ ${PN} = xorg-server || -n ${DRIVER} ]] && append-ldflags -Wl,-z,lazy
}

# @FUNCTION: xorg-2_src_configure
# @USAGE:
# @DESCRIPTION:
# Perform any necessary pre-configuration steps, then run configure
xorg-2_src_configure() {
	local myopts=""

	xorg-2_flags_setup
	[[ -n "${FONT}" ]] && xorg-2_font_configure

# @VARIABLE: CONFIGURE_OPTIONS
# @DESCRIPTION:
# Any options to pass to configure
	CONFIGURE_OPTIONS=${CONFIGURE_OPTIONS:=""}
	if [[ -x ${ECONF_SOURCE:-.}/configure ]]; then
		if has static-libs ${IUSE//+}; then
			myopts+=" $(use_enable static-libs static)"
		fi
		econf \
			${FONT_OPTIONS} \
			${CONFIGURE_OPTIONS} \
			${myopts}
	fi
}

# @FUNCTION: xorg-2_src_compile
# @USAGE:
# @DESCRIPTION:
# Compile a package, performing all X-related tasks.
xorg-2_src_compile() {
	base_src_compile
}

# @FUNCTION: xorg-2_src_install
# @USAGE:
# @DESCRIPTION:
# Install a built package to ${D}, performing any necessary steps.
# Creates a ChangeLog from git if using live ebuilds.
xorg-2_src_install() {
	if [[ ${CATEGORY} == x11-proto ]]; then
		emake \
			${PN/proto/}docdir=${EPREFIX}/usr/share/doc/${PF} \
			DESTDIR="${D}" \
			install || die "emake install failed"
	else
		emake \
			docdir=${EPREFIX}/usr/share/doc/${PF} \
			DESTDIR="${D}" \
			install || die "emake install failed"
	fi

	if [[ -n ${GIT_ECLASS} ]]; then
		pushd "${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}" > /dev/null
		git log ${GIT_TREE} > "${S}"/ChangeLog
		popd > /dev/null
	fi

	if [[ -e "${S}"/ChangeLog ]]; then
		dodoc "${S}"/ChangeLog
	fi
# @VARIABLE: DOCS
# @DESCRIPTION:
# Any documentation to install
	if [[ -n ${DOCS} ]]; then
		dodoc ${DOCS} || die "dodoc failed"
	fi

	# Don't install libtool archives for server modules
	if [[ -e "${D%/}${EPREFIX}/usr/$(get_libdir)/xorg/modules" ]]; then
		find "${D%/}${EPREFIX}/usr/$(get_libdir)/xorg/modules" -name '*.la' \
			-exec rm -f {} ';'
	fi

	[[ -n ${FONT} ]] && remove_font_metadata
}

# @FUNCTION: xorg-2_pkg_postinst
# @USAGE:
# @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() {
	[[ -n ${FONT} ]] && setup_fonts
}

# @FUNCTION: xorg-2_pkg_postrm
# @USAGE:
# @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() {
	if [[ -n ${FONT} ]]; then
		cleanup_fonts
		font_pkg_postrm
	fi
}

# @FUNCTION: cleanup_fonts
# @USAGE:
# @DESCRIPTION:
# Get rid of font directories that only contain generated files
cleanup_fonts() {
	local allowed_files="encodings.dir fonts.alias fonts.cache-1 fonts.dir fonts.scale"
	local real_dir=${EROOT}usr/share/fonts/${FONT_DIR}
	local fle allowed_file

	unset KEEP_FONTDIR

	einfo "Checking ${real_dir} for useless files"
	pushd ${real_dir} &> /dev/null
	for fle in *; do
		unset MATCH
		for allowed_file in ${allowed_files}; do
			if [[ ${fle} = ${allowed_file} ]]; then
				# If it's allowed, then move on to the next file
				MATCH="yes"
				break
			fi
		done
		# If we found a match in allowed files, move on to the next file
		[[ -n ${MATCH} ]] && continue
		# If we get this far, there wasn't a match in the allowed files
		KEEP_FONTDIR="yes"
		# We don't need to check more files if we're already keeping it
		break
	done
	popd &> /dev/null
	# If there are no files worth keeping, then get rid of the dir
	[[ -z "${KEEP_FONTDIR}" ]] && rm -rf ${real_dir}
}

# @FUNCTION: setup_fonts
# @USAGE:
# @DESCRIPTION:
# Generates needed files for fonts and fixes font permissions
setup_fonts() {
	create_fonts_scale
	create_fonts_dir
	font_pkg_postinst
}

# @FUNCTION: remove_font_metadata
# @USAGE:
# @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() {
	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
# @USAGE:
# @DESCRIPTION:
# Create fonts.scale file, used by the old server-side fonts subsystem.
create_fonts_scale() {
	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
# @USAGE:
# @DESCRIPTION:
# Create fonts.dir file, used by the old server-side fonts subsystem.
create_fonts_dir() {
	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 $?
}

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [gentoo-dev] [RFC] New eclass for x11 packages
  2010-03-10 14:13 ` Tomáš Chvátal
@ 2010-03-10 19:40   ` Dawid Węgliński
  2010-03-10 19:42     ` Tomáš Chvátal
  0 siblings, 1 reply; 21+ messages in thread
From: Dawid Węgliński @ 2010-03-10 19:40 UTC (permalink / raw
  To: gentoo-dev

On Wednesday 10 March 2010 15:13:40 Tomáš Chvátal wrote:
> As last step i fixed issue with circular dependencies.
> So please speak-up now because if no complains are sent, i will add this
> eclass in 5 hours into main tree.
> 
> For the eclass see attachment.
> 
> Tomas

5 hours? :o

-- 
Cheers
Dawid Węgliński



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [gentoo-dev] [RFC] New eclass for x11 packages
  2010-03-10 19:40   ` Dawid Węgliński
@ 2010-03-10 19:42     ` Tomáš Chvátal
  0 siblings, 0 replies; 21+ messages in thread
From: Tomáš Chvátal @ 2010-03-10 19:42 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 492 bytes --]

Dne 03/10/2010 08:40 PM, Dawid Węgliński napsal(a):
> On Wednesday 10 March 2010 15:13:40 Tomáš Chvátal wrote:
>> As last step i fixed issue with circular dependencies.
>> So please speak-up now because if no complains are sent, i will add this
>> eclass in 5 hours into main tree.
>>
>> For the eclass see attachment.
>>
>> Tomas
> 
> 5 hours? :o
> 
First mail was 18.2. So just asking if anything has something really
really urgent that might stop inclusion. :]

Tom


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2010-03-10 19:43 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-18 22:33 [gentoo-dev] [RFC] New eclass for x11 packages Tomáš Chvátal
2010-02-18 22:39 ` Jeremy Olexa
2010-02-18 23:04   ` Tomáš Chvátal
2010-02-18 23:06 ` Tomáš Chvátal
2010-02-18 23:11 ` David Leverton
2010-02-18 23:16   ` Tomáš Chvátal
2010-02-18 23:20     ` Tomáš Chvátal
2010-02-18 23:22     ` David Leverton
2010-02-19  1:22 ` [gentoo-dev] " Ryan Hill
2010-02-24 20:54   ` Tomáš Chvátal
2010-02-22 10:50 ` [gentoo-dev] " Michael Haubenwallner
2010-02-22 14:20   ` Tomáš Chvátal
2010-02-22 15:50     ` Michael Haubenwallner
2010-02-22 15:57       ` Tomáš Chvátal
2010-02-27 12:18         ` Tomáš Chvátal
2010-03-01  8:58           ` Michael Haubenwallner
2010-03-01 10:38             ` Samuli Suominen
2010-03-07 10:52               ` Rémi Cardona
2010-03-10 14:13 ` Tomáš Chvátal
2010-03-10 19:40   ` Dawid Węgliński
2010-03-10 19:42     ` Tomáš Chvátal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox