[gentoo-commits] proj/gnome:master commit in: eclass/

2022-08-16 Thread Matt Turner
commit: 90fadbe11f150e205bae326406f4f9552eb34203
Author: Matt Turner  gentoo  org>
AuthorDate: Tue Aug 16 14:14:20 2022 +
Commit: Matt Turner  gentoo  org>
CommitDate: Tue Aug 16 14:14:20 2022 +
URL:https://gitweb.gentoo.org/proj/gnome.git/commit/?id=90fadbe1

gnome-meson.eclass: Remove

Signed-off-by: Matt Turner  gentoo.org>

 eclass/gnome-meson.eclass | 161 --
 1 file changed, 161 deletions(-)

diff --git a/eclass/gnome-meson.eclass b/eclass/gnome-meson.eclass
deleted file mode 100644
index cd322b13..
--- a/eclass/gnome-meson.eclass
+++ /dev/null
@@ -1,161 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# @ECLASS: gnome-meson.eclass
-# @MAINTAINER:
-# gn...@gentoo.org
-# @BLURB: Provides phases for Gnome/Gtk+ based packages that use meosn.
-# @DESCRIPTION:
-# Exports portage base functions used by ebuilds written for packages using the
-# GNOME framework and meson. For additional functions, see gnome2-utils.eclass.
-
-inherit eutils gnome.org gnome2-utils meson xdg
-
-case "${EAPI:-0}" in
-   6)
-   EXPORT_FUNCTIONS src_prepare src_configure src_compile 
src_install pkg_preinst pkg_postinst pkg_postrm
-   ;;
-   *) die "EAPI=${EAPI} is not supported" ;;
-esac
-
-# @ECLASS-VARIABLE: GNOME-MESON_ECLASS_GIO_MODULES
-# @INTERNAL
-# @DESCRIPTION:
-# Array containing glib GIO modules
-
-# @FUNCTION: gnome-meson_src_prepare
-# @DESCRIPTION:
-# Prepare environment for build, fix build of scrollkeeper documentation,
-# run elibtoolize.
-gnome-meson_src_prepare() {
-   # FIXME add gtk-doc stuff if needed
-   xdg_src_prepare
-
-   # Prevent assorted access violations and test failures
-   gnome2_environment_reset
-}
-
-# @FUNCTION: gnome-meson_src_configure
-# @DESCRIPTION:
-# Gnome specific configure handling
-gnome-meson_src_configure() {
-   # Avoid sandbox violations caused by gnome-vfs (bug #128289 and #345659)
-   addpredict "$(unset  HOME; echo ~)/.gnome2"
-   
-   #FIXME are these valid/needed
-   #   "-Dgtk-doc=no"
-   #   "-Dmaintainer-mode=no"
-   #   "-Dschemas-install=no"
-   #   "-Dupdate-mimedb=no"
-   #   "-Dcompile-warnings=minimum"
-   local emesonargs=(
-   "$@"
-   )
-   
-   meson_src_configure
-}
-
-# @FUNCTION: gnome-meson_src_compile
-# @DESCRIPTION:
-# Only default src_compile for now
-gnome-meson_src_compile() {
-   meson_src_compile
-}
-
-# @FUNCTION: gnome-meson_src_install
-# @DESCRIPTION:
-# Gnome specific install. Handles typical GConf and scrollkeeper setup
-# in packages and removal of .la files if requested
-gnome-meson_src_install() {
-   # install docs
-   default
-   
-   # files that are really common in gnome packages (bug #573390)
-   local d
-   for d in HACKING MAINTAINERS; do
-   [[ -s "${d}" ]] && dodoc "${d}"
-   done
-   
-   # Make sure this one doesn't get in the portage db
-   rm -fr "${ED}/usr/share/applications/mimeinfo.cache"
-
-   # Delete all .la files
-   case "${GNOME2_LA_PUNT}" in
-   yes)prune_libtool_files --modules;;
-   no) ;;
-   *)  prune_libtool_files;;
-   esac
-   
-   meson_src_install
-}
-
-# @FUNCTION: gnome-meson_pkg_preinst
-# @DESCRIPTION:
-# Finds Icons, GConf and GSettings schemas for later handling in pkg_postinst
-gnome-meson_pkg_preinst() {
-   xdg_pkg_preinst
-   gnome2_gconf_savelist
-   gnome2_icon_savelist
-   gnome2_schemas_savelist
-   gnome2_scrollkeeper_savelist
-   gnome2_gdk_pixbuf_savelist
-
-   local f
-
-   GNOME2_ECLASS_GIO_MODULES=()
-   while IFS= read -r -d '' f; do
-   GNOME2_ECLASS_GIO_MODULES+=( ${f} )
-   done < <(cd "${D}" && find usr/$(get_libdir)/gio/modules -type f 
-print0 2>/dev/null)
-
-   export GNOME2_ECLASS_GIO_MODULES
-}
-
-# @FUNCTION: gnome-meson_pkg_postinst
-# @DESCRIPTION:
-# Handle scrollkeeper, GConf, GSettings, Icons, desktop and mime
-# database updates.
-gnome-meson_pkg_postinst() {
-   xdg_pkg_postinst
-   gnome2_gconf_install
-   if [[ -n ${GNOME2_ECLASS_ICONS} ]]; then
-   gnome2_icon_cache_update
-   fi
-   if [[ -n ${GNOME2_ECLASS_GLIB_SCHEMAS} ]]; then
-   gnome2_schemas_update
-   fi
-   gnome2_scrollkeeper_update
-   gnome2_gdk_pixbuf_update
-
-   if [[ ${#GNOME2_ECLASS_GIO_MODULES[@]} -gt 0 ]]; then
-   gnome2_giomodule_cache_update
-   fi
-   
-   # This should only be in the overlay
-   ewarn "**"
-   ewarn "This is the *experimental* Gentoo GNOME Overlay"
-   ewarn "Please report bugs at #gentoo-desktop @ FreeNode"
-   ewarn "Do NOT go to upstream with bugs without 

[gentoo-commits] proj/gnome:master commit in: eclass/

2021-01-30 Thread Mart Raudsepp
commit: 84a2c5b69f7447c8f5cb3001c6549420764d10ea
Author: Mart Raudsepp  gentoo  org>
AuthorDate: Sat Jan 30 19:58:28 2021 +
Commit: Mart Raudsepp  gentoo  org>
CommitDate: Sat Jan 30 20:02:41 2021 +
URL:https://gitweb.gentoo.org/proj/gnome.git/commit/?id=84a2c5b6

eclass: Drop various unnecessary or redundant main tree copies

Signed-off-by: Mart Raudsepp  gentoo.org>

 eclass/gnome2-python.eclass |  53 -
 eclass/gnome2-utils.eclass  | 522 
 eclass/multibuild.eclass| 282 
 3 files changed, 857 deletions(-)

diff --git a/eclass/gnome2-python.eclass b/eclass/gnome2-python.eclass
deleted file mode 100644
index a16e931e..
--- a/eclass/gnome2-python.eclass
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# @ECLASS: gnome2-python.eclass
-# @MAINTAINER:
-# Gentoo GNOME Project 
-# Gentoo Python Project 
-# @BLURB: Eclass for GNOME Python packages supporting installation for 
multiple Python ABIs
-# @DESCRIPTION:
-# The gnome2-python eclass defines phase functions for GNOME Python packages 
supporting
-# installation for multiple Python ABIs.
-
-inherit gnome2 python
-
-# Stolen from git.eclass
-EXPORTED_FUNCTIONS="pkg_setup src_compile src_test src_install"
-case "${EAPI:-0}" in
-2|3|4) EXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS} src_prepare 
src_configure" ;;
-   0|1) ;;
-   *) die "Unknown EAPI, bug eclass maintainers." ;;
-esac
-
-EXPORT_FUNCTIONS ${EXPORTED_FUNCTIONS}
-
-gnome2-python_pkg_setup() {
-   python_pkg_setup
-}
-
-gnome2-python_src_prepare() {
-   gnome2_src_prepare
-   python_clean_py-compile_files
-   python_copy_sources
-}
-
-gnome2-python_src_configure() {
-   configure() {
-   gnome2_src_configure PYTHON=$(PYTHON -a) "$@"
-   }
-   python_execute_function -s configure
-}
-
-gnome2-python_src_compile() {
-   python_execute_function -s gnome2_src_compile "$@"
-}
-
-gnome2-python_src_test() {
-   python_execute_function -s -d
-}
-
-gnome2-python_src_install() {
-   python_execute_function -s gnome2_src_install
-   python_clean_installation_image
-}

diff --git a/eclass/gnome2-utils.eclass b/eclass/gnome2-utils.eclass
deleted file mode 100644
index 9b4296c1..
--- a/eclass/gnome2-utils.eclass
+++ /dev/null
@@ -1,522 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# @ECLASS: gnome2-utils.eclass
-# @MAINTAINER:
-# gn...@gentoo.org
-# @BLURB: Auxiliary functions commonly used by Gnome packages.
-# @DESCRIPTION:
-# This eclass provides a set of auxiliary functions needed by most Gnome
-# packages. It may be used by non-Gnome packages as needed for handling various
-# Gnome stack related functions such as:
-#  * Gtk+ icon cache management
-#  * GSettings schemas management
-#  * GConf schemas management
-#  * scrollkeeper (old Gnome help system) management
-
-[[ ${EAPI:-0} == [012345] ]] && inherit multilib
-inherit eutils xdg-utils
-
-case "${EAPI:-0}" in
-   0|1|2|3|4|5|6) ;;
-   *) die "EAPI=${EAPI} is not supported" ;;
-esac
-
-# @ECLASS-VARIABLE: GCONFTOOL_BIN
-# @INTERNAL
-# @DESCRIPTION:
-# Path to gconftool-2
-: ${GCONFTOOL_BIN:="/usr/bin/gconftool-2"}
-
-# @ECLASS-VARIABLE: SCROLLKEEPER_DIR
-# @INTERNAL
-# @DESCRIPTION:
-# Directory where scrollkeeper-update should do its work
-: ${SCROLLKEEPER_DIR:="/var/lib/scrollkeeper"}
-
-# @ECLASS-VARIABLE: SCROLLKEEPER_UPDATE_BIN
-# @INTERNAL
-# @DESCRIPTION:
-# Path to scrollkeeper-update
-: ${SCROLLKEEPER_UPDATE_BIN:="/usr/bin/scrollkeeper-update"}
-
-# @ECLASS-VARIABLE: GTK_UPDATE_ICON_CACHE
-# @INTERNAL
-# @DESCRIPTION:
-# Path to gtk-update-icon-cache
-: ${GTK_UPDATE_ICON_CACHE:="/usr/bin/gtk-update-icon-cache"}
-
-# @ECLASS-VARIABLE: GLIB_COMPILE_SCHEMAS
-# @INTERNAL
-# @DESCRIPTION:
-# Path to glib-compile-schemas
-: ${GLIB_COMPILE_SCHEMAS:="/usr/bin/glib-compile-schemas"}
-
-# @ECLASS-VARIABLE: GNOME2_ECLASS_SCHEMAS
-# @INTERNAL
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# List of GConf schemas provided by the package
-
-# @ECLASS-VARIABLE: GNOME2_ECLASS_ICONS
-# @INTERNAL
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# List of icons provided by the package
-
-# @ECLASS-VARIABLE: GNOME2_ECLASS_SCROLLS
-# @INTERNAL
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# List of scrolls (documentation files) provided by the package
-
-# @ECLASS-VARIABLE: GNOME2_ECLASS_GLIB_SCHEMAS
-# @INTERNAL
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# List of GSettings schemas provided by the package
-
-# @ECLASS-VARIABLE: GNOME2_ECLASS_GDK_PIXBUF_LOADERS
-# @INTERNAL
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# List of gdk-pixbuf loaders provided by the package
-
-DEPEND=">=sys-apps/sed-4"
-
-
-# @FUNCTION: gnome2_environment_reset
-# @DESCRIPTION:
-# Reset various variables inherited from root's evironment to a reasonable
-# default for ebuilds to help 

[gentoo-commits] proj/gnome:master commit in: eclass/

2021-01-30 Thread Mart Raudsepp
commit: 9a3e97683af38a7b9242a3a66e13a88cfbd8ac46
Author: Mart Raudsepp  gentoo  org>
AuthorDate: Sat Jan 30 20:00:25 2021 +
Commit: Mart Raudsepp  gentoo  org>
CommitDate: Sat Jan 30 20:02:41 2021 +
URL:https://gitweb.gentoo.org/proj/gnome.git/commit/?id=9a3e9768

gnome2.eclass: sync with main repository

Just a copy with the ewarn about experimental overlay kept for now

Signed-off-by: Mart Raudsepp  gentoo.org>

 eclass/gnome2.eclass | 104 ---
 1 file changed, 33 insertions(+), 71 deletions(-)

diff --git a/eclass/gnome2.eclass b/eclass/gnome2.eclass
index 2cc54393..3d745c01 100644
--- a/eclass/gnome2.eclass
+++ b/eclass/gnome2.eclass
@@ -1,9 +1,10 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: gnome2.eclass
 # @MAINTAINER:
 # gn...@gentoo.org
+# @SUPPORTED_EAPIS: 5 6 7
 # @BLURB: Provides phases for Gnome/Gtk+ based packages.
 # @DESCRIPTION:
 # Exports portage base functions used by ebuilds written for packages using the
@@ -16,25 +17,19 @@
 GNOME2_EAUTORECONF=${GNOME2_EAUTORECONF:-""}
 
 [[ ${GNOME2_EAUTORECONF} == 'yes' ]] && inherit autotools
-inherit eutils libtool gnome.org gnome2-utils xdg
+[[ ${EAPI} == [56] ]] && inherit eutils ltprune
+inherit libtool gnome.org gnome2-utils xdg
 
-case "${EAPI:-0}" in
-   4|5)
+case ${EAPI:-0} in
+   5)
EXPORT_FUNCTIONS src_unpack src_prepare src_configure 
src_compile src_install pkg_preinst pkg_postinst pkg_postrm
;;
-   6)
+   6|7)
EXPORT_FUNCTIONS src_prepare src_configure src_compile 
src_install pkg_preinst pkg_postinst pkg_postrm
;;
*) die "EAPI=${EAPI} is not supported" ;;
 esac
 
-# @ECLASS-VARIABLE: DOCS
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# String containing documents passed to dodoc command for eapi4.
-# In eapi5 we rely on einstalldocs (from eutils.eclass) and for newer EAPIs we
-# follow PMS spec.
-
 # @ECLASS-VARIABLE: ELTCONF
 # @DEFAULT_UNSET
 # @DESCRIPTION:
@@ -47,7 +42,7 @@ ELTCONF=${ELTCONF:-""}
 # Extra configure opts passed to econf.
 # Deprecated, pass extra arguments to gnome2_src_configure.
 # Banned in eapi6 and newer.
-if has ${EAPI:-0} 4 5; then
+if has ${EAPI} 5; then
G2CONF=${G2CONF:-""}
 fi
 
@@ -63,7 +58,7 @@ fi
 #
 # Banned since eapi6 as upstream is moving away from this obsolete macro in 
favor
 # of autoconf-archive macros, that do not expose this issue (bug #270919)
-if has ${EAPI:-0} 4 5; then
+if has ${EAPI} 5; then
if [[ ${GCONF_DEBUG} != "no" ]]; then
IUSE="debug"
fi
@@ -76,27 +71,22 @@ fi
 
 # @ECLASS-VARIABLE: GNOME2_LA_PUNT
 # @DESCRIPTION:
