From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 75D94138330 for ; Mon, 5 Sep 2016 22:06:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id ED44721C096; Mon, 5 Sep 2016 22:05:57 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 46FA221C096 for ; Mon, 5 Sep 2016 22:05:57 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2A2D234081F for ; Mon, 5 Sep 2016 22:05:56 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4FC6F2452 for ; Mon, 5 Sep 2016 22:05:53 +0000 (UTC) From: "Gilles Dartiguelongue" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Gilles Dartiguelongue" Message-ID: <1473111081.4f37fde27700ee6f07923cedf2996b889336862a.eva@gentoo> Subject: [gentoo-commits] proj/gnome:master commit in: eclass/ X-VCS-Repository: proj/gnome X-VCS-Files: eclass/gnome2-utils.eclass eclass/gnome2.eclass eclass/vala.eclass X-VCS-Directories: eclass/ X-VCS-Committer: eva X-VCS-Committer-Name: Gilles Dartiguelongue X-VCS-Revision: 4f37fde27700ee6f07923cedf2996b889336862a X-VCS-Branch: master Date: Mon, 5 Sep 2016 22:05:53 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 890f9861-4e6f-4915-85ee-1a0eb9f9a14b X-Archives-Hash: d465f55c5d87448501e77c0d1f62ac33 commit: 4f37fde27700ee6f07923cedf2996b889336862a Author: Gilles Dartiguelongue gentoo org> AuthorDate: Mon Sep 5 21:29:37 2016 +0000 Commit: Gilles Dartiguelongue gentoo org> CommitDate: Mon Sep 5 21:31:21 2016 +0000 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 packages for the eclass # to handle it properly. It will enable minimal debug with USE=-debug. # Note that this is most commonly found in configure.ac as GNOME_DEBUG_CHECK. +# +# 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 [[ ${GCONF_DEBUG} != "no" ]]; then + IUSE="debug" + fi +fi + +# @ECLASS-VARIABLE: GNOME2_ECLASS_GIO_MODULES +# @INTERNAL +# @DESCRIPTION: +# Array containing glib GIO modules - -if [[ ${GCONF_DEBUG} != "no" ]]; then - IUSE="debug" +# @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: +# - "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 # @FUNCTION: gnome2_src_unpack # @DESCRIPTION: # Stub function for old EAPI. gnome2_src_unpack() { - unpack ${A} - cd "${S}" + if has ${EAPI:-0} 4 5; then + unpack ${A} + cd "${S}" + else + die "gnome2_src_unpack is banned from eapi6" + fi } # @FUNCTION: gnome2_src_prepare @@ -81,36 +105,43 @@ gnome2_src_prepare() { gnome2_environment_reset # Prevent scrollkeeper access violations - gnome2_omf_fix + # 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 # Disable all deprecation warnings gnome2_disable_deprecation_warning # Run libtoolize - # Everything is fatal EAPI 4 onwards - nonfatal elibtoolize ${ELTCONF} + # https://bugzilla.gnome.org/show_bug.cgi?id=655517 + elibtoolize ${ELTCONF} } # @FUNCTION: gnome2_src_configure # @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 + # Deprecated for a long time now and banned since eapi6, 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" + if has ${EAPI:-0} 4 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" + fi fi local g2conf=() - # Update the GNOME configuration options - if [[ ${GCONF_DEBUG} != 'no' ]] ; then - if use debug ; then - g2conf+=( --enable-debug=yes ) + if has ${EAPI:-0} 4 5; then + if [[ ${GCONF_DEBUG} != 'no' ]] ; then + if use debug ; then + g2conf+=( --enable-debug=yes ) + fi + fi + else + if [[ -n ${GCONF_DEBUG} ]] ; then + die "GCONF_DEBUG is banned since eapi6 in favor of each ebuild taking care of the proper handling of debug configure option" fi fi @@ -140,7 +171,7 @@ gnome2_src_configure() { g2conf+=( --disable-scrollkeeper ) fi - # Pass --disable-silent-rules when possible (not needed for eapi5), bug #429308 + # Pass --disable-silent-rules when possible (not needed since eapi5), bug #429308 if has ${EAPI:-0} 4; then if grep -q "disable-silent-rules" "${ECONF_SOURCE:-.}"/configure; then g2conf+=( --disable-silent-rules ) @@ -157,27 +188,46 @@ gnome2_src_configure() { g2conf+=( --disable-schemas-compile ) fi + # Pass --disable-update-mimedb when possible + if grep -q "disable-update-mimedb" "${ECONF_SOURCE:-.}"/configure; then + g2conf+=( --disable-update-mimedb ) + fi + # Pass --enable-compile-warnings=minimum as we don't want -Werror* flags, bug #471336 if grep -q "enable-compile-warnings" "${ECONF_SOURCE:-.}"/configure; then g2conf+=( --enable-compile-warnings=minimum ) fi - # Pass --docdir with proper directory, bug #482646 - if grep -q "^ *--docdir=" "${ECONF_SOURCE:-.}"/configure; then - g2conf+=( --docdir="${EPREFIX}"/usr/share/doc/${PF} ) + # Pass --docdir with proper directory, bug #482646 (not needed since eapi6) + if has ${EAPI:-0} 4 5; then + if grep -q "^ *--docdir=" "${ECONF_SOURCE:-.}"/configure; then + g2conf+=( --docdir="${EPREFIX}"/usr/share/doc/${PF} ) + fi fi # Avoid sandbox violations caused by gnome-vfs (bug #128289 and #345659) - addwrite "$(unset HOME; echo ~)/.gnome2" + if has ${EAPI:-0} 4 5; then + addwrite "$(unset HOME; echo ~)/.gnome2" + else + addpredict "$(unset HOME; echo ~)/.gnome2" + fi - econf ${g2conf[@]} ${G2CONF} "$@" + if has ${EAPI:-0} 4 5; then + econf ${g2conf[@]} ${G2CONF} "$@" + else + econf ${g2conf[@]} "$@" + fi } # @FUNCTION: gnome2_src_compile # @DESCRIPTION: # Only default src_compile for now gnome2_src_compile() { - emake + if has ${EAPI:-0} 4 5; then + emake + else + default + fi } # @FUNCTION: gnome2_src_install @@ -185,27 +235,39 @@ gnome2_src_compile() { # Gnome specific install. Handles typical GConf and scrollkeeper setup # in packages and removal of .la files if requested gnome2_src_install() { - # if this is not present, scrollkeeper-update may segfault and - # create bogus directories in /var/lib/ - local sk_tmp_dir="/var/lib/scrollkeeper" - dodir "${sk_tmp_dir}" || die "dodir failed" - # we must delay gconf schema installation due to sandbox export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL="1" - debug-print "Installing with 'make install'" - emake DESTDIR="${D}" "scrollkeeper_localstate_dir=${ED}${sk_tmp_dir} " "$@" install || die "install failed" + local sk_tmp_dir="/var/lib/scrollkeeper" + # scrollkeeper-update from rarian doesn't do anything. Then, since eapi6 + # we stop taking care of it + # + # if this is not present, scrollkeeper-update may segfault and + # create bogus directories in /var/lib/ + if has ${EAPI:-0} 4 5; then + dodir "${sk_tmp_dir}" || die "dodir failed" + emake DESTDIR="${D}" "scrollkeeper_localstate_dir=${ED}${sk_tmp_dir} " "$@" install || die "install failed" + else + default + fi unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL - # Handle documentation as 'default' for eapi5 and newer, bug #373131 + # Handle documentation as 'default' for eapi5, bug #373131 + # Since eapi6 this is handled by default on its own plus MAINTAINERS and HACKING + # files that are really common in gnome packages (bug #573390) if has ${EAPI:-0} 4; then # Manual document installation if [[ -n "${DOCS}" ]]; then dodoc ${DOCS} || die "dodoc failed" fi - else + elif has ${EAPI:-0} 5; then einstalldocs + else + local d + for d in HACKING MAINTAINERS; do + [[ -s "${d}" ]] && dodoc "${d}" + done fi # Do not keep /var/lib/scrollkeeper because: @@ -247,6 +309,15 @@ gnome2_pkg_preinst() { 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: gnome2_pkg_postinst @@ -261,6 +332,10 @@ gnome2_pkg_postinst() { 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" @@ -282,4 +357,8 @@ gnome2_pkg_postrm() { gnome2_icon_cache_update gnome2_schemas_update gnome2_scrollkeeper_update + + if [[ ${#GNOME2_ECLASS_GIO_MODULES[@]} -gt 0 ]]; then + gnome2_giomodule_cache_update + fi } diff --git a/eclass/vala.eclass b/eclass/vala.eclass index 895743b..a70c9d8 100644 --- a/eclass/vala.eclass +++ b/eclass/vala.eclass @@ -26,13 +26,13 @@ esac # @ECLASS-VARIABLE: VALA_MIN_API_VERSION # @DESCRIPTION: -# Minimum vala API version (e.g. 0.20). -VALA_MIN_API_VERSION=${VALA_MIN_API_VERSION:-0.20} +# Minimum vala API version (e.g. 0.26). +VALA_MIN_API_VERSION=${VALA_MIN_API_VERSION:-0.26} # @ECLASS-VARIABLE: VALA_MAX_API_VERSION # @DESCRIPTION: -# Maximum vala API version (e.g. 0.30). -VALA_MAX_API_VERSION=${VALA_MAX_API_VERSION:-0.30} +# Maximum vala API version (e.g. 0.32). +VALA_MAX_API_VERSION=${VALA_MAX_API_VERSION:-0.32} # @ECLASS-VARIABLE: VALA_USE_DEPEND # @DEFAULT_UNSET @@ -50,7 +50,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="20" + minimal_supported_minor_version="26" 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