From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Lgzol-0006pr-Qw for garchives@archives.gentoo.org; Tue, 10 Mar 2009 11:08:16 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 69B42E024B; Tue, 10 Mar 2009 11:08:14 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id D6234E024B for ; Tue, 10 Mar 2009 11:08:13 +0000 (UTC) Received: from stork.gentoo.org (stork.gentoo.org [64.127.104.133]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id 35CB8647FD for ; Tue, 10 Mar 2009 11:08:12 +0000 (UTC) Received: from angelos by stork.gentoo.org with local (Exim 4.69) (envelope-from ) id 1Lgzoh-00040C-R3 for gentoo-commits@lists.gentoo.org; Tue, 10 Mar 2009 11:08:11 +0000 From: "Christoph Mende (angelos)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, angelos@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in eclass: xfce4.eclass X-VCS-Repository: gentoo-x86 X-VCS-Files: xfce4.eclass X-VCS-Directories: eclass X-VCS-Committer: angelos X-VCS-Committer-Name: Christoph Mende Content-Type: text/plain; charset=utf8 Message-Id: Sender: Christoph Mende Date: Tue, 10 Mar 2009 11:08:11 +0000 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 02136b84-ca87-4bad-882a-affab7108326 X-Archives-Hash: 4d3271a9787d51983f018fe52524eccf angelos 09/03/10 11:08:11 Modified: xfce4.eclass Log: Updated xfce4.eclass for xfce-4.6 Revision Changes Path 1.25 eclass/xfce4.eclass file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/xfce4.eclas= s?rev=3D1.25&view=3Dmarkup plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/xfce4.eclas= s?rev=3D1.25&content-type=3Dtext/plain diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/xfce4.eclas= s?r1=3D1.24&r2=3D1.25 Index: xfce4.eclass =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /var/cvsroot/gentoo-x86/eclass/xfce4.eclass,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- xfce4.eclass 30 May 2007 13:25:32 -0000 1.24 +++ xfce4.eclass 10 Mar 2009 11:08:11 -0000 1.25 @@ -1,98 +1,223 @@ -# Copyright 1999-2007 Gentoo Foundation +# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/xfce4.eclass,v 1.24 2007/05/30= 13:25:32 drac Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/xfce4.eclass,v 1.25 2009/03/10= 11:08:11 angelos Exp $ =20 -# DEPRECATED ECLASS. - -if [[ ${BZIPPED} =3D "1" ]];then - COMPRESS=3D".tar.bz2" - ZIP=3D"-bz2" -else - COMPRESS=3D".tar.gz" - ZIP=3D"" +# @ECLASS: xfce4.eclass +# @MAINTAINER: +# Gentoo's Xfce Team +# @BLURB: functions to simplify Xfce4 package installation +# @DESCRIPTION: +# This eclass provides functions to install Xfce4 packages with a +# minimum of duplication in ebuilds + +inherit fdo-mime gnome2-utils +[ -n ${XFCE4_PATCHES} ] && inherit eutils +if [ ${PV} =3D 9999 ]; then + inherit autotools + [ "${XFCE_VCS}" =3D "git" ] && inherit git || inherit subversion fi =20 -if [[ ${GOODIES_PLUGIN} =3D "1" ]]; then - [[ -z ${MY_P} ]] && MY_P=3D"${PN}-plugin-${PV}" - SRC_URI=3D"http://download.berlios.de/xfce-goodies/${MY_P}${COMPRESS}" - [[ -z ${HOMEPAGE} ]] && HOMEPAGE=3D"http://xfce-goodies.berlios.de/" - [[ -z ${XFCE_VERSION} ]] && XFCE_VERSION=3D"4.2.0" - RDEPEND=3D"${RDEPEND} >=3Dxfce-base/xfce4-panel-${XFCE_VERSION}" -fi +LICENSE=3D"GPL-2" +SLOT=3D"0" =20 -if [[ ${PLUGIN} =3D "1" ]]; then - MY_P=3D"${PN}-plugin-${PV}" - [[ -z ${XFCE_VERSION} ]] && XFCE_VERSION=3D"4.2.0" - RDEPEND=3D"${RDEPEND} >=3Dxfce-base/xfce4-panel-${XFCE_VERSION}" -fi +DEPEND=3D"${RDEPEND} + dev-util/pkgconfig" =20 -if [[ ${GOODIES} =3D "1" ]]; then - SRC_URI=3D"http://download.berlios.de/xfce-goodies/${MY_P:-${P}}${COMPR= ESS}" - [[ -z ${HOMEPAGE} ]] && HOMEPAGE=3D"http://xfce-goodies.berlios.de/" +[ ${PV} =3D 9999 -a -z "${XFCE_VERSION}" ] && XFCE_VERSION=3D"4.5.99" +[ -z ${XFCE_VERSION} ] && XFCE_VERSION=3D${PV} +[ -z ${THUNAR_VERSION} ] && THUNAR_VERSION=3D"0.9" + +if [ ${PV} =3D 9999 ]; then + [ -n "${WANT_GTKDOCIZE}" ] && DEPEND+=3D" dev-util/gtk-doc" + [ ${PN} !=3D xfce4-dev-tools ] && DEPEND+=3D" + >=3Ddev-util/xfce4-dev-tools-${XFCE_VERSION}" + [ "${XFCE_VCS}" =3D "git" ] && \ + EGIT_REPO_URI=3D"git://git.xfce.org/${XFCE_CAT}/${MY_PN:-${PN}}" fi =20 -[[ -n ${SRC_URI} ]] \ - || SRC_URI=3D"http://www.xfce.org/archive/xfce-${PV}/src${ZIP}/${P}${CO= MPRESS}" - -[[ ${XFCE_META} =3D "1" ]] \ - && SRC_URI=3D"" +[ -z ${MY_P} ] && MY_P=3D${MY_PN:-${PN}}-${MY_PV:-${PV}} +S=3D"${WORKDIR}/${MY_P}" =20 -[[ -z ${LICENSE} ]] \ - && LICENSE=3D"GPL-2" +# @ECLASS-VARIABLE: COMPRESS +# @DESCRIPTION: +# Define the file extensions for SRC_URI, defaults to .tar.bz2 +COMPRESS=3D".tar.bz2" + +# @FUNCTION: xfce4_gzipped +# @DESCRIPTION: +# Use .tar.gz instead of .tar.bz2 in SRC_URI +xfce4_gzipped() { + COMPRESS=3D".tar.gz" +} =20 -[[ -z ${HOMEPAGE} ]] \ - && HOMEPAGE=3D"http://www.xfce.org/" +# @FUNCTION: xfce4_plugin +# @DESCRIPTION: +# Append -plugin to the package name +xfce4_plugin() { + MY_PN=3D"${MY_PN:-${PN}}-plugin" + MY_P=3D"${MY_PN}-${MY_PV:-${PV}}" + S=3D"${WORKDIR}/${MY_P}" +} =20 -SLOT=3D"0" -IUSE=3D"debug doc" +# @FUNCTION: xfce4_goodies +# @DESCRIPTION: +# Change SRC_URI (or E{SVN,GIT}_REPO_URI for live ebuilds) to the goodie= s path +# and set HOMEPAGE to goodies.xfce.org +# Note: git ebuilds usually require XFCE_CAT (for example kelnos for +# xfce4-notifyd) +xfce4_goodies() { + if [ ${PV} =3D 9999 ]; then + ESVN_REPO_URI=3D"http://svn.xfce.org/svn/goodies/${MY_PN:-${PN}}/trunk= " + else + SRC_URI=3D"http://goodies.xfce.org/releases/${MY_PN:-${PN}}/${MY_P}${C= OMPRESS}" + fi + HOMEPAGE=3D"http://goodies.xfce.org/" +} =20 -RDEPEND=3D">=3Dx11-libs/gtk+-2.2 - dev-libs/libxml2 - x11-libs/startup-notification - >=3Ddev-libs/dbh-1.0.20 - >=3Dx11-themes/gtk-engines-xfce-2.2.5 - ${RDEPEND}" -DEPEND=3D"${RDEPEND} - dev-util/pkgconfig" +# @FUNCTION: xfce4_panel_plugin +# @DESCRIPTION: +# Call xfce4_plugin and xfce4_goodies and RDEPEND on xfce4-panel and set +# HOMEPAGE to the panel plugins homepage +xfce4_panel_plugin() { + xfce4_plugin + xfce4_goodies + HOMEPAGE=3D"http://goodies.xfce.org/projects/panel-plugins/${MY_PN}" + RDEPEND=3D"${DEPEND} >=3Dxfce-base/xfce4-panel-${XFCE_VERSION}" +} =20 -[[ -z ${XFCE_S} ]] \ - && S=3D"${WORKDIR}/${MY_P:-${P}}" \ - || S=3D"${XFCE_S}" +# @FUNCTION: xfce4_thunar_plugin +# @DESCRIPTION: +# Call xfce4_plugin and xfce4_goodies, RDEPEND on thunar and set +# HOMEPAGE to the thunar plugins homepage +xfce4_thunar_plugin() { + xfce4_plugin + xfce4_goodies + HOMEPAGE=3D"http://thunar.xfce.org/pwiki/projects/${MY_PN}" + RDEPEND=3D"${RDEPEND} >=3Dxfce-base/thunar-${THUNAR_VERSION}" +} =20 -xfce4_src_compile() { - if [[ "${DEBUG_OFF}" =3D "1" ]] && use debug; then - XFCE_CONFIG=3D"${XFCE_CONFIG}" - elif use debug; then - XFCE_CONFIG=3D"${XFCE_CONFIG} --enable-debug=3Dyes" +# @FUNCTION: xfce4_core +# @DESCRIPTION: +# Change SRC_URI (or ESVN_REPO_URI for live ebuilds) to the main Xfce pa= th and +# set the HOMEPAGE to www.xfce.org +xfce4_core() { + if [ ${PV} =3D 9999 ]; then + ESVN_REPO_URI=3D"http://svn.xfce.org/svn/xfce/${MY_PN:-${PN}}/trunk" + else + SRC_URI=3D"mirror://xfce/xfce-${XFCE_VERSION}/src/${MY_P}${COMPRESS}" fi + HOMEPAGE=3D"http://www.xfce.org/" +} =20 - if [[ ${XFCE_META} =3D "1" ]]; then - einfo "Meta Build, Nothing to compile." - else - econf ${XFCE_CONFIG} || die +# @FUNCTION: xfce4_single_male +# @DESCRIPTION: +# Build with one job for broken parallel builds +xfce4_single_make() { + JOBS=3D"-j1" +} =20 - if [[ "${SINGLE_MAKE}" =3D "1" ]]; then - emake -j1 || die +# @FUNCTION: xfce4_src_unpack +# @DESCRIPTION: +# Only used for live ebuilds. Patch autogen.sh to inject the correct rev= ision +# into configure.ac +xfce4_src_unpack() { + if [ ${PV} =3D 9999 ]; then + local revision + XFCE_CONFIG+=3D" --enable-maintainer-mode" + if [ "${XFCE_VCS}" =3D "git" ]; then + git_src_unpack + revision=3D$(git show --pretty=3Dformat:%ci | head -n 1 | \ + awk '{ gsub("-", "", $1); print $1"-"; }') + revision+=3D$(git rev-parse HEAD | cut -c1-8) else - emake || die + subversion_src_unpack + subversion_wc_info + revision=3D${ESVN_WC_REVISION} + fi + local linguas + [ -d po ] && linguas=3D"$(sed -e '/^#/d' po/LINGUAS)" + [ -n "${XFCE4_PATCHES}" ] && epatch ${XFCE4_PATCHES} + if [ -f configure.??.in ]; then + [ -f configure.ac.in ] && configure=3Dconfigure.ac.in + [ -f configure.in.in ] && configure=3Dconfigure.in.in + [ -n "${linguas}" ] && sed -i -e "s/@LINGUAS@/${linguas}/g" ${configu= re} + sed -i -e "s/@REVISION@/${revision}/g" ${configure} + cp ${configure} ${configure/.in} + fi + if [ -f configure.?? ]; then + [ -f configure.ac ] && configure=3Dconfigure.ac + [ -f configure.in ] && configure=3Dconfigure.in + [ ${PN} !=3D xfce4-dev-tools ] && AT_M4DIR=3D"/usr/share/xfce4/dev-to= ols/m4macros" + [ -n "${WANT_GTKDOCIZE}" ] && gtkdocize --copy + if [ -d po ]; then + grep -Eqs "^(AC|IT)_PROG_INTLTOOL" ${configure} \ + && intltoolize --automake --copy --force \ + || glib-gettextize --copy --force >/dev/null + fi + eautoreconf fi + else + unpack ${A} fi } =20 +# @FUNCTION: xfce4_src_configure +# @DESCRIPTION: +# Package configuration +# XFCE_CONFIG is used for additional econf/autogen.sh arguments +# startup-notification and debug are automatically added when they are f= ound in +# IUSE +xfce4_src_configure() { + has startup-notification ${IUSE} && \ + XFCE_CONFIG+=3D" $(use_enable startup-notification)" + + has debug ${IUSE} && XFCE_CONFIG+=3D" $(use_enable debug)" + + econf ${XFCE_CONFIG} +} + +# @FUNCTION: xfce4_src_compile +# @DESCRIPTION: +# Package compilation +# Calls xfce4_src_configure for EAPI <=3D 1 and runs emake with ${JOBS} +xfce4_src_compile() { + [ "${EAPI}" -le 1 ] && xfce4_src_configure + emake ${JOBS} || die "emake failed" +} + +# @FUNCTION: xfce4_src_install +# @DESCRIPTION: +# Package installation +# The content of $DOCS is installed via dodoc xfce4_src_install() { - if [[ ${XFCE_META} =3D "1" ]]; then - einfo "Meta Build, Nothing to install." - else - if [[ "${WANT_EINSTALL}" =3D "1" ]]; then - einstall || die - else - make DESTDIR=3D${D} install || die - fi + [ -n "${DOCS}" ] && dodoc ${DOCS} =20 - if use doc; then - dodoc ${XFCE_DOCS} AUTHORS INSTALL README COPYING ChangeLog HACKING N= EWS THANKS TODO - fi - fi + emake DESTDIR=3D"${D}" install || die "emake install failed" +} + +# @FUNCTION: xfce4_pkg_preinst +# @DESCRIPTION: +# Run gnome2_icon_savelist for the following gnome2_icon_cache_update +xfce4_pkg_preinst() { + gnome2_icon_savelist +} + +# @FUNCTION: xfce4_pkg_postinst +# @DESCRIPTION: +# Run fdo-mime_{desktop,mime}_database_update and gnome2_icon_cache_upda= te +xfce4_pkg_postinst() { + fdo-mime_desktop_database_update + fdo-mime_mime_database_update + gnome2_icon_cache_update +} + +# @FUNCTION: xfce4_pkg_postrm +# @DESCRIPTION: +# Run fdo-mime_{desktop,mime}_database_update and gnome2_icon_cache_upda= te +xfce4_pkg_postrm() { + fdo-mime_desktop_database_update + fdo-mime_mime_database_update + gnome2_icon_cache_update } =20 -EXPORT_FUNCTIONS src_compile src_install +EXPORT_FUNCTIONS src_unpack src_configure src_compile src_install pkg_pr= einst pkg_postinst pkg_postrm