-# For eapi4 it sets if we should delete ALL or none of the .la files
-# For eapi5 and newer it relies on prune_libtool_files (from eutils.eclass)
-# for this. Available values for GNOME2_LA_PUNT:
+# In EAPIs 5 and 6, it relies on prune_libtool_files (from ltprune.eclass) for
+# this. Later EAPIs use find ... -delete. Available values for GNOME2_LA_PUNT:
 # - "no": will not clean any .la files
 # - "yes": will run prune_libtool_files --modules
 # - If it is not set, it will run prune_libtool_files
-if has ${EAPI:-0} 4; then
-   GNOME2_LA_PUNT=${GNOME2_LA_PUNT:-"no"}
-else
-   GNOME2_LA_PUNT=${GNOME2_LA_PUNT:-""}
-fi
+GNOME2_LA_PUNT=${GNOME2_LA_PUNT:-""}
 
 # @FUNCTION: gnome2_src_unpack
 # @DESCRIPTION:
 # Stub function for old EAPI.
 gnome2_src_unpack() {
-   if has ${EAPI:-0} 4 5; then
+   if has ${EAPI} 5; then
unpack ${A}
cd "${S}"
else
-   die "gnome2_src_unpack is banned from eapi6"
+   die "gnome2_src_unpack is banned since eapi6"
fi
 }
 
@@ -114,7 +104,7 @@ gnome2_src_prepare() {
# We stop to run it from eapi6 as scrollkeeper helpers from
# rarian are not running anything and, then, access violations
# shouldn't occur.
-   has ${EAPI:-0} 4 5 && gnome2_omf_fix
+   has ${EAPI} 5 && gnome2_omf_fix
 
# Disable all deprecation warnings
gnome2_disable_deprecation_warning
@@ -134,7 +124,7 @@ gnome2_src_prepare() {
 gnome2_src_configure() {
# Deprecated for a long time now and banned since eapi6, see Gnome team 
policies
if [[ -n ${G2CONF} ]] ; then
-   if has ${EAPI:-0} 4 5; then
+   if has ${EAPI} 5; then
eqawarn "G2CONF set, please review documentation at 
https://wiki.gentoo.org/wiki/Project:GNOME/Gnome_Team_Ebuild_Policies#G2CONF_and_src_configure;
else
die "G2CONF set, please review documentation at 
https://wiki.gentoo.org/wiki/Project:GNOME/Gnome_Team_Ebuild_Policies#G2CONF_and_src_configure;
@@ -143,7 +133,7 @@ gnome2_src_configure() {
 
local g2conf=()
 
-   if has ${EAPI:-0} 4 5; then
+   if has 

[gentoo-commits] proj/gnome:master commit in: eclass/

2019-02-24 Thread Mart Raudsepp
commit: 0c5ffc8bc9d1816b6a6880e112a664faddcd3cce
Author: Mart Raudsepp  gentoo  org>
AuthorDate: Sun Feb 24 08:39:57 2019 +
Commit: Mart Raudsepp  gentoo  org>
CommitDate: Sun Feb 24 08:39:57 2019 +
URL:https://gitweb.gentoo.org/proj/gnome.git/commit/?id=0c5ffc8b

gnome2-live.eclass: Update repo URI to gitlab

Closes: https://bugs.gentoo.org/678106
Signed-off-by: Mart Raudsepp  gentoo.org>

 eclass/gnome2-live.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/gnome2-live.eclass b/eclass/gnome2-live.eclass
index 4140e27c..80a72852 100644
--- a/eclass/gnome2-live.eclass
+++ b/eclass/gnome2-live.eclass
@@ -50,7 +50,7 @@ ELTCONF=${ELTCONF:-}
 # @ECLASS-VARIABLE: EGIT_REPO_URI
 # @DESCRIPTION:
 # git URI for the project, uses GNOME_LIVE_MODULE by default
-: "${EGIT_REPO_URI:="git://git.gnome.org/${GNOME_LIVE_MODULE}"}"
+: "${EGIT_REPO_URI:="https://gitlab.gnome.org/GNOME/${GNOME_LIVE_MODULE}.git"};
 
 # @ECLASS-VARIABLE: PATCHES
 # @DESCRIPTION:



[gentoo-commits] proj/gnome:master commit in: eclass/

2019-02-23 Thread Mart Raudsepp
commit: d11d461899b51fd681deac780ff7d50b0f636e69
Author: Mart Raudsepp  gentoo  org>
AuthorDate: Sat Feb 23 20:10:47 2019 +
Commit: Mart Raudsepp  gentoo  org>
CommitDate: Sat Feb 23 20:10:47 2019 +
URL:https://gitweb.gentoo.org/proj/gnome.git/commit/?id=d11d4618

vala.eclass: remove outdated eclass

Main tree version supports newer than 0.36 vala too, plus other
changes needed for supporting 0.40+ vala.

Signed-off-by: Mart Raudsepp  gentoo.org>

 eclass/vala.eclass | 148 -
 1 file changed, 148 deletions(-)

diff --git a/eclass/vala.eclass b/eclass/vala.eclass
deleted file mode 100644
index f8c4319c..
--- a/eclass/vala.eclass
+++ /dev/null
@@ -1,148 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# @ECLASS: vala.eclass
-# @MAINTAINER:
-# gn...@gentoo.org
-# @AUTHOR:
-# Alexandre Rostovtsev 
-# @BLURB: Sets up the environment for using a specific version of vala.
-# @DESCRIPTION:
-# This eclass sets up commonly used environment variables for using a specific
-# version of dev-lang/vala to configure and build a package. It is needed for
-# packages whose build systems assume the existence of certain unversioned vala
-# executables, pkgconfig files, etc., which Gentoo does not provide.
-#
-# This eclass provides one phase function: src_prepare.
-
-inherit eutils multilib
-
-case "${EAPI:-0}" in
-   0)  die "EAPI=0 is not supported" ;;
-   1)  ;;
-   *)  EXPORT_FUNCTIONS src_prepare ;;
-esac
-
-# @ECLASS-VARIABLE: VALA_MIN_API_VERSION
-# @DESCRIPTION:
-# Minimum vala API version (e.g. 0.32).
-VALA_MIN_API_VERSION=${VALA_MIN_API_VERSION:-0.32}
-
-# @ECLASS-VARIABLE: VALA_MAX_API_VERSION
-# @DESCRIPTION:
-# Maximum vala API version (e.g. 0.32).
-VALA_MAX_API_VERSION=${VALA_MAX_API_VERSION:-0.38}
-
-# @ECLASS-VARIABLE: VALA_USE_DEPEND
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# USE dependencies that vala must be built with (e.g. vapigen).
-
-# @FUNCTION: vala_api_versions
-# @DESCRIPTION:
-# Outputs a list of vala API versions from VALA_MAX_API_VERSION down to
-# VALA_MIN_API_VERSION.
-vala_api_versions() {
-   [[ ${VALA_MIN_API_VERSION} =~ ^0\.[[:digit:]]+$ ]] || die "Invalid 
syntax of VALA_MIN_API_VERSION"
-   [[ ${VALA_MAX_API_VERSION} =~ ^0\.[[:digit:]]+$ ]] || die "Invalid 
syntax of VALA_MAX_API_VERSION"
-
-   local minimal_supported_minor_version minor_version
-
-   # Dependency atoms are not generated for Vala versions older than 
0.${minimal_supported_minor_version}.
-   minimal_supported_minor_version="32"
-
-   for ((minor_version = ${VALA_MAX_API_VERSION#*.}; minor_version >= 
${VALA_MIN_API_VERSION#*.}; minor_version = minor_version - 2)); do
-   if ((minor_version >= minimal_supported_minor_version)); then
-   echo "0.${minor_version}"
-   fi
-   done
-}
-
-# @FUNCTION: vala_depend
-# @DESCRIPTION:
-# Outputs a ||-dependency string on vala from VALA_MAX_API_VERSION down to
-# VALA_MIN_API_VERSION
-vala_depend() {
-   local u v versions=$(vala_api_versions)
-   [[ ${VALA_USE_DEPEND} ]] && u="[${VALA_USE_DEPEND}(+)]"
-
-   echo -n "|| ("
-   for v in ${versions}; do
-   echo -n " dev-lang/vala:${v}${u}"
-   done
-   echo " )"
-}
-
-# @FUNCTION: vala_best_api_version
-# @DESCRIPTION:
-# Returns the highest installed vala API version satisfying
-# VALA_MAX_API_VERSION, VALA_MIN_API_VERSION, and VALA_USE_DEPEND.
-vala_best_api_version() {
-   local u v
-   [[ ${VALA_USE_DEPEND} ]] && u="[${VALA_USE_DEPEND}(+)]"
-   for v in $(vala_api_versions); do
-   has_version "dev-lang/vala:${v}${u}" && echo "${v}" && return
-   done
-}
-
-# @FUNCTION: vala_src_prepare
-# @USAGE: [--ignore-use] [--vala-api-version api_version]
-# @DESCRIPTION:
-# Sets up the environment variables and pkgconfig files for the
-# specified API version, or, if no version is specified, for the
-# highest installed vala API version satisfying
-# VALA_MAX_API_VERSION, VALA_MIN_API_VERSION, and VALA_USE_DEPEND.
-# Is a no-op if called without --ignore-use when USE=-vala.
-# Dies if the USE check is passed (or ignored) and a suitable vala
-# version is not available.
-vala_src_prepare() {
-   local p d valafoo version ignore_use
-
-   while [[ $1 ]]; do
-   case $1 in
-   "--ignore-use" )
-   ignore_use=1 ;;
-   "--vala-api-version" )
-   shift
-   version=$1
-   [[ ${version} ]] || die "'--vala-api-version' 
option requires API version parameter."
-   esac
-   shift
-   done
-
-   if [[ -z ${ignore_use} ]]; then
-   in_iuse vala && ! use vala && return 0
-   fi
-
-   if [[ ${version} ]]; then
-   

[gentoo-commits] proj/gnome:master commit in: eclass/

2018-02-16 Thread Sobhan Mohammadpour
commit: 41c5d038737efab26380b3429a087d08331afc27
Author: Sobhan Mohammadpour  gentoo  org>
AuthorDate: Fri Feb 16 16:11:47 2018 +
Commit: Sobhan Mohammadpour  gentoo  org>
CommitDate: Fri Feb 16 16:11:47 2018 +
URL:https://gitweb.gentoo.org/proj/gnome.git/commit/?id=41c5d038

gnome-meson.eclass: remove gnome-meson_use function

 eclass/gnome-meson.eclass | 7 ---
 1 file changed, 7 deletions(-)

diff --git a/eclass/gnome-meson.eclass b/eclass/gnome-meson.eclass
index 3f013a18..cd322b13 100644
--- a/eclass/gnome-meson.eclass
+++ b/eclass/gnome-meson.eclass
@@ -159,10 +159,3 @@ gnome-meson_pkg_postrm() {
gnome2_giomodule_cache_update
fi
 }
-
-# @FUNTION: gnome-meson_use
-# @DESCRIPTION:
-# Make setting arguments easier taken from 
https://github.com/Heather/gentoo-gnome/blob/4f61803890da76026f4fed772c34c4394e1d2959/gnome-base/nautilus/nautilus-3.27.2.ebuild#L83
-gnome-meson_use() {
-   echo "-Denable-${2:-${1}}=$(usex ${1} 'true' 'false')"
-}



[gentoo-commits] proj/gnome:master commit in: eclass/

2018-02-01 Thread Sobhan Mohammadpour
commit: e19dbf35e56e689ca97593372e6244681e31f511
Author: Sobhan Mohammadpour  gentoo  org>
AuthorDate: Thu Feb  1 10:17:10 2018 +
Commit: Sobhan Mohammadpour  gentoo  org>
CommitDate: Thu Feb  1 10:17:10 2018 +
URL:https://gitweb.gentoo.org/proj/gnome.git/commit/?id=e19dbf35

vala.eclass: increase VALA_MAX_API_VERSION to 0.38

 eclass/vala.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/vala.eclass b/eclass/vala.eclass
index f8a45cde..f8c4319c 100644
--- a/eclass/vala.eclass
+++ b/eclass/vala.eclass
@@ -31,7 +31,7 @@ VALA_MIN_API_VERSION=${VALA_MIN_API_VERSION:-0.32}
 # @ECLASS-VARIABLE: VALA_MAX_API_VERSION
 # @DESCRIPTION:
 # Maximum vala API version (e.g. 0.32).
-VALA_MAX_API_VERSION=${VALA_MAX_API_VERSION:-0.36}
+VALA_MAX_API_VERSION=${VALA_MAX_API_VERSION:-0.38}
 
 # @ECLASS-VARIABLE: VALA_USE_DEPEND
 # @DEFAULT_UNSET



[gentoo-commits] proj/gnome:master commit in: eclass/

2018-01-28 Thread Gilles Dartiguelongue
commit: 308fde12eadda2a65ce732960577e46c65f77849
Author: Gilles Dartiguelongue  gentoo  org>
AuthorDate: Mon Jan 29 07:40:27 2018 +
Commit: Gilles Dartiguelongue  gentoo  org>
CommitDate: Mon Jan 29 07:41:14 2018 +
URL:https://gitweb.gentoo.org/proj/gnome.git/commit/?id=308fde12

eclass: sync vala.eclass with gentoo repository

 eclass/vala.eclass | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/eclass/vala.eclass b/eclass/vala.eclass
index f2243dd1..f8a45cde 100644
--- a/eclass/vala.eclass
+++ b/eclass/vala.eclass
@@ -25,13 +25,13 @@ esac
 
 # @ECLASS-VARIABLE: VALA_MIN_API_VERSION
 # @DESCRIPTION:
-# Minimum vala API version (e.g. 0.26).
-VALA_MIN_API_VERSION=${VALA_MIN_API_VERSION:-0.26}
+# Minimum vala API version (e.g. 0.32).
+VALA_MIN_API_VERSION=${VALA_MIN_API_VERSION:-0.32}
 
 # @ECLASS-VARIABLE: VALA_MAX_API_VERSION
 # @DESCRIPTION:
 # Maximum vala API version (e.g. 0.32).
-VALA_MAX_API_VERSION=${VALA_MAX_API_VERSION:-0.32}
+VALA_MAX_API_VERSION=${VALA_MAX_API_VERSION:-0.36}
 
 # @ECLASS-VARIABLE: VALA_USE_DEPEND
 # @DEFAULT_UNSET
@@ -49,7 +49,7 @@ vala_api_versions() {
local minimal_supported_minor_version minor_version
 
# Dependency atoms are not generated for Vala versions older than 
0.${minimal_supported_minor_version}.
-   minimal_supported_minor_version="26"
+   minimal_supported_minor_version="32"
 
for ((minor_version = ${VALA_MAX_API_VERSION#*.}; minor_version >= 
${VALA_MIN_API_VERSION#*.}; minor_version = minor_version - 2)); do
if ((minor_version >= minimal_supported_minor_version)); then



[gentoo-commits] proj/gnome:master commit in: eclass/

2018-01-28 Thread Gilles Dartiguelongue
commit: 252e03bdf22002317e64e6882567ff2dd6051ed9
Author: Gilles Dartiguelongue  gentoo  org>
AuthorDate: Mon Jan 29 07:38:41 2018 +
Commit: Gilles Dartiguelongue  gentoo  org>
CommitDate: Mon Jan 29 07:41:03 2018 +
URL:https://gitweb.gentoo.org/proj/gnome.git/commit/?id=252e03bd

eclass: drop $Id$ header

 eclass/gnome2-live.eclass   | 3 ---
 eclass/gnome2-python.eclass | 1 -
 eclass/multibuild.eclass| 1 -
 eclass/vala.eclass  | 1 -
 4 files changed, 6 deletions(-)

diff --git a/eclass/gnome2-live.eclass b/eclass/gnome2-live.eclass
index 8bcc4ea4..4140e27c 100644
--- a/eclass/gnome2-live.eclass
+++ b/eclass/gnome2-live.eclass
@@ -1,8 +1,6 @@
 # Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Id$
 
-#
 # @ECLASS: gnome2-live.eclass
 # @MAINTAINER:
 # gn...@gentoo.org
@@ -12,7 +10,6 @@
 # @DESCRIPTION:
 # Exports additional functions used by live ebuilds written for GNOME packages
 # Always to be imported *AFTER* gnome2.eclass
-#
 
 inherit autotools eutils gnome2 gnome2-utils libtool git-r3 xdg
 

diff --git a/eclass/gnome2-python.eclass b/eclass/gnome2-python.eclass
index 5ee12d6e..a16e931e 100644
--- a/eclass/gnome2-python.eclass
+++ b/eclass/gnome2-python.eclass
@@ -1,6 +1,5 @@
 # Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Id$
 
 # @ECLASS: gnome2-python.eclass
 # @MAINTAINER:

diff --git a/eclass/multibuild.eclass b/eclass/multibuild.eclass
index 912545c7..c29f4d89 100644
--- a/eclass/multibuild.eclass
+++ b/eclass/multibuild.eclass
@@ -1,6 +1,5 @@
 # Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Id$
 
 # @ECLASS: multibuild.eclass
 # @MAINTAINER:

diff --git a/eclass/vala.eclass b/eclass/vala.eclass
index a70c9d87..f2243dd1 100644
--- a/eclass/vala.eclass
+++ b/eclass/vala.eclass
@@ -1,6 +1,5 @@
 # Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Id$
 
 # @ECLASS: vala.eclass
 # @MAINTAINER:



[gentoo-commits] proj/gnome:master commit in: eclass/

2017-12-26 Thread Mart Raudsepp
commit: db7676425e418293840de0a5598b2cd286f6f2e5
Author: Mart Raudsepp  gentoo  org>
AuthorDate: Tue Dec 26 12:19:56 2017 +
Commit: Mart Raudsepp  gentoo  org>
CommitDate: Tue Dec 26 12:19:56 2017 +
URL:https://gitweb.gentoo.org/proj/gnome.git/commit/?id=db767642

gnome2.eclass: Fix accidental reverse of schema update conditional

commit ffb6f9396884aaf7a9c84faa994cde3c458eb83f sync from main tree.
Otherwise e.g gnome-todo fails to run right after install due to no schemas 
found.

 eclass/gnome2.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/gnome2.eclass b/eclass/gnome2.eclass
index 93a0501e..2cc54393 100644
--- a/eclass/gnome2.eclass
+++ b/eclass/gnome2.eclass
@@ -340,7 +340,7 @@ gnome2_pkg_postinst() {
if [[ -n ${GNOME2_ECLASS_ICONS} ]]; then
gnome2_icon_cache_update
fi
-   if [[ -z ${GNOME2_ECLASS_GLIB_SCHEMAS} ]]; then
+   if [[ -n ${GNOME2_ECLASS_GLIB_SCHEMAS} ]]; then
gnome2_schemas_update
fi
gnome2_scrollkeeper_update
@@ -371,7 +371,7 @@ gnome2_pkg_postrm() {
if [[ -n ${GNOME2_ECLASS_ICONS} ]]; then
gnome2_icon_cache_update
fi
-   if [[ -z ${GNOME2_ECLASS_GLIB_SCHEMAS} ]]; then
+   if [[ -n ${GNOME2_ECLASS_GLIB_SCHEMAS} ]]; then
gnome2_schemas_update
fi
gnome2_scrollkeeper_update



[gentoo-commits] proj/gnome:master commit in: eclass/

2017-12-10 Thread Sobhan Mohammadpour
commit: 22cfda9c891082e0ecb003d15fe364ff2c8e0c0d
Author: Sobhan Mohammadpour  gentoo  org>
AuthorDate: Sun Dec 10 18:35:18 2017 +
Commit: Sobhan Mohammadpour  gentoo  org>
CommitDate: Sun Dec 10 18:35:18 2017 +
URL:https://gitweb.gentoo.org/proj/gnome.git/commit/?id=22cfda9c

gnome-meson.eclass Many fixes

Fix the installations of docs, show warning message for the overl-
ay.

 eclass/gnome-meson.eclass | 33 +++--
 1 file changed, 19 insertions(+), 14 deletions(-)

diff --git a/eclass/gnome-meson.eclass b/eclass/gnome-meson.eclass
index 0e2466cb..3f013a18 100644
--- a/eclass/gnome-meson.eclass
+++ b/eclass/gnome-meson.eclass
@@ -28,26 +28,26 @@ esac
 # Prepare environment for build, fix build of scrollkeeper documentation,
 # run elibtoolize.
 gnome-meson_src_prepare() {
+   # FIXME add gtk-doc stuff if needed
xdg_src_prepare
 
# Prevent assorted access violations and test failures
gnome2_environment_reset
-
-   # Disable all deprecation warnings
-   gnome2_disable_deprecation_warning
 }
 
 # @FUNCTION: gnome-meson_src_configure
 # @DESCRIPTION:
 # Gnome specific configure handling
 gnome-meson_src_configure() {
-   #FIXME: handle gtk-doc
-   
-   #FIXME is this still valid ?
# Avoid sandbox violations caused by gnome-vfs (bug #128289 and #345659)
addpredict "$(unset  HOME; echo ~)/.gnome2"

-
+   #FIXME are these valid/needed
+   #   "-Dgtk-doc=no"
+   #   "-Dmaintainer-mode=no"
+   #   "-Dschemas-install=no"
+   #   "-Dupdate-mimedb=no"
+   #   "-Dcompile-warnings=minimum"
local emesonargs=(
"$@"
)
@@ -67,21 +67,19 @@ gnome-meson_src_compile() {
 # Gnome specific install. Handles typical GConf and scrollkeeper setup
 # in packages and removal of .la files if requested
 gnome-meson_src_install() {
-   # we must delay gconf schema installation due to sandbox
-   export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL="1"
-
-   unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
-
+   # install docs
+   default

-   # Since eapi6 this is handled by default on its own plus MAINTAINERS 
and HACKING
# files that are really common in gnome packages (bug #573390)
local d
for d in HACKING MAINTAINERS; do
[[ -s "${d}" ]] && dodoc "${d}"
done

+   # Make sure this one doesn't get in the portage db
+   rm -fr "${ED}/usr/share/applications/mimeinfo.cache"
+
# Delete all .la files
-   
case "${GNOME2_LA_PUNT}" in
yes)prune_libtool_files --modules;;
no) ;;
@@ -131,6 +129,13 @@ gnome-meson_pkg_postinst() {
if [[ ${#GNOME2_ECLASS_GIO_MODULES[@]} -gt 0 ]]; then
gnome2_giomodule_cache_update
fi
+   
+   # This should only be in the overlay
+   ewarn "**"
+   ewarn "This is the *experimental* Gentoo GNOME Overlay"
+   ewarn "Please report bugs at #gentoo-desktop @ FreeNode"
+   ewarn "Do NOT go to upstream with bugs without checking with us first"
+   ewarn "**"
 }
 
 # # FIXME Handle GConf schemas removal



[gentoo-commits] proj/gnome:master commit in: eclass/

2017-12-09 Thread Sobhan Mohammadpour
commit: 25e51618ccb10172768758cfb00339ac9c652a4b
Author: Sobhan Mohammadpour  gentoo  org>
AuthorDate: Sat Dec  9 17:03:40 2017 +
Commit: Sobhan Mohammadpour  gentoo  org>
CommitDate: Sat Dec  9 17:18:11 2017 +
URL:https://gitweb.gentoo.org/proj/gnome.git/commit/?id=25e51618

gnome-meson.eclass: A new eclass to help with gnome packages using meson

The gnome-meson.eclass is equivalent of the gnome2.eclass for packages
that are using meson instead of other build systems. It is based on
gnome2.eclass.

 eclass/gnome-meson.eclass | 163 ++
 1 file changed, 163 insertions(+)

diff --git a/eclass/gnome-meson.eclass b/eclass/gnome-meson.eclass
new file mode 100644
index ..0e2466cb
--- /dev/null
+++ b/eclass/gnome-meson.eclass
@@ -0,0 +1,163 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: gnome-meson.eclass
+# @MAINTAINER:
+# gn...@gentoo.org
+# @BLURB: Provides phases for Gnome/Gtk+ based packages that use meosn.
+# @DESCRIPTION:
+# Exports portage base functions used by ebuilds written for packages using the
+# GNOME framework and meson. For additional functions, see gnome2-utils.eclass.
+
+inherit eutils gnome.org gnome2-utils meson xdg
+
+case "${EAPI:-0}" in
+   6)
+   EXPORT_FUNCTIONS src_prepare src_configure src_compile 
src_install pkg_preinst pkg_postinst pkg_postrm
+   ;;
+   *) die "EAPI=${EAPI} is not supported" ;;
+esac
+
+# @ECLASS-VARIABLE: GNOME-MESON_ECLASS_GIO_MODULES
+# @INTERNAL
+# @DESCRIPTION:
+# Array containing glib GIO modules
+
+# @FUNCTION: gnome-meson_src_prepare
+# @DESCRIPTION:
+# Prepare environment for build, fix build of scrollkeeper documentation,
+# run elibtoolize.
+gnome-meson_src_prepare() {
+   xdg_src_prepare
+
+   # Prevent assorted access violations and test failures
+   gnome2_environment_reset
+
+   # Disable all deprecation warnings
+   gnome2_disable_deprecation_warning
+}
+
+# @FUNCTION: gnome-meson_src_configure
+# @DESCRIPTION:
+# Gnome specific configure handling
+gnome-meson_src_configure() {
+   #FIXME: handle gtk-doc
+   
+   #FIXME is this still valid ?
+   # Avoid sandbox violations caused by gnome-vfs (bug #128289 and #345659)
+   addpredict "$(unset  HOME; echo ~)/.gnome2"
+   
+
+   local emesonargs=(
+   "$@"
+   )
+   
+   meson_src_configure
+}
+
+# @FUNCTION: gnome-meson_src_compile
+# @DESCRIPTION:
+# Only default src_compile for now
+gnome-meson_src_compile() {
+   meson_src_compile
+}
+
+# @FUNCTION: gnome-meson_src_install
+# @DESCRIPTION:
+# Gnome specific install. Handles typical GConf and scrollkeeper setup
+# in packages and removal of .la files if requested
+gnome-meson_src_install() {
+   # we must delay gconf schema installation due to sandbox
+   export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL="1"
+
+   unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
+
+   
+   # Since eapi6 this is handled by default on its own plus MAINTAINERS 
and HACKING
+   # files that are really common in gnome packages (bug #573390)
+   local d
+   for d in HACKING MAINTAINERS; do
+   [[ -s "${d}" ]] && dodoc "${d}"
+   done
+   
+   # Delete all .la files
+   
+   case "${GNOME2_LA_PUNT}" in
+   yes)prune_libtool_files --modules;;
+   no) ;;
+   *)  prune_libtool_files;;
+   esac
+   
+   meson_src_install
+}
+
+# @FUNCTION: gnome-meson_pkg_preinst
+# @DESCRIPTION:
+# Finds Icons, GConf and GSettings schemas for later handling in pkg_postinst
+gnome-meson_pkg_preinst() {
+   xdg_pkg_preinst
+   gnome2_gconf_savelist
+   gnome2_icon_savelist
+   gnome2_schemas_savelist
+   gnome2_scrollkeeper_savelist
+   gnome2_gdk_pixbuf_savelist
+
+   local f
+
+   GNOME2_ECLASS_GIO_MODULES=()
+   while IFS= read -r -d '' f; do
+   GNOME2_ECLASS_GIO_MODULES+=( ${f} )
+   done < <(cd "${D}" && find usr/$(get_libdir)/gio/modules -type f 
-print0 2>/dev/null)
+
+   export GNOME2_ECLASS_GIO_MODULES
+}
+
+# @FUNCTION: gnome-meson_pkg_postinst
+# @DESCRIPTION:
+# Handle scrollkeeper, GConf, GSettings, Icons, desktop and mime
+# database updates.
+gnome-meson_pkg_postinst() {
+   xdg_pkg_postinst
+   gnome2_gconf_install
+   if [[ -n ${GNOME2_ECLASS_ICONS} ]]; then
+   gnome2_icon_cache_update
+   fi
+   if [[ -n ${GNOME2_ECLASS_GLIB_SCHEMAS} ]]; then
+   gnome2_schemas_update
+   fi
+   gnome2_scrollkeeper_update
+   gnome2_gdk_pixbuf_update
+
+   if [[ ${#GNOME2_ECLASS_GIO_MODULES[@]} -gt 0 ]]; then
+   gnome2_giomodule_cache_update
+   fi
+}
+
+# # FIXME Handle GConf schemas removal
+#gnome2_pkg_prerm() {
+#  gnome2_gconf_uninstall
+#}
+
+# @FUNCTION: 

[gentoo-commits] proj/gnome:master commit in: eclass/

2017-09-13 Thread Gilles Dartiguelongue
commit: 20a5f7d5c1612ad252ed409fd7b7cf3745dd8e2e
Author: Gilles Dartiguelongue  gentoo  org>
AuthorDate: Wed Sep 13 22:16:54 2017 +
Commit: Gilles Dartiguelongue  gentoo  org>
CommitDate: Wed Sep 13 22:16:54 2017 +
URL:https://gitweb.gentoo.org/proj/gnome.git/commit/?id=20a5f7d5

eclass/*: sync with gentoo repository

 eclass/gnome2-utils.eclass | 33 +++--
 eclass/gnome2.eclass   | 34 ++
 2 files changed, 37 insertions(+), 30 deletions(-)

diff --git a/eclass/gnome2-utils.eclass b/eclass/gnome2-utils.eclass
index 63855da1..9b4296c1 100644
--- a/eclass/gnome2-utils.eclass
+++ b/eclass/gnome2-utils.eclass
@@ -1,6 +1,5 @@
 # Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Id$
 
 # @ECLASS: gnome2-utils.eclass
 # @MAINTAINER:
@@ -100,12 +99,12 @@ gnome2_environment_reset() {
export GST_REGISTRY="${T}/registry.xml"
 
# Ensure we don't rely on dconf/gconf while building, bug #511946
-   export GSETTINGS_BACKEND="memory" 
+   export GSETTINGS_BACKEND="memory"
 
if has ${EAPI:-0} 6; then
# Try to cover the packages honoring this variable, bug #508124
export GST_INSPECT="$(type -P true)"
-   
+
# Stop relying on random DISPLAY variable values, bug #534312
unset DISPLAY
fi
@@ -231,40 +230,35 @@ gnome2_icon_cache_update() {
return
fi
 
-   if [[ -z "${GNOME2_ECLASS_ICONS}" ]]; then
-   debug-print "No icon cache to update"
-   return
-   fi
-
ebegin "Updating icons cache"
 
local retval=0
local fails=( )
 
-   for dir in ${GNOME2_ECLASS_ICONS}
+   for dir in "${EROOT%/}"/usr/share/icons/*
do
-   if [[ -f "${EROOT}${dir}/index.theme" ]] ; then
+   if [[ -f "${dir}/index.theme" ]] ; then
local rv=0
 
-   "${updater}" -qf "${EROOT}${dir}"
+   "${updater}" -qf "${dir}"
rv=$?
 
if [[ ! $rv -eq 0 ]] ; then
-   debug-print "Updating cache failed on 
${EROOT}${dir}"
+   debug-print "Updating cache failed on ${dir}"
 
# Add to the list of failures
-   fails[$(( ${#fails[@]} + 1 ))]="${EROOT}${dir}"
+   fails+=( "${dir}" )
 
retval=2
fi
-   elif [[ $(ls "${EROOT}${dir}") = "icon-theme.cache" ]]; then
+   elif [[ $(ls "${dir}") = "icon-theme.cache" ]]; then
# Clear stale cache files after theme uninstallation
-   rm "${EROOT}${dir}/icon-theme.cache"
+   rm "${dir}/icon-theme.cache"
fi
 
-   if [[ -z $(ls "${EROOT}${dir}") ]]; then
+   if [[ -z $(ls "${dir}") ]]; then
# Clear empty theme directories after theme 
uninstallation
-   rmdir "${EROOT}${dir}"
+   rmdir "${dir}"
fi
done
 
@@ -387,11 +381,6 @@ gnome2_schemas_update() {
return
fi
 
-   if [[ -z ${GNOME2_ECLASS_GLIB_SCHEMAS} ]]; then
-   debug-print "No GSettings schemas to update"
-   return
-   fi
-
ebegin "Updating GSettings schemas"
${updater} --allow-any-name "$@" 
"${EROOT%/}/usr/share/glib-2.0/schemas" &>/dev/null
eend $?

diff --git a/eclass/gnome2.eclass b/eclass/gnome2.eclass
index 45d1d633..93a0501e 100644
--- a/eclass/gnome2.eclass
+++ b/eclass/gnome2.eclass
@@ -1,6 +1,5 @@
 # Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Id$
 
 # @ECLASS: gnome2.eclass
 # @MAINTAINER:
@@ -10,6 +9,13 @@
 # Exports portage base functions used by ebuilds written for packages using the
 # GNOME framework. For additional functions, see gnome2-utils.eclass.
 
+# @ECLASS-VARIABLE: GNOME2_EAUTORECONF
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Run eautoreconf instead of only elibtoolize
+GNOME2_EAUTORECONF=${GNOME2_EAUTORECONF:-""}
+
+[[ ${GNOME2_EAUTORECONF} == 'yes' ]] && inherit autotools
 inherit eutils libtool gnome.org gnome2-utils xdg
 
 case "${EAPI:-0}" in
@@ -62,7 +68,7 @@ if has ${EAPI:-0} 4 5; then
IUSE="debug"
fi
 fi
-
+
 # @ECLASS-VARIABLE: GNOME2_ECLASS_GIO_MODULES
 # @INTERNAL
 # @DESCRIPTION:
@@ -113,9 +119,13 @@ gnome2_src_prepare() {
# Disable all deprecation warnings
gnome2_disable_deprecation_warning
 
-   # Run libtoolize
+   # Run libtoolize or eautoreconf, bug #591584
# https://bugzilla.gnome.org/show_bug.cgi?id=655517
-   elibtoolize ${ELTCONF}
+   if [[ 

[gentoo-commits] proj/gnome:master commit in: eclass/

2016-10-30 Thread Gilles Dartiguelongue
commit: 29ace82844506914a4bc6af204e140ccdc730800
Author: Gilles Dartiguelongue  gentoo  org>
AuthorDate: Sun Oct 30 11:36:40 2016 +
Commit: Gilles Dartiguelongue  gentoo  org>
CommitDate: Sun Oct 30 11:36:40 2016 +
URL:https://gitweb.gentoo.org/proj/gnome.git/commit/?id=29ace828

eclass/gnome2-live: add EAPI 6 support

 eclass/gnome2-live.eclass | 36 
 1 file changed, 24 insertions(+), 12 deletions(-)

diff --git a/eclass/gnome2-live.eclass b/eclass/gnome2-live.eclass
index 0e725d0..8bcc4ea 100644
--- a/eclass/gnome2-live.eclass
+++ b/eclass/gnome2-live.eclass
@@ -21,6 +21,9 @@ case "${EAPI:-0}" in
4|5)
EXPORT_FUNCTIONS src_unpack src_prepare pkg_postinst
;;
+   6)
+   EXPORT_FUNCTIONS src_prepare pkg_postinst
+   ;;
*)
die "Unknown EAPI, Bug eclass maintainers." ;;
 esac
@@ -75,11 +78,15 @@ gnome2-live_get_var() {
 # Calls git-2_src_unpack, and unpacks ${A} if required.
 # Also calls gnome2-live_src_prepare for older EAPI.
 gnome2-live_src_unpack() {
-   if test -n "${A}"; then
-   unpack ${A}
+   if has ${EAPI:-0} 4 5 ; then
+   if test -n "${A}"; then
+   unpack ${A}
+   fi
+   git-r3_src_unpack
+   gnome2-live_src_prepare
+   else
+   die "gnome2-live_src_unpack is banned starting with EAPI=6"
fi
-   git-r3_src_unpack
-   gnome2-live_src_prepare
 }
 
 # @FUNCTION: gnome2-live_src_prepare
@@ -88,11 +95,13 @@ gnome2-live_src_unpack() {
 # Creates blank ChangeLog and necessary macro dirs. Runs various autotools
 # programs if required, and finally runs eautoreconf.
 gnome2-live_src_prepare() {
-   for i in ${PATCHES}; do
-   epatch "${i}"
-   done
+   if has ${EAPI:-0} 4 5 ; then
+   for i in ${PATCHES}; do
+   epatch "${i}"
+   done
 
-   epatch_user
+   epatch_user
+   fi
 
# If ChangeLog doesn't exist, maybe it's autogenerated
# Avoid a `dodoc` failure by adding an empty ChangeLog
@@ -100,18 +109,21 @@ gnome2-live_src_prepare() {
echo > ChangeLog
fi
 
-   # eautoreconf is smart enough to run all necessary commands
-   eautoreconf
-
### Keep this in-sync with gnome2.eclass!
 
xdg_src_prepare
 
+   # eautoreconf is smart enough to run all necessary commands
+   eautoreconf
+
# Prevent assorted access violations and test failures
gnome2_environment_reset
 
# Prevent scrollkeeper access violations
-   gnome2_omf_fix
+   # We stop to run it from EAPI=6 as scrollkeeper helpers from
+   # rarian are not running anything and, then, access violations
+   # shouldn't occur.
+   has ${EAPI:-0} 4 5 && gnome2_omf_fix
 
# Run libtoolize
# https://bugzilla.gnome.org/show_bug.cgi?id=655517



[gentoo-commits] proj/gnome:master commit in: eclass/

2016-10-30 Thread Gilles Dartiguelongue
commit: 3935bd2bcac001faa89fbfb5b80b9c99e5e476cd
Author: Gilles Dartiguelongue  gentoo  org>
AuthorDate: Sun Oct 30 11:22:41 2016 +
Commit: Gilles Dartiguelongue  gentoo  org>
CommitDate: Sun Oct 30 11:23:33 2016 +
URL:https://gitweb.gentoo.org/proj/gnome.git/commit/?id=3935bd2b

eclass: drop support for older EAPIs in gnome2-live

 eclass/gnome2-live.eclass | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/eclass/gnome2-live.eclass b/eclass/gnome2-live.eclass
index 9a810e8..7771c50 100644
--- a/eclass/gnome2-live.eclass
+++ b/eclass/gnome2-live.eclass
@@ -16,14 +16,14 @@
 
 inherit autotools eutils gnome2 gnome2-utils libtool git-r3
 
-# Stolen from git.eclass
-EXPORTED_FUNCTIONS="src_unpack pkg_postinst"
+EXPORTED_FUNCTIONS=" "
 case "${EAPI:-0}" in
-2|3|4|5) EXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS} src_prepare" ;;
-0|1) ;;
-*) die "Unknown EAPI, Bug eclass maintainers." ;;
+   4|5)
+   EXPORT_FUNCTIONS src_unpack src_prepare pkg_postinst
+   ;;
+   *)
+   die "Unknown EAPI, Bug eclass maintainers." ;;
 esac
-EXPORT_FUNCTIONS ${EXPORTED_FUNCTIONS}
 
 # DEPEND on
 # app-text/gnome-doc-utils for gnome-doc-*
@@ -79,7 +79,7 @@ gnome2-live_src_unpack() {
unpack ${A}
fi
git-r3_src_unpack
-   has src_prepare ${EXPORTED_FUNCTIONS} || gnome2-live_src_prepare
+   gnome2-live_src_prepare
 }
 
 # @FUNCTION: gnome2-live_src_prepare



[gentoo-commits] proj/gnome:master commit in: eclass/

2016-10-30 Thread Gilles Dartiguelongue
commit: 5f5cf8cfd67aecdcb2d6782e2503c2656cdf3efd
Author: Gilles Dartiguelongue  gentoo  org>
AuthorDate: Sun Oct 30 11:25:28 2016 +
Commit: Gilles Dartiguelongue  gentoo  org>
CommitDate: Sun Oct 30 11:32:35 2016 +
URL:https://gitweb.gentoo.org/proj/gnome.git/commit/?id=5f5cf8cf

eclass/gnome2-live: sync src_prepare with gnome2.eclass

Use xdg eclass to clean environment, etc

 eclass/gnome2-live.eclass | 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/eclass/gnome2-live.eclass b/eclass/gnome2-live.eclass
index 7771c50..0e725d0 100644
--- a/eclass/gnome2-live.eclass
+++ b/eclass/gnome2-live.eclass
@@ -14,7 +14,7 @@
 # Always to be imported *AFTER* gnome2.eclass
 #
 
-inherit autotools eutils gnome2 gnome2-utils libtool git-r3
+inherit autotools eutils gnome2 gnome2-utils libtool git-r3 xdg
 
 EXPORTED_FUNCTIONS=" "
 case "${EAPI:-0}" in
@@ -105,9 +105,7 @@ gnome2-live_src_prepare() {
 
### Keep this in-sync with gnome2.eclass!
 
-   # Don't use the session bus address inherited via the environment
-   # causes test and introspection-building failures
-   unset DBUS_SESSION_BUS_ADDRESS
+   xdg_src_prepare
 
# Prevent assorted access violations and test failures
gnome2_environment_reset
@@ -115,7 +113,8 @@ gnome2-live_src_prepare() {
# Prevent scrollkeeper access violations
gnome2_omf_fix
 
-   # Libtool patching
+   # Run libtoolize
+   # https://bugzilla.gnome.org/show_bug.cgi?id=655517
elibtoolize ${ELTCONF}
 }
 



[gentoo-commits] proj/gnome:master commit in: eclass/

2016-09-05 Thread Gilles Dartiguelongue
commit: 4f37fde27700ee6f07923cedf2996b889336862a
Author: Gilles Dartiguelongue  gentoo  org>
AuthorDate: Mon Sep  5 21:29:37 2016 +
Commit: Gilles Dartiguelongue  gentoo  org>
CommitDate: Mon Sep  5 21:31:21 2016 +
URL:https://gitweb.gentoo.org/proj/gnome.git/commit/?id=4f37fde2

eclass: sync with gentoo

 eclass/gnome2-utils.eclass |  43 ++-
 eclass/gnome2.eclass   | 181 -
 eclass/vala.eclass |  10 +--
 3 files changed, 174 insertions(+), 60 deletions(-)

diff --git a/eclass/gnome2-utils.eclass b/eclass/gnome2-utils.eclass
index 83a3610..63855da 100644
--- a/eclass/gnome2-utils.eclass
+++ b/eclass/gnome2-utils.eclass
@@ -15,10 +15,11 @@
 #  * GConf schemas management
 #  * scrollkeeper (old Gnome help system) management
 
-inherit eutils multilib xdg-utils
+[[ ${EAPI:-0} == [012345] ]] && inherit multilib
+inherit eutils xdg-utils
 
 case "${EAPI:-0}" in
-   0|1|2|3|4|5) ;;
+   0|1|2|3|4|5|6) ;;
*) die "EAPI=${EAPI} is not supported" ;;
 esac
 
@@ -97,6 +98,17 @@ gnome2_environment_reset() {
 
# GST_REGISTRY is to work around gst utilities trying to read/write 
/root
export GST_REGISTRY="${T}/registry.xml"
+
+   # Ensure we don't rely on dconf/gconf while building, bug #511946
+   export GSETTINGS_BACKEND="memory" 
+
+   if has ${EAPI:-0} 6; then
+   # Try to cover the packages honoring this variable, bug #508124
+   export GST_INSPECT="$(type -P true)"
+   
+   # Stop relying on random DISPLAY variable values, bug #534312
+   unset DISPLAY
+   fi
 }
 
 # @FUNCTION: gnome2_gconf_savelist
@@ -457,6 +469,29 @@ gnome2_query_immodules_gtk3() {
eend $?
 }
 
+# @FUNCTION: gnome2_giomodule_cache_update
+# @USAGE: gnome2_giomodule_cache_update
+# @DESCRIPTION:
+# Updates glib's gio modules cache.
+# This function should be called from pkg_postinst and pkg_postrm.
+gnome2_giomodule_cache_update() {
+   has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
+   local updater="${EROOT}/usr/bin/${CHOST}-gio-querymodules"
+
+   if [[ ! -x ${updater} ]]; then
+   updater="${EROOT}/usr/bin/gio-querymodules"
+   fi
+
+   if [[ ! -x ${updater} ]]; then
+   debug-print "${updater} is not executable"
+   return
+   fi
+
+   ebegin "Updating GIO modules cache"
+   ${updater} "${EROOT%/}"/usr/$(get_libdir)/gio/modules
+   eend $?
+}
+
 # @FUNCTION: gnome2_disable_deprecation_warning
 # @DESCRIPTION:
 # Disable deprecation warnings commonly found in glib based packages.
@@ -475,8 +510,8 @@ gnome2_disable_deprecation_warning() {
fi
 
LC_ALL=C sed -r -i \
-   -e 's:-D[A-Z_]+_DISABLE_DEPRECATED:$(NULL):g' \
-   -e 's:-DGSEAL_ENABLE+[A-Z_]:$(NULL):g' \
+   -e 's:-D[A-Z_]+_DISABLE_DEPRECATED:$(/bin/true):g' \
+   -e 's:-DGSEAL_ENABLE(=[A-Za-z0-9_]*)?:$(/bin/true):g' \
-i "${makefile}"
 
if [[ $? -ne 0 ]]; then

diff --git a/eclass/gnome2.eclass b/eclass/gnome2.eclass
index ed233b0..45d1d63 100644
--- a/eclass/gnome2.eclass
+++ b/eclass/gnome2.eclass
@@ -16,25 +16,18 @@ case "${EAPI:-0}" in
4|5)
EXPORT_FUNCTIONS src_unpack src_prepare src_configure 
src_compile src_install pkg_preinst pkg_postinst pkg_postrm
;;
+   6)
+   EXPORT_FUNCTIONS src_prepare src_configure src_compile 
src_install pkg_preinst pkg_postinst pkg_postrm
+   ;;
*) die "EAPI=${EAPI} is not supported" ;;
 esac
 
-# @ECLASS-VARIABLE: G2CONF
+# @ECLASS-VARIABLE: DOCS
 # @DEFAULT_UNSET
 # @DESCRIPTION:
-# Extra configure opts passed to econf.
-# Deprecated, pass extra arguments to gnome2_src_configure.
-G2CONF=${G2CONF:-""}
-
-# @ECLASS-VARIABLE: GNOME2_LA_PUNT
-# @DESCRIPTION:
-# Should we delete ALL the .la files?
-# NOT to be used without due consideration.
-if has ${EAPI:-0} 4; then
-   GNOME2_LA_PUNT=${GNOME2_LA_PUNT:-"no"}
-else
-   GNOME2_LA_PUNT=${GNOME2_LA_PUNT:-""}
-fi
+# String containing documents passed to dodoc command for eapi4.
+# In eapi5 we rely on einstalldocs (from eutils.eclass) and for newer EAPIs we
+# follow PMS spec.
 
 # @ECLASS-VARIABLE: ELTCONF
 # @DEFAULT_UNSET
@@ -42,10 +35,15 @@ fi
 # Extra options passed to elibtoolize
 ELTCONF=${ELTCONF:-""}
 
-# @ECLASS-VARIABLE: DOCS
+# @ECLASS-VARIABLE: G2CONF
 # @DEFAULT_UNSET
 # @DESCRIPTION:
-# String containing documents passed to dodoc command.
+# Extra configure opts passed to econf.
+# Deprecated, pass extra arguments to gnome2_src_configure.
+# Banned in eapi6 and newer.
+if has ${EAPI:-0} 4 5; then
+   G2CONF=${G2CONF:-""}
+fi
 
 # @ECLASS-VARIABLE: GCONF_DEBUG
 # @DEFAULT_UNSET
@@ -56,18 +54,44 @@ ELTCONF=${ELTCONF:-""}
 # harder. This variable should be set to yes for such 

[gentoo-commits] proj/gnome:master commit in: eclass/

2015-12-23 Thread Gilles Dartiguelongue
commit: 885eb1409f0d9693ffb52cb51d8e09ef7b285662
Author: Gilles Dartiguelongue  gentoo  org>
AuthorDate: Thu Dec 24 01:13:39 2015 +
Commit: Gilles Dartiguelongue  gentoo  org>
CommitDate: Thu Dec 24 01:13:39 2015 +
URL:https://gitweb.gentoo.org/proj/gnome.git/commit/?id=885eb140

gnome2-live.eclass: fix a typo raised by eclass-manpages build

 eclass/gnome2-live.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/gnome2-live.eclass b/eclass/gnome2-live.eclass
index 1681293..9a810e8 100644
--- a/eclass/gnome2-live.eclass
+++ b/eclass/gnome2-live.eclass
@@ -70,7 +70,7 @@ gnome2-live_get_var() {
echo $(sed -ne "s/${var}(\(.*\))/\1/p" "${f}" | tr -d '[]')
 }
 
-# @FUNCTION: gnome2-live_get_var
+# @FUNCTION: gnome2-live_src_unpack
 # @DESCRIPTION:
 # Calls git-2_src_unpack, and unpacks ${A} if required.
 # Also calls gnome2-live_src_prepare for older EAPI.



[gentoo-commits] proj/gnome:master commit in: eclass/

2015-12-23 Thread Gilles Dartiguelongue
commit: 527cf7a49319cd2f8d6cc364fb50aeec54e85deb
Author: Gilles Dartiguelongue  gentoo  org>
AuthorDate: Thu Dec 24 01:15:52 2015 +
Commit: Gilles Dartiguelongue  gentoo  org>
CommitDate: Thu Dec 24 01:15:52 2015 +
URL:https://gitweb.gentoo.org/proj/gnome.git/commit/?id=527cf7a4

multibuild.eclass: sync with gentoo.git

 eclass/multibuild.eclass | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/eclass/multibuild.eclass b/eclass/multibuild.eclass
index ede0f03..912545c 100644
--- a/eclass/multibuild.eclass
+++ b/eclass/multibuild.eclass
@@ -1,8 +1,8 @@
 # Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/multibuild.eclass,v 1.20 2014/12/13 
08:42:42 mgorny Exp $
+# $Id$
 
-# @ECLASS: multibuild
+# @ECLASS: multibuild.eclass
 # @MAINTAINER:
 # Michał Górny 
 # @AUTHOR:
@@ -17,7 +17,7 @@ case "${EAPI:-0}" in
0|1|2|3)
die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
;;
-   4|5)
+   4|5|6)
;;
*)
die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
@@ -158,6 +158,8 @@ multibuild_foreach_variant() {
 multibuild_parallel_foreach_variant() {
debug-print-function ${FUNCNAME} "${@}"
 
+   [[ ${EAPI} == [45] ]] || die "${FUNCNAME} is banned in EAPI ${EAPI}"
+
multibuild_foreach_variant "${@}"
 }
 
@@ -205,7 +207,7 @@ multibuild_copy_sources() {
 
_multibuild_create_source_copy() {
einfo "${MULTIBUILD_VARIANT}: copying to ${BUILD_DIR}"
-   cp -pr "${cp_args[@]}" \
+   cp -p -R "${cp_args[@]}" \
"${_MULTIBUILD_INITIAL_BUILD_DIR}" "${BUILD_DIR}" || die
}
 



[gentoo-commits] proj/gnome:master commit in: eclass/

2015-11-26 Thread Gilles Dartiguelongue
commit: f41b572c1cafbfef54548d6359d1f609ef014601
Author: Gilles Dartiguelongue  gentoo  org>
AuthorDate: Thu Nov 26 22:46:04 2015 +
Commit: Gilles Dartiguelongue  gentoo  org>
CommitDate: Thu Nov 26 22:46:04 2015 +
URL:https://gitweb.gentoo.org/proj/gnome.git/commit/?id=f41b572c

*.eclass: sync with gentoo-x86

 eclass/gnome2-utils.eclass |  38 ++--
 eclass/gnome2.eclass   |   4 +-
 eclass/vala.eclass |   4 +-
 eclass/xdg-utils.eclass| 111 -
 eclass/xdg.eclass  |  68 ---
 5 files changed, 27 insertions(+), 198 deletions(-)

diff --git a/eclass/gnome2-utils.eclass b/eclass/gnome2-utils.eclass
index 7df00ae..83a3610 100644
--- a/eclass/gnome2-utils.eclass
+++ b/eclass/gnome2-utils.eclass
@@ -15,7 +15,7 @@
 #  * GConf schemas management
 #  * scrollkeeper (old Gnome help system) management
 
-inherit multilib
+inherit eutils multilib xdg-utils
 
 case "${EAPI:-0}" in
0|1|2|3|4|5) ;;
@@ -90,6 +90,8 @@ DEPEND=">=sys-apps/sed-4"
 # Reset various variables inherited from root's evironment to a reasonable
 # default for ebuilds to help avoid access violations and test failures.
 gnome2_environment_reset() {
+   xdg_environment_reset
+
# Respected by >=glib-2.30.1-r1
export G_HOME="${T}"
 
@@ -104,9 +106,9 @@ gnome2_environment_reset() {
 # This function should be called from pkg_preinst.
 gnome2_gconf_savelist() {
has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
-   pushd "${ED}" &> /dev/null
+   pushd "${ED}" > /dev/null || die
export GNOME2_ECLASS_SCHEMAS=$(find 'etc/gconf/schemas/' -name 
'*.schemas' 2> /dev/null)
-   popd &> /dev/null
+   popd > /dev/null || die
 }
 
 # @FUNCTION: gnome2_gconf_install
@@ -198,9 +200,9 @@ gnome2_gconf_uninstall() {
 # This function should be called from pkg_preinst.
 gnome2_icon_savelist() {
has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
-   pushd "${ED}" &> /dev/null
+   pushd "${ED}" > /dev/null || die
export GNOME2_ECLASS_ICONS=$(find 'usr/share/icons' -maxdepth 1 
-mindepth 1 -type d 2> /dev/null)
-   popd &> /dev/null
+   popd > /dev/null || die
 }
 
 # @FUNCTION: gnome2_icon_cache_update
@@ -319,9 +321,9 @@ gnome2_omf_fix() {
 # This function should be called from pkg_preinst.
 gnome2_scrollkeeper_savelist() {
has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
-   pushd "${ED}" &> /dev/null
+   pushd "${ED}" > /dev/null || die
export GNOME2_ECLASS_SCROLLS=$(find 'usr/share/omf' -type f -name 
"*.omf" 2> /dev/null)
-   popd &> /dev/null
+   popd > /dev/null || die
 }
 
 # @FUNCTION: gnome2_scrollkeeper_update
@@ -354,9 +356,9 @@ gnome2_scrollkeeper_update() {
 # This function should be called from pkg_preinst.
 gnome2_schemas_savelist() {
has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
-   pushd "${ED}" &>/dev/null
+   pushd "${ED}" > /dev/null || die
export GNOME2_ECLASS_GLIB_SCHEMAS=$(find 'usr/share/glib-2.0/schemas' 
-name '*.gschema.xml' 2>/dev/null)
-   popd &>/dev/null
+   popd > /dev/null || die
 }
 
 # @FUNCTION: gnome2_schemas_update
@@ -390,9 +392,9 @@ gnome2_schemas_update() {
 # This function should be called from pkg_preinst.
 gnome2_gdk_pixbuf_savelist() {
has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
-   pushd "${ED}" 1>/dev/null
+   pushd "${ED}" > /dev/null || die
export GNOME2_ECLASS_GDK_PIXBUF_LOADERS=$(find usr/lib*/gdk-pixbuf-2.0 
-type f 2>/dev/null)
-   popd 1>/dev/null
+   popd > /dev/null || die
 }
 
 # @FUNCTION: gnome2_gdk_pixbuf_update
@@ -419,7 +421,7 @@ gnome2_gdk_pixbuf_update() {
fi
 
ebegin "Updating gdk-pixbuf loader cache"
-   local tmp_file=$(mktemp -t tmp.XX_gdkpixbuf)
+   local tmp_file=$(emktemp)
${updater} 1> "${tmp_file}" &&
chmod 0644 "${tmp_file}" &&
cp -f "${tmp_file}" 
"${EROOT}usr/$(get_libdir)/gdk-pixbuf-2.0/2.10.0/loaders.cache" &&
@@ -435,7 +437,10 @@ gnome2_query_immodules_gtk2() {
local updater=${EPREFIX}/usr/bin/${CHOST}-gtk-query-immodules-2.0
[[ ! -x ${updater} ]] && 
updater=${EPREFIX}/usr/bin/gtk-query-immodules-2.0
 
-   "${updater}" --update-cache
+   ebegin "Updating gtk2 input method module cache"
+   
GTK_IM_MODULE_FILE="${EROOT}usr/$(get_libdir)/gtk-2.0/2.10.0/immodules.cache" \
+   "${updater}" --update-cache
+   eend $?
 }
 
 # @FUNCTION: gnome2_query_immodules_gtk3
@@ -446,7 +451,10 @@ gnome2_query_immodules_gtk3() {
local updater=${EPREFIX}/usr/bin/${CHOST}-gtk-query-immodules-3.0
[[ ! -x ${updater} ]] && 
updater=${EPREFIX}/usr/bin/gtk-query-immodules-3.0
 
-   "${updater}" --update-cache
+   ebegin "Updating gtk3 input method module cache"
+   
GTK_IM_MODULE_FILE="${EROOT}usr/$(get_libdir)/gtk-3.0/3.0.0/immodules.cache" \
+   "${updater}" 

[gentoo-commits] proj/gnome:master commit in: eclass/

2015-05-25 Thread Gilles Dartiguelongue
commit: 6f14db878539ac475c7edd9a05d9f55cc21d8778
Author: Gilles Dartiguelongue eva AT gentoo DOT org
AuthorDate: Mon May 25 15:49:19 2015 +
Commit: Gilles Dartiguelongue eva AT gentoo DOT org
CommitDate: Mon May 25 15:49:19 2015 +
URL:https://gitweb.gentoo.org/proj/gnome.git/commit/?id=6f14db87

eclass: add XDG eclass to replace fdo-mime

fdo-mime eclass is just a collection of helpers that is most often
forgotten and/or not properly used in ebuilds having .desktop files or
shared mime infos.

On top of that, most packages where missing the implicit dependency on
the tools used as can be seen in bug #208047.

Finally, most packages complying with XDG specifications nowadays expect
base directories to be present at various stages of package build as can
be seen in the many eclasses implementing handling for this (cmake, gnome2,
gstreamer, kde4-base, mono and qt4) so provide it through a simple phase
function.

 eclass/xdg-utils.eclass | 111 
 eclass/xdg.eclass   |  68 +
 2 files changed, 179 insertions(+)

diff --git a/eclass/xdg-utils.eclass b/eclass/xdg-utils.eclass
new file mode 100644
index 000..6dfe66f
--- /dev/null
+++ b/eclass/xdg-utils.eclass
@@ -0,0 +1,111 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+# @ECLASS: xdg-utils.eclass
+# @MAINTAINER:
+# gn...@gentoo.org
+# @AUTHOR:
+# Original author: Gilles Dartiguelongue e...@gentoo.org
+# @BLURB: Auxiliary functions commonly used by XDG compliant packages.
+# @DESCRIPTION:
+# This eclass provides a set of auxiliary functions needed by most XDG
+# compliant packages.
+# It provides XDG stack related functions such as:
+#  * XDG .desktop files cache management
+#  * XDG mime information database management
+
+case ${EAPI:-0} in
+   4|5) ;;
+   *) die EAPI=${EAPI} is not supported ;;
+esac
+
+# @ECLASS-VARIABLE: DESKTOP_DATABASE_UPDATE_BIN
+# @INTERNAL
+# @DESCRIPTION:
+# Path to update-desktop-database
+: ${DESKTOP_DATABASE_UPDATE_BIN:=/usr/bin/update-desktop-database}
+
+# @ECLASS-VARIABLE: DESKTOP_DATABASE_DIR
+# @INTERNAL
+# @DESCRIPTION:
+# Directory where .desktop files database is stored
+: ${DESKTOP_DATABASE_DIR=/usr/share/applications}
+
+# @ECLASS-VARIABLE: MIMEINFO_DATABASE_UPDATE_BIN
+# @INTERNAL
+# @DESCRIPTION:
+# Path to update-desktop-database
+: ${MIMEINFO_DATABASE_UPDATE_BIN:=/usr/bin/update-mime-database}
+
+# @ECLASS-VARIABLE: MIMEINFO_DATABASE_DIR
+# @INTERNAL
+# @DESCRIPTION:
+# Directory where .desktop files database is stored
+: ${MIMEINFO_DATABASE_DIR:=/usr/share/mime}
+
+# @FUNCTION: xdg_desktopfiles_savelist
+# @DESCRIPTION:
+# Find the .desktop files about to be installed and save their location
+# in the XDG_ECLASS_DESKTOPFILES environment variable.
+# This function should be called from pkg_preinst.
+xdg_desktopfiles_savelist() {
+   pushd ${D}  /dev/null
+   export XDG_ECLASS_DESKTOPFILES=$(find 'usr/share/applications' -type f 
2 /dev/null)
+   popd  /dev/null
+}
+
+# @FUNCTION: fdo-xdg_desktop_database_update
+# @DESCRIPTION:
+# Updates the .desktop files database.
+# Generates a list of mimetypes linked to applications that can handle them
+xdg_desktop_database_update() {
+   local updater=${EROOT}${DESKTOP_DATABASE_UPDATE_BIN}
+
+   if [[ ! -x ${updater} ]] ; then
+   debug-print ${updater} is not executable
+   return
+   fi
+
+   if [[ -z ${XDG_ECLASS_DESKTOPFILES} ]]; then
+   debug-print No .desktop files to add to database
+   return
+   fi
+
+   ebegin Updating .desktop files database ...
+   ${updater} -q ${EROOT}${DESKTOP_DATABASE_DIR}
+   eend $?
+}
+
+# @FUNCTION: xdg_mimeinfo_savelist
+# @DESCRIPTION:
+# Find the mime information files about to be installed and save their location
+# in the XDG_ECLASS_MIMEINFOFILES environment variable.
+# This function should be called from pkg_preinst.
+xdg_mimeinfo_savelist() {
+   pushd ${D}  /dev/null
+   export XDG_ECLASS_MIMEINFOFILES=$(find 'usr/share/mime' -type f 2 
/dev/null)
+   popd  /dev/null
+}
+
+# @FUNCTION: xdg_mimeinfo_database_update
+# @DESCRIPTION:
+# Update the mime database.
+# Creates a general list of mime types from several sources
+xdg_mimeinfo_database_update() {
+   local updater=${EROOT}${MIMEINFO_DATABASE_UPDATE_BIN}
+
+   if [[ ! -x ${updater} ]] ; then
+   debug-print ${updater} is not executable
+   return
+   fi
+
+   if [[ -z ${XDG_ECLASS_MIMEINFOFILES} ]]; then
+   debug-print No mime info files to add to database
+   return
+   fi
+
+   ebegin Updating shared mime info database ...
+   ${updater} ${EROOT}${MIMEINFO_DATABASE_DIR}
+   eend $?
+}

diff --git a/eclass/xdg.eclass b/eclass/xdg.eclass
new file mode 100644
index 000..af5fa8a
--- /dev/null
+++ 

[gentoo-commits] proj/gnome:master commit in: eclass/

2015-05-25 Thread Gilles Dartiguelongue
commit: f1f7e5b963209fefcc2acc77261dd7eb69700165
Author: Gilles Dartiguelongue eva AT gentoo DOT org
AuthorDate: Mon May 25 16:07:47 2015 +
Commit: Gilles Dartiguelongue eva AT gentoo DOT org
CommitDate: Mon May 25 16:07:47 2015 +
URL:https://gitweb.gentoo.org/proj/gnome.git/commit/?id=f1f7e5b9

eclass/gnome2.eclass: switch to xdg eclass

 eclass/gnome2-utils.eclass | 12 
 eclass/gnome2.eclass   | 11 ++-
 2 files changed, 6 insertions(+), 17 deletions(-)

diff --git a/eclass/gnome2-utils.eclass b/eclass/gnome2-utils.eclass
index 4c7d0c8..650c57d 100644
--- a/eclass/gnome2-utils.eclass
+++ b/eclass/gnome2-utils.eclass
@@ -95,18 +95,6 @@ gnome2_environment_reset() {
 
# GST_REGISTRY is to work around gst utilities trying to read/write 
/root
export GST_REGISTRY=${T}/registry.xml
-
-   # XXX: code for resetting XDG_* directories should probably be moved 
into
-   # a separate function in a non-gnome eclass
-   export XDG_DATA_HOME=${T}/.local/share
-   export XDG_CONFIG_HOME=${T}/.config
-   export XDG_CACHE_HOME=${T}/.cache
-   export XDG_RUNTIME_DIR=${T}/run
-   mkdir -p ${XDG_DATA_HOME} ${XDG_CONFIG_HOME} ${XDG_CACHE_HOME} \
-   ${XDG_RUNTIME_DIR}
-   # This directory needs to be owned by the user, and chmod 0700
-   # http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
-   chmod 0700 ${XDG_RUNTIME_DIR}
 }
 
 # @FUNCTION: gnome2_gconf_savelist

diff --git a/eclass/gnome2.eclass b/eclass/gnome2.eclass
index 9d1730d..7fc3423 100644
--- a/eclass/gnome2.eclass
+++ b/eclass/gnome2.eclass
@@ -10,7 +10,7 @@
 # Exports portage base functions used by ebuilds written for packages using the
 # GNOME framework. For additional functions, see gnome2-utils.eclass.
 
-inherit eutils fdo-mime libtool gnome.org gnome2-utils
+inherit eutils libtool gnome.org gnome2-utils xdg
 
 case ${EAPI:-0} in
4|5)
@@ -75,6 +75,8 @@ gnome2_src_unpack() {
 # Prepare environment for build, fix build of scrollkeeper documentation,
 # run elibtoolize.
 gnome2_src_prepare() {
+   xdg_src_prepare
+
# Prevent assorted access violations and test failures
gnome2_environment_reset
 
@@ -239,6 +241,7 @@ gnome2_src_install() {
 # @DESCRIPTION:
 # Finds Icons, GConf and GSettings schemas for later handling in pkg_postinst
 gnome2_pkg_preinst() {
+   xdg_pkg_preinst
gnome2_gconf_savelist
gnome2_icon_savelist
gnome2_schemas_savelist
@@ -251,9 +254,8 @@ gnome2_pkg_preinst() {
 # Handle scrollkeeper, GConf, GSettings, Icons, desktop and mime
 # database updates.
 gnome2_pkg_postinst() {
+   xdg_pkg_postinst
gnome2_gconf_install
-   fdo-mime_desktop_database_update
-   fdo-mime_mime_database_update
gnome2_icon_cache_update
gnome2_schemas_update
gnome2_scrollkeeper_update
@@ -276,8 +278,7 @@ gnome2_pkg_postinst() {
 # @DESCRIPTION:
 # Handle scrollkeeper, GSettings, Icons, desktop and mime database updates.
 gnome2_pkg_postrm() {
-   fdo-mime_desktop_database_update
-   fdo-mime_mime_database_update
+   xdg_pkg_postrm
gnome2_icon_cache_update
gnome2_schemas_update
gnome2_scrollkeeper_update



[gentoo-commits] proj/gnome:master commit in: eclass/

2015-05-24 Thread Gilles Dartiguelongue
commit: a587649916a3aec02884cff22128493143f64f4d
Author: Gilles Dartiguelongue eva AT gentoo DOT org
AuthorDate: Sun May 24 14:49:24 2015 +
Commit: Gilles Dartiguelongue eva AT gentoo DOT org
CommitDate: Sun May 24 16:32:36 2015 +
URL:https://gitweb.gentoo.org/proj/gnome.git/commit/?id=a5876499

eclass: import multibuild.eclass

 eclass/multibuild.eclass | 269 +++
 1 file changed, 269 insertions(+)

diff --git a/eclass/multibuild.eclass b/eclass/multibuild.eclass
new file mode 100644
index 000..d9a86e9
--- /dev/null
+++ b/eclass/multibuild.eclass
@@ -0,0 +1,269 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/eclass/multibuild.eclass,v 1.20 2014/12/13 
08:42:42 mgorny Exp $
+
+# @ECLASS: multibuild
+# @MAINTAINER:
+# Michał Górny mgo...@gentoo.org
+# @AUTHOR:
+# Author: Michał Górny mgo...@gentoo.org
+# @BLURB: A generic eclass for building multiple variants of packages.
+# @DESCRIPTION:
+# The multibuild eclass aims to provide a generic framework for building
+# multiple 'variants' of a package (e.g. multilib, Python
+# implementations).
+
+case ${EAPI:-0} in
+   0|1|2|3)
+   die Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}
+   ;;
+   4|5)
+   ;;
+   *)
+   die Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}
+   ;;
+esac
+
+if [[ ! ${_MULTIBUILD} ]]; then
+
+# @ECLASS-VARIABLE: MULTIBUILD_VARIANTS
+# @DESCRIPTION:
+# An array specifying all enabled variants which multibuild_foreach*
+# can execute the process for.
+#
+# In ebuild, it can be set in global scope. Eclasses should set it
+# locally in function scope to support nesting properly.
+#
+# Example:
+# @CODE
+# python_foreach_impl() {
+#  local MULTIBUILD_VARIANTS=( python{2_5,2_6,2_7} ... )
+#  multibuild_foreach_variant python_compile
+# }
+# @CODE
+
+# @ECLASS-VARIABLE: MULTIBUILD_VARIANT
+# @DESCRIPTION:
+# The current variant which the function was executed for.
+#
+# Example value:
+# @CODE
+# python2_6
+# @CODE
+
+# @ECLASS-VARIABLE: MULTIBUILD_ID
+# @DESCRIPTION:
+# The unique identifier for a multibuild run. In a simple run, it is
+# equal to MULTIBUILD_VARIANT. In a nested multibuild environment, it
+# contains the complete selection tree.
+#
+# It can be used to create variant-unique directories and files.
+#
+# Example value:
+# @CODE
+# amd64-double
+# @CODE
+
+# @ECLASS-VARIABLE: BUILD_DIR
+# @DESCRIPTION:
+# The current build directory. In global scope, it is supposed
+# to contain an 'initial' build directory. If unset, ${S} is used.
+#
+# multibuild_foreach_variant() sets BUILD_DIR locally
+# to variant-specific build directories based on the initial value
+# of BUILD_DIR.
+#
+# Example value:
+# @CODE
+# ${WORKDIR}/foo-1.3-python2_6
+# @CODE
+
+# @FUNCTION: multibuild_foreach_variant
+# @USAGE: [argv...]
+# @DESCRIPTION:
+# Run the passed command repeatedly for each of the enabled package
+# variants.
+#
+# Each of the runs will have variant-specific BUILD_DIR set, and output
+# teed to a separate log in ${T}.
+#
+# The function returns 0 if all commands return 0, or the first non-zero
+# exit status otherwise. However, it performs all the invocations
+# nevertheless. It is preferred to call 'die' inside of the passed
+# function.
+multibuild_foreach_variant() {
+   debug-print-function ${FUNCNAME} ${@}
+
+   [[ ${MULTIBUILD_VARIANTS} ]] \
+   || die MULTIBUILD_VARIANTS need to be set
+
+   local bdir=${BUILD_DIR:-${S}}
+
+   # Avoid writing outside WORKDIR if S=${WORKDIR}.
+   [[ ${bdir%%/} == ${WORKDIR%%/} ]]  bdir=${WORKDIR}/build
+
+   local prev_id=${MULTIBUILD_ID:+${MULTIBUILD_ID}-}
+   local ret=0 lret=0 v
+
+   debug-print ${FUNCNAME}: initial build_dir = ${bdir}
+
+   for v in ${MULTIBUILD_VARIANTS[@]}; do
+   local MULTIBUILD_VARIANT=${v}
+   local MULTIBUILD_ID=${prev_id}${v}
+   local BUILD_DIR=${bdir%%/}-${v}
+
+   _multibuild_run() {
+   # find the first non-private command
+   local i=1
+   while [[ ${!i} == _* ]]; do
+   (( i += 1 ))
+   done
+
+   [[ ${i} -le ${#} ]]  einfo ${v}: running ${@:${i}}
+   ${@}
+   }
+
+   _multibuild_run ${@} \
+(exec tee -a ${T}/build-${MULTIBUILD_ID}.log) 21
+   lret=${?}
+   done
+   [[ ${ret} -eq 0  ${lret} -ne 0 ]]  ret=${lret}
+
+   return ${ret}
+}
+
+# @FUNCTION: multibuild_parallel_foreach_variant
+# @USAGE: [argv...]
+# @DESCRIPTION:
+# Run the passed command repeatedly for each of the enabled package
+# variants. This used to run the commands in parallel but now it's
+# just a deprecated alias to 

[gentoo-commits] proj/gnome:master commit in: eclass/

2015-05-24 Thread Gilles Dartiguelongue
commit: a6623741bbd2f45976d9445d3c28acf26113f8e5
Author: Michał Górny mgorny AT gentoo DOT org
AuthorDate: Thu Sep  4 13:44:03 2014 +
Commit: Gilles Dartiguelongue eva AT gentoo DOT org
CommitDate: Sun May 24 16:32:40 2015 +
URL:https://gitweb.gentoo.org/proj/gnome.git/commit/?id=a6623741

multibuild.eclass: supporting introspecting all layers of nested multibuild

Transform MULTIBUILD_VARIANT, MULTIBUILD_ID and BUILD_DIR into arrays
preserving values for each nested multibuild layer. For example, if you
do something like:

  MULTIBUILD_VARIANTS=( a b c )
  multibuild_foreach_variant multilib_foreach_abi python_foreach_impl ..

then the function called last would have:

  MULTIBUILD_VARIANT=( python2.7 abi_x86_64.amd64 a )
  MULTIBUILD_ID=( a-abi_x86_64.amd64-python2.7 a-abi_x86_64.amd64 a )

and BUILD_DIR alike it. Which means that using ${MULTIBUILD_VARIANT[2]}
you can get your initial 'a' without having to copy intermediate values.

Of course, if you want to nest multibuild you still need to ensure to
set proper MULTIBUILD_VARIANTS in the scope of multibuild_foreach*
invocation.

And before you start to worry, this is fully backwards-compatible.
In bash, ${MULTIBUILD_VARIANT} is equivalent to ${MULTIBUILD_VARIANT[0]}
in context of an array, and since index 0 stores deepmost value ---
nothing changes :).

Fixes: https://bugs.gentoo.org/show_bug.cgi?id=483758

 eclass/multibuild.eclass | 18 +++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/eclass/multibuild.eclass b/eclass/multibuild.eclass
index d9a86e9..a236894 100644
--- a/eclass/multibuild.eclass
+++ b/eclass/multibuild.eclass
@@ -46,6 +46,10 @@ if [[ ! ${_MULTIBUILD} ]]; then
 # @DESCRIPTION:
 # The current variant which the function was executed for.
 #
+# If nested multibuilds are used, this value can be an array. In that
+# case, the first element will name the deepest multibuild, and the next
+# elements will go outwards.
+#
 # Example value:
 # @CODE
 # python2_6
@@ -59,6 +63,10 @@ if [[ ! ${_MULTIBUILD} ]]; then
 #
 # It can be used to create variant-unique directories and files.
 #
+# If nested multibuilds are used, this value can be an array. In that
+# case, the first element will name the deepest multibuild, and the next
+# elements will go outwards.
+#
 # Example value:
 # @CODE
 # amd64-double
@@ -73,6 +81,10 @@ if [[ ! ${_MULTIBUILD} ]]; then
 # to variant-specific build directories based on the initial value
 # of BUILD_DIR.
 #
+# If nested multibuilds are used, this value can be an array. In that
+# case, the first element will name the deepest multibuild, and the next
+# elements will go outwards.
+#
 # Example value:
 # @CODE
 # ${WORKDIR}/foo-1.3-python2_6
@@ -108,9 +120,9 @@ multibuild_foreach_variant() {
debug-print ${FUNCNAME}: initial build_dir = ${bdir}
 
for v in ${MULTIBUILD_VARIANTS[@]}; do
-   local MULTIBUILD_VARIANT=${v}
-   local MULTIBUILD_ID=${prev_id}${v}
-   local BUILD_DIR=${bdir%%/}-${v}
+   local MULTIBUILD_VARIANT=( ${v} ${MULTIBUILD_VARIANT[@]} )
+   local MULTIBUILD_ID=( ${prev_id}${v} ${MULTIBUILD_ID[@]} )
+   local BUILD_DIR=( ${bdir%%/}-${v} ${BUILD_DIR[@]} )
 
_multibuild_run() {
# find the first non-private command



[gentoo-commits] proj/gnome:master commit in: eclass/

2015-05-10 Thread Gilles Dartiguelongue
commit: 4228c2db83d2710605adade9f5d531f66481c7d0
Author: Gilles Dartiguelongue eva AT gentoo DOT org
AuthorDate: Sun May 10 21:26:25 2015 +
Commit: Gilles Dartiguelongue eva AT gentoo DOT org
CommitDate: Sun May 10 21:26:25 2015 +
URL:https://gitweb.gentoo.org/proj/gnome.git/commit/?id=4228c2db

eclass/gnome2.eclass: move QA warnings to src_configure

Having them in global scope does not work as expected and src_configure
is a better place to be sure to catch all usage of these anyway.

 eclass/gnome2.eclass | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/eclass/gnome2.eclass b/eclass/gnome2.eclass
index 9225355..9d1730d 100644
--- a/eclass/gnome2.eclass
+++ b/eclass/gnome2.eclass
@@ -26,11 +26,6 @@ esac
 # Extra configure opts passed to econf
 G2CONF=${G2CONF:-}
 
-# Deprecated for a long time now, see Gnome team policies
-if [[ -n ${G2CONF} ]] ; then
-   eqawarn G2CONF set, please review documentation at 
https://wiki.gentoo.org/wiki/Project:GNOME/Gnome_Team_Ebuild_Policies#G2CONF_and_src_configure;
-fi
-
 # @ECLASS-VARIABLE: GNOME2_LA_PUNT
 # @DESCRIPTION:
 # Should we delete ALL the .la files?
@@ -67,11 +62,6 @@ if [[ ${GCONF_DEBUG} != no ]]; then
IUSE=debug
 fi
 
-# Need to catch all offenders before switching behavior
-if [[ -z ${GCONF_DEBUG} ]] ; then
-   eqawarn GCONF_DEBUG not set, please review documentation at 
https://wiki.gentoo.org/wiki/Project:GNOME/Gnome_Team_Ebuild_Policies#GCONF_DEBUG;
-fi
-
 # @FUNCTION: gnome2_src_unpack
 # @DESCRIPTION:
 # Stub function for old EAPI.
@@ -103,6 +93,16 @@ gnome2_src_prepare() {
 # @DESCRIPTION:
 # Gnome specific configure handling
 gnome2_src_configure() {
+   # Need to catch all offenders before switching behavior
+   if [[ -z ${GCONF_DEBUG} ]] ; then
+   eqawarn GCONF_DEBUG not set, please review documentation at 
https://wiki.gentoo.org/wiki/Project:GNOME/Gnome_Team_Ebuild_Policies#GCONF_DEBUG;
+   fi
+
+   # Deprecated for a long time now, see Gnome team policies
+   if [[ -n ${G2CONF} ]] ; then
+   eqawarn G2CONF set, please review documentation at 
https://wiki.gentoo.org/wiki/Project:GNOME/Gnome_Team_Ebuild_Policies#G2CONF_and_src_configure;
+   fi
+
local g2conf=()
 
# Update the GNOME configuration options



[gentoo-commits] proj/gnome:master commit in: eclass/

2014-11-23 Thread Remi Cardona
commit: 3099078f4416d9805ffc341fd7d023256ceba1dc
Author: Rémi Cardona remi AT gentoo DOT org
AuthorDate: Sun Nov 23 22:32:01 2014 +
Commit: Remi Cardona remi AT gentoo DOT org
CommitDate: Sun Nov 23 22:32:40 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=3099078f

eclass: sync with portage

---
 eclass/gnome2-utils.eclass | 37 -
 eclass/gnome2.eclass   | 35 +++
 eclass/vala.eclass |  6 +++---
 3 files changed, 18 insertions(+), 60 deletions(-)

diff --git a/eclass/gnome2-utils.eclass b/eclass/gnome2-utils.eclass
index 3ec3c4d..4c7d0c8 100644
--- a/eclass/gnome2-utils.eclass
+++ b/eclass/gnome2-utils.eclass
@@ -439,39 +439,15 @@ gnome2_gdk_pixbuf_update() {
eend $?
 }
 
-
 # @FUNCTION: gnome2_query_immodules_gtk2
 # @USAGE: gnome2_query_immodules_gtk2
 # @DESCRIPTION:
 # Updates gtk2 immodules/gdk-pixbuf loaders listing.
 gnome2_query_immodules_gtk2() {
-   if has_version =x11-libs/gtk+-2.24.20:2; then
-   ${EPREFIX}/usr/bin/gtk-query-immodules-2.0 --update-cache
-   else
-   local GTK2_CONFDIR=/etc/gtk-2.0/$(get_abi_CHOST)
-
-   local query_exec=${EPREFIX}/usr/bin/gtk-query-immodules-2.0
-   local gtk_conf=${EPREFIX}${GTK2_CONFDIR}/gtk.immodules
-   local gtk_conf_dir=$(dirname ${gtk_conf})
-
-   einfo Generating Gtk2 immodules/gdk-pixbuf loaders listing:
-   einfo - ${gtk_conf}
-
-   mkdir -p ${gtk_conf_dir}
-   local tmp_file=$(mktemp -t tmp.XXgtk_query_immodules)
-   if [ -z ${tmp_file} ]; then
-   ewarn gtk_query_immodules: cannot create temporary 
file
-   return 1
-   fi
+   local updater=${EPREFIX}/usr/bin/${CHOST}-gtk-query-immodules-2.0
+   [[ ! -x ${updater} ]]  
updater=${EPREFIX}/usr/bin/gtk-query-immodules-2.0
 
-   if ${query_exec}  ${tmp_file}; then
-   cat ${tmp_file}  ${gtk_conf} || \
-   ewarn Failed to write to ${gtk_conf}
-   else
-   ewarn Cannot update gtk.immodules, file generation 
failed
-   fi
-   rm ${tmp_file}
-   fi
+   ${updater} --update-cache
 }
 
 # @FUNCTION: gnome2_query_immodules_gtk3
@@ -479,7 +455,10 @@ gnome2_query_immodules_gtk2() {
 # @DESCRIPTION:
 # Updates gtk3 immodules/gdk-pixbuf loaders listing.
 gnome2_query_immodules_gtk3() {
-   ${EPREFIX}/usr/bin/gtk-query-immodules-3.0 --update-cache
+   local updater=${EPREFIX}/usr/bin/${CHOST}-gtk-query-immodules-3.0
+   [[ ! -x ${updater} ]]  
updater=${EPREFIX}/usr/bin/gtk-query-immodules-3.0
+
+   ${updater} --update-cache
 }
 
 # @FUNCTION: gnome2_disable_deprecation_warning
@@ -501,7 +480,7 @@ gnome2_disable_deprecation_warning() {
 
LC_ALL=C sed -r -i \
-e 's:-D[A-Z_]+_DISABLE_DEPRECATED:$(NULL):g' \
-   -e 's:-DGSEAL_ENABLE:$(NULL):g' \
+   -e 's:-DGSEAL_ENABLE+[A-Z_]:$(NULL):g' \
-i ${makefile}
 
if [[ $? -ne 0 ]]; then

diff --git a/eclass/gnome2.eclass b/eclass/gnome2.eclass
index 24635a9..f77dace 100644
--- a/eclass/gnome2.eclass
+++ b/eclass/gnome2.eclass
@@ -14,6 +14,13 @@ inherit eutils fdo-mime libtool gnome.org gnome2-utils
 
 case ${EAPI:-0} in
0|1)
+   eqawarn
+   eqawarn ${CATEGORY}/${PF}: EAPI 0/1 support is now deprecated.
+   eqawarn If you are the package maintainer, please
+   eqawarn update this package to a newer EAPI.
+   eqawarn Support for EAPIs 0 and 1 for gnome2.eclass will be 
dropped
+   eqawarn in a month (around 23rd December).
+   eqawarn
EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_preinst 
pkg_postinst pkg_postrm
;;
2|3|4|5)
@@ -22,23 +29,6 @@ case ${EAPI:-0} in
*) die EAPI=${EAPI} is not supported ;;
 esac
 
-#if [[ ${I_WANT_GNOME_3_3_X} != yes ]]; then
-#  die 
-#
-#The GNOME overlay is switching to GNOME 3.3.x prerelease packages.
-#These are unstable, potentially incompatible with 3.2, and may well
-#break your system in intriguing ways.
-#
-#If you enabled the GNOME overlay to get GNOME 3.2, please disable
-#it now, since GNOME 3.2 is already in portage and unmasked.
-#
-#If you really do want experimental GNOME 3.3.x, please add
-#I_WANT_GNOME_3_3_X=yes
-#to your /etc/make.conf and continue.
-#
-#
-#fi
-
 # @ECLASS-VARIABLE: G2CONF
 # @DEFAULT_UNSET
 # @DESCRIPTION:
@@ -102,17 +92,6 @@ gnome2_src_unpack() {
 # Prepare environment for build, fix build of scrollkeeper documentation,
 # run elibtoolize.
 gnome2_src_prepare() {
-   # Reset various variables inherited via the environment.
-   # Causes test failures, 

[gentoo-commits] proj/gnome:master commit in: eclass/

2014-11-03 Thread Gilles Dartiguelongue
commit: f936ed1f9bd63c94d5ef25a6c67e89f59a807828
Author: Gilles Dartiguelongue eva AT gentoo DOT org
AuthorDate: Mon Nov  3 23:06:59 2014 +
Commit: Gilles Dartiguelongue eva AT gentoo DOT org
CommitDate: Mon Nov  3 23:06:59 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=f936ed1f

eclass/gnome2-live.eclass: enable epatch_user

Will ease users life when testing out live tree.

---
 eclass/gnome2-live.eclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/eclass/gnome2-live.eclass b/eclass/gnome2-live.eclass
index 286c6ee..627f93e 100644
--- a/eclass/gnome2-live.eclass
+++ b/eclass/gnome2-live.eclass
@@ -14,7 +14,7 @@
 # Always to be imported *AFTER* gnome2.eclass
 #
 
-inherit autotools gnome2 gnome2-utils libtool git-r3
+inherit autotools eutils gnome2 gnome2-utils libtool git-r3
 
 # Stolen from git.eclass
 EXPORTED_FUNCTIONS=src_unpack pkg_postinst
@@ -92,6 +92,8 @@ gnome2-live_src_prepare() {
epatch ${i}
done
 
+   epatch_user
+
# If ChangeLog doesn't exist, maybe it's autogenerated
# Avoid a `dodoc` failure by adding an empty ChangeLog
if ! test -e ChangeLog; then



[gentoo-commits] proj/gnome:master commit in: eclass/

2014-11-03 Thread Gilles Dartiguelongue
commit: aa7722c3d97d1bfea987ff74fba2b35ae278d046
Author: Gilles Dartiguelongue eva AT gentoo DOT org
AuthorDate: Mon Nov  3 23:11:32 2014 +
Commit: Gilles Dartiguelongue eva AT gentoo DOT org
CommitDate: Mon Nov  3 23:11:32 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=aa7722c3

eclass/gnome2-utils.eclass: sync with gentoo-x86

Support for multilib gdk-pixbuf.

---
 eclass/gnome2-utils.eclass | 21 ++---
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/eclass/gnome2-utils.eclass b/eclass/gnome2-utils.eclass
index a70e322..3ec3c4d 100644
--- a/eclass/gnome2-utils.eclass
+++ b/eclass/gnome2-utils.eclass
@@ -1,6 +1,6 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/gnome2-utils.eclass,v 1.33 
2013/09/15 19:29:11 pacho Exp $
+# $Header: $
 
 # @ECLASS: gnome2-utils.eclass
 # @MAINTAINER:
@@ -52,12 +52,6 @@ esac
 # Path to glib-compile-schemas
 : ${GLIB_COMPILE_SCHEMAS:=/usr/bin/glib-compile-schemas}
 
-# @ECLASS-VARIABLE: GDK_PIXBUF_UPDATE_BIN
-# @INTERNAL
-# @DESCRIPTION:
-# Path to gdk-pixbuf-query-loaders
-: ${GDK_PIXBUF_UPDATE_BIN:=/usr/bin/gdk-pixbuf-query-loaders}
-
 # @ECLASS-VARIABLE: GNOME2_ECLASS_SCHEMAS
 # @INTERNAL
 # @DEFAULT_UNSET
@@ -409,7 +403,7 @@ gnome2_schemas_update() {
 gnome2_gdk_pixbuf_savelist() {
has ${EAPI:-0} 0 1 2  ! use prefix  ED=${D}
pushd ${ED} 1/dev/null
-   export GNOME2_ECLASS_GDK_PIXBUF_LOADERS=$(find 
usr/$(get_libdir)/gdk-pixbuf-2.0 -type f 2/dev/null)
+   export GNOME2_ECLASS_GDK_PIXBUF_LOADERS=$(find usr/lib*/gdk-pixbuf-2.0 
-type f 2/dev/null)
popd 1/dev/null
 }
 
@@ -420,7 +414,11 @@ gnome2_gdk_pixbuf_savelist() {
 # This function should be called from pkg_postinst and pkg_postrm.
 gnome2_gdk_pixbuf_update() {
has ${EAPI:-0} 0 1 2  ! use prefix  EROOT=${ROOT}
-   local updater=${EROOT}${GDK_PIXBUF_UPDATE_BIN}
+   local updater=${EROOT}/usr/bin/${CHOST}-gdk-pixbuf-query-loaders
+
+   if [[ ! -x ${updater} ]]; then
+   updater=${EROOT}/usr/bin/gdk-pixbuf-query-loaders
+   fi
 
if [[ ! -x ${updater} ]]; then
debug-print ${updater} is not executable
@@ -436,7 +434,8 @@ gnome2_gdk_pixbuf_update() {
local tmp_file=$(mktemp -t tmp.XX_gdkpixbuf)
${updater} 1 ${tmp_file} 
chmod 0644 ${tmp_file} 
-   mv -f ${tmp_file} 
${EROOT}usr/$(get_libdir)/gdk-pixbuf-2.0/2.10.0/loaders.cache
+   cp -f ${tmp_file} 
${EROOT}usr/$(get_libdir)/gdk-pixbuf-2.0/2.10.0/loaders.cache 
+   rm ${tmp_file} # don't replace this with mv, required for SELinux 
support
eend $?
 }
 



[gentoo-commits] proj/gnome:master commit in: eclass/

2014-11-03 Thread Gilles Dartiguelongue
commit: a1b31140f22020e06651500b999ebd39d0653419
Author: Gilles Dartiguelongue eva AT gentoo DOT org
AuthorDate: Mon Nov  3 23:08:36 2014 +
Commit: Gilles Dartiguelongue eva AT gentoo DOT org
CommitDate: Mon Nov  3 23:08:36 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=a1b31140

eclass/gnome2-live.eclass: sync bits with gnome2.eclass

---
 eclass/gnome2-live.eclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/eclass/gnome2-live.eclass b/eclass/gnome2-live.eclass
index 1a32b2a..f01dea0 100644
--- a/eclass/gnome2-live.eclass
+++ b/eclass/gnome2-live.eclass
@@ -109,6 +109,9 @@ gnome2-live_src_prepare() {
# causes test and introspection-building failures
unset DBUS_SESSION_BUS_ADDRESS
 
+   # Prevent assorted access violations and test failures
+   gnome2_environment_reset
+
# Prevent scrollkeeper access violations
gnome2_omf_fix
 



[gentoo-commits] proj/gnome:master commit in: eclass/

2014-11-03 Thread Gilles Dartiguelongue
commit: 1dc3e93d1d1aab43e5cea648336785a17010260b
Author: Gilles Dartiguelongue eva AT gentoo DOT org
AuthorDate: Mon Nov  3 23:05:55 2014 +
Commit: Gilles Dartiguelongue eva AT gentoo DOT org
CommitDate: Mon Nov  3 23:05:55 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=1dc3e93d

eclass/gnome2-live.eclass: switch to git-r3

Seems to work just fine and has submodule checkout working out of the
box which should fix bug #508964.

---
 eclass/gnome2-live.eclass | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/eclass/gnome2-live.eclass b/eclass/gnome2-live.eclass
index 11424ef..286c6ee 100644
--- a/eclass/gnome2-live.eclass
+++ b/eclass/gnome2-live.eclass
@@ -14,7 +14,7 @@
 # Always to be imported *AFTER* gnome2.eclass
 #
 
-inherit autotools gnome2 gnome2-utils libtool git-2
+inherit autotools gnome2 gnome2-utils libtool git-r3
 
 # Stolen from git.eclass
 EXPORTED_FUNCTIONS=src_unpack pkg_postinst
@@ -78,7 +78,7 @@ gnome2-live_src_unpack() {
if test -n ${A}; then
unpack ${A}
fi
-   git-2_src_unpack
+   git-r3_src_unpack
has src_prepare ${EXPORTED_FUNCTIONS} || gnome2-live_src_prepare
 }
 
@@ -88,9 +88,6 @@ gnome2-live_src_unpack() {
 # Creates blank ChangeLog and necessary macro dirs. Runs various autotools
 # programs if required, and finally runs eautoreconf.
 gnome2-live_src_prepare() {
-   # Blame git.eclass
-   cd ${S}
-
for i in ${PATCHES}; do
epatch ${i}
done



[gentoo-commits] proj/gnome:master commit in: eclass/

2014-11-03 Thread Gilles Dartiguelongue
commit: 3506e079c6d3da91ea7a0b501a1d13616eff0c34
Author: Gilles Dartiguelongue eva AT gentoo DOT org
AuthorDate: Mon Nov  3 23:07:36 2014 +
Commit: Gilles Dartiguelongue eva AT gentoo DOT org
CommitDate: Mon Nov  3 23:07:36 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=3506e079

eclass/gnome2-live.eclass: use eautoreconf power

Someone (I think flameeyes) made eautoreconf do this for us a few months
ago. Let us just use it and be happy.

---
 eclass/gnome2-live.eclass | 55 ++-
 1 file changed, 2 insertions(+), 53 deletions(-)

diff --git a/eclass/gnome2-live.eclass b/eclass/gnome2-live.eclass
index 627f93e..1a32b2a 100644
--- a/eclass/gnome2-live.eclass
+++ b/eclass/gnome2-live.eclass
@@ -100,59 +100,8 @@ gnome2-live_src_prepare() {
echo  ChangeLog
fi
 
-   # Find and create macro dirs
-   local macro_dirs=($(gnome2-live_get_var AC_CONFIG_MACRO_DIR 
configure.*))
-   for i in ${macro_dirs[@]}; do
-   mkdir -p $i
-   done
-
-   # We don't run gettextize because that does too much stuff
-   if grep -qe 'GETTEXT' configure.*; then
-   # Generate po/Makefile.in.in if it doesn't exist for packages 
that use
-   # AM_GNU_GETTEXT and AM_GNU_GETTEXT_VERSION (e.g. 
media-libs/cogl).
-   # Logic is inspired by gnome-autogen.sh
-   if ! grep -qe '^AM_GLIB_GNU_GETTEXT' configure.* 
-  grep -qe '^AM_GNU_GETTEXT_VERSION' configure.* 
-  [[ -d po  ! -e po/Makefile.in.in  ! -e po/Makefile.am 
]]; then
-   eautopoint --force
-   fi
-   local aux_dir=${S}/$(gnome2-live_get_var AC_CONFIG_AUX_DIR 
configure.*)
-   mkdir -p ${aux_dir}
-   test -e ${aux_dir}/config.rpath || : 
${aux_dir}/config.rpath
-   test -e ${aux_dir}/ABOUT-NLS || cp 
${ROOT}/usr/share/gettext/ABOUT-NLS ${aux_dir}
-   fi
-
-   if grep -qe 'GTK_DOC' configure.*; then
-   ebegin Running gtkdocize
-   gtkdocize
-   eend $?
-   fi
-   if grep -qe 'GNOME_DOC_INIT' configure.*; then
-   ebegin Running gnome-doc-common
-   gnome-doc-common
-   eend $?
-   ebegin Running gnome-doc-prepare --automake
-   gnome-doc-prepare --automake
-   eend $?
-   fi
-   if grep -qe IT_PROG_INTLTOOL -e AC_PROG_INTLTOOL configure.*; then
-   if grep -qe AC_PROG_INTLTOOL configure.*; then
-   eqawarn This package is using deprecated 
AC_PROG_INTLTOOL macro.
-   eqawarn Please fill a bug to the upstream of this 
package.
-   fi
-   ebegin Running intltoolize --force
-   intltoolize --force
-   eend $?
-   fi
-   if test -e m4; then
-   AT_M4DIR=m4 eautoreconf
-   else
-   eautoreconf
-   fi
-
-   # Disable pyc compiling. Doesn't harm if DNE
-   echo  py-compile
-   chmod +x py-compile
+   # eautoreconf is smart enough to run all necessary commands
+   eautoreconf
 
### Keep this in-sync with gnome2.eclass!
 



[gentoo-commits] proj/gnome:master commit in: eclass/

2014-11-03 Thread Gilles Dartiguelongue
commit: 33350aa465751806b3a3aab344aead4ccb07f682
Author: Gilles Dartiguelongue eva AT gentoo DOT org
AuthorDate: Mon Nov  3 23:12:17 2014 +
Commit: Gilles Dartiguelongue eva AT gentoo DOT org
CommitDate: Mon Nov  3 23:12:17 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=33350aa4

eclass/vala.eclass: sync with gentoo-x86

Invalid slot filtering.

---
 eclass/vala.eclass | 16 ++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/eclass/vala.eclass b/eclass/vala.eclass
index c2c6282..8ac199a 100644
--- a/eclass/vala.eclass
+++ b/eclass/vala.eclass
@@ -1,6 +1,6 @@
 # Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/vala.eclass,v 1.8 2014/05/04 
06:13:55 tetromino Exp $
+# $Header: $
 
 # @ECLASS: vala.eclass
 # @MAINTAINER:
@@ -44,7 +44,19 @@ VALA_MAX_API_VERSION=${VALA_MAX_API_VERSION:-0.26}
 # Outputs a list of vala API versions from VALA_MAX_API_VERSION down to
 # VALA_MIN_API_VERSION.
 vala_api_versions() {
-   eval echo 
0.{${VALA_MAX_API_VERSION#0.}..${VALA_MIN_API_VERSION#0.}..2}
+   [[ ${VALA_MIN_API_VERSION} =~ ^0\.[[:digit:]]+$ ]] || die Invalid 
syntax of VALA_MIN_API_VERSION
+   [[ ${VALA_MAX_API_VERSION} =~ ^0\.[[:digit:]]+$ ]] || die Invalid 
syntax of VALA_MAX_API_VERSION
+
+   local minimal_supported_minor_version minor_version
+
+   # Dependency atoms are not generated for Vala versions older than 
0.${minimal_supported_minor_version}.
+   minimal_supported_minor_version=18
+
+   for ((minor_version = ${VALA_MAX_API_VERSION#*.}; minor_version = 
${VALA_MIN_API_VERSION#*.}; minor_version = minor_version - 2)); do
+   if ((minor_version = minimal_supported_minor_version)); then
+   echo 0.${minor_version}
+   fi
+   done
 }
 
 # @FUNCTION: vala_depend



[gentoo-commits] proj/gnome:master commit in: eclass/

2014-11-02 Thread Gilles Dartiguelongue
commit: f793496cbf2ce2827019e775c75c99397945e718
Author: Gilles Dartiguelongue eva AT gentoo DOT org
AuthorDate: Sun Nov  2 14:08:55 2014 +
Commit: Gilles Dartiguelongue eva AT gentoo DOT org
CommitDate: Sun Nov  2 14:08:55 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=f793496c

eclass/vala.eclass: use on-if-missing USE flag notation

As discussed on the mail alias.

---
 eclass/vala.eclass | 16 
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/eclass/vala.eclass b/eclass/vala.eclass
index 38feda2..c2c6282 100644
--- a/eclass/vala.eclass
+++ b/eclass/vala.eclass
@@ -53,15 +53,11 @@ vala_api_versions() {
 # VALA_MIN_API_VERSION
 vala_depend() {
local u v versions=$(vala_api_versions)
-   [[ ${VALA_USE_DEPEND} ]]  u=[${VALA_USE_DEPEND}]
+   [[ ${VALA_USE_DEPEND} ]]  u=[${VALA_USE_DEPEND}(+)]
 
echo -n || (
for v in ${versions}; do
-   if [[ $v = 0.26 ]]; then
-   echo -n  dev-lang/vala:${v}
-   else
-   echo -n  dev-lang/vala:${v}${u}
-   fi
+   echo -n  dev-lang/vala:${v}${u}
done
echo  )
 }
@@ -72,13 +68,9 @@ vala_depend() {
 # VALA_MAX_API_VERSION, VALA_MIN_API_VERSION, and VALA_USE_DEPEND.
 vala_best_api_version() {
local u v
-   [[ ${VALA_USE_DEPEND} ]]  u=[${VALA_USE_DEPEND}]
+   [[ ${VALA_USE_DEPEND} ]]  u=[${VALA_USE_DEPEND}(+)]
for v in $(vala_api_versions); do
-   if [[ $v = 0.26 ]]; then
-   has_version dev-lang/vala:${v}  echo ${v}  
return
-   else
-   has_version dev-lang/vala:${v}${u}  echo ${v}  
return
-   fi
+   has_version dev-lang/vala:${v}${u}  echo ${v}  return
done
 }
 



[gentoo-commits] proj/gnome:master commit in: eclass/

2014-04-20 Thread Gilles Dartiguelongue
commit: d214c68e9c43c08bf998ea34c9b4faa42ca82586
Author: Gilles Dartiguelongue eva AT gentoo DOT org
AuthorDate: Sun Apr 20 20:15:41 2014 +
Commit: Gilles Dartiguelongue eva AT gentoo DOT org
CommitDate: Sun Apr 20 22:54:52 2014 +
URL:
http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=d214c68e

eclass/gnome2.eclass: sync with gentoo-x86

---
 eclass/gnome2.eclass | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/eclass/gnome2.eclass b/eclass/gnome2.eclass
index af95a5b..24635a9 100644
--- a/eclass/gnome2.eclass
+++ b/eclass/gnome2.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Header: $
 
@@ -191,6 +191,11 @@ gnome2_src_configure() {
G2CONF=--enable-compile-warnings=minimum ${G2CONF}
fi
 
+   # Pass --docdir with proper directory, bug #482646
+   if grep -q ^ *--docdir= ${ECONF_SOURCE:-.}/configure; then
+   G2CONF=--docdir=${EPREFIX}/usr/share/doc/${PF} ${G2CONF}
+   fi
+
# Avoid sandbox violations caused by gnome-vfs (bug #128289 and #345659)
addwrite $(unset HOME; echo ~)/.gnome2
 



[gentoo-commits] proj/gnome:master commit in: eclass/

2014-04-20 Thread Gilles Dartiguelongue
commit: ef659445f388bb0dd8ae57609bf77ef88fa3e00f
Author: Gilles Dartiguelongue eva AT gentoo DOT org
AuthorDate: Sun Apr 20 23:42:07 2014 +
Commit: Gilles Dartiguelongue eva AT gentoo DOT org
CommitDate: Sun Apr 20 23:43:39 2014 +
URL:
http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=ef659445

eclass: add vala.eclass with 0.24 support

---
 eclass/vala.eclass | 137 +
 1 file changed, 137 insertions(+)

diff --git a/eclass/vala.eclass b/eclass/vala.eclass
new file mode 100644
index 000..b3ae5c5
--- /dev/null
+++ b/eclass/vala.eclass
@@ -0,0 +1,137 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/eclass/vala.eclass,v 1.7 2013/10/04 
22:11:54 tetromino Exp $
+
+# @ECLASS: vala.eclass
+# @MAINTAINER:
+# gn...@gentoo.org
+# @AUTHOR:
+# Alexandre Rostovtsev tetrom...@gentoo.org
+# @BLURB: Sets up the environment for using a specific version of vala.
+# @DESCRIPTION:
+# This eclass sets up commonly used environment variables for using a specific
+# version of dev-lang/vala to configure and build a package. It is needed for
+# packages whose build systems assume the existence of certain unversioned vala
+# executables, pkgconfig files, etc., which Gentoo does not provide.
+#
+# This eclass provides one phase function: src_prepare.
+
+inherit eutils multilib
+
+case ${EAPI:-0} in
+   0)  die EAPI=0 is not supported ;;
+   1)  ;;
+   *)  EXPORT_FUNCTIONS src_prepare ;;
+esac
+
+# @ECLASS-VARIABLE: VALA_MIN_API_VERSION
+# @DESCRIPTION:
+# Minimum vala API version (e.g. 0.16).
+VALA_MIN_API_VERSION=${VALA_MIN_API_VERSION:-0.10}
+
+# @ECLASS-VARIABLE: VALA_MAX_API_VERSION
+# @DESCRIPTION:
+# Maximum vala API version (e.g. 0.20).
+VALA_MAX_API_VERSION=${VALA_MAX_API_VERSION:-0.24}
+
+# @ECLASS-VARIABLE: VALA_USE_DEPEND
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# USE dependencies that vala must be built with (e.g. vapigen).
+
+# @FUNCTION: vala_api_versions
+# @DESCRIPTION:
+# Outputs a list of vala API versions from VALA_MAX_API_VERSION down to
+# VALA_MIN_API_VERSION.
+vala_api_versions() {
+   eval echo 
0.{${VALA_MAX_API_VERSION#0.}..${VALA_MIN_API_VERSION#0.}..2}
+}
+
+# @FUNCTION: vala_depend
+# @DESCRIPTION:
+# Outputs a ||-dependency string on vala from VALA_MAX_API_VERSION down to
+# VALA_MIN_API_VERSION
+vala_depend() {
+   local u v versions=$(vala_api_versions)
+   [[ ${VALA_USE_DEPEND} ]]  u=[${VALA_USE_DEPEND}]
+
+   echo -n || (
+   for v in ${versions}; do
+   echo -n  dev-lang/vala:${v}${u}
+   done
+   echo  )
+}
+
+# @FUNCTION: vala_best_api_version
+# @DESCRIPTION:
+# Returns the highest installed vala API version satisfying
+# VALA_MAX_API_VERSION, VALA_MIN_API_VERSION, and VALA_USE_DEPEND.
+vala_best_api_version() {
+   local u v
+   [[ ${VALA_USE_DEPEND} ]]  u=[${VALA_USE_DEPEND}]
+   for v in $(vala_api_versions); do
+   has_version dev-lang/vala:${v}${u}  echo ${v}  return
+   done
+}
+
+# @FUNCTION: vala_src_prepare
+# @USAGE: [--ignore-use] [--vala-api-version api_version]
+# @DESCRIPTION:
+# Sets up the environment variables and pkgconfig files for the
+# specified API version, or, if no version is specified, for the
+# highest installed vala API version satisfying
+# VALA_MAX_API_VERSION, VALA_MIN_API_VERSION, and VALA_USE_DEPEND.
+# Is a no-op if called without --ignore-use when USE=-vala.
+# Dies if the USE check is passed (or ignored) and a suitable vala
+# version is not available.
+vala_src_prepare() {
+   local p d valafoo version ignore_use
+
+   while [[ $1 ]]; do
+   case $1 in
+   --ignore-use )
+   ignore_use=1 ;;
+   --vala-api-version )
+   shift
+   version=$1
+   [[ ${version} ]] || die '--vala-api-version' 
option requires API version parameter.
+   esac
+   shift
+   done
+
+   if [[ -z ${ignore_use} ]]; then
+   in_iuse vala  ! use vala  return 0
+   fi
+
+   if [[ ${version} ]]; then
+   has_version dev-lang/vala:${version} || die No installed 
vala:${version}
+   else
+   version=$(vala_best_api_version)
+   [[ ${version} ]] || die No installed vala in $(vala_depend)
+   fi
+
+   export VALAC=$(type -P valac-${version})
+
+   valafoo=$(type -P vala-gen-introspect-${version})
+   [[ ${valafoo} ]]  export VALA_GEN_INTROSPECT=${valafoo}
+
+   valafoo=$(type -P vapigen-${version})
+   [[ ${valafoo} ]]  export VAPIGEN=${valafoo}
+
+   valafoo=${EPREFIX}/usr/share/vala/Makefile.vapigen
+   [[ -e ${valafoo} ]]  export VAPIGEN_MAKEFILE=${valafoo}
+
+   export