pesa        15/06/09 21:12:51

  Modified:             ChangeLog qt4-build-multilib.eclass
  Log:
  Rename some internal functions for consistency.

Revision  Changes    Path
1.1649               eclass/ChangeLog

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1649&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1649&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1648&r2=1.1649

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1648
retrieving revision 1.1649
diff -u -r1.1648 -r1.1649
--- ChangeLog   9 Jun 2015 20:16:59 -0000       1.1648
+++ ChangeLog   9 Jun 2015 21:12:50 -0000       1.1649
@@ -1,6 +1,9 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1648 2015/06/09 
20:16:59 pesa Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1649 2015/06/09 
21:12:50 pesa Exp $
+
+  09 Jun 2015; Davide Pesavento <[email protected]> qt4-build-multilib.eclass:
+  Rename some internal functions for consistency.
 
   09 Jun 2015; Davide Pesavento <[email protected]> qt4-build-multilib.eclass,
   qt5-build.eclass:



1.19                 eclass/qt4-build-multilib.eclass

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/qt4-build-multilib.eclass?rev=1.19&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/qt4-build-multilib.eclass?rev=1.19&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/qt4-build-multilib.eclass?r1=1.18&r2=1.19

Index: qt4-build-multilib.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/qt4-build-multilib.eclass,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- qt4-build-multilib.eclass   9 Jun 2015 20:16:59 -0000       1.18
+++ qt4-build-multilib.eclass   9 Jun 2015 21:12:50 -0000       1.19
@@ -1,6 +1,6 @@
 # Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build-multilib.eclass,v 1.18 
2015/06/09 20:16:59 pesa Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build-multilib.eclass,v 1.19 
2015/06/09 21:12:50 pesa Exp $
 
 # @ECLASS: qt4-build-multilib.eclass
 # @MAINTAINER:
@@ -108,6 +108,9 @@
 # @DESCRIPTION:
 # List of macros that must be defined in QtCore/qconfig.h
 
+
+######  Phase functions  ######
+
 # @FUNCTION: qt4-build-multilib_src_unpack
 # @DESCRIPTION:
 # Unpacks the sources.
@@ -459,16 +462,18 @@
                fi
        fi
 
-       # move pkgconfig files to the correct directory
+       # move pkgconfig files to the correct location
+       eshopts_push -s nullglob
        local pcfile
        for pcfile in "${D}/${QT4_LIBDIR}"/pkgconfig/*.pc; do
                dodir /usr/$(get_libdir)/pkgconfig
                mv "${pcfile}" "${ED}"/usr/$(get_libdir)/pkgconfig || die
        done
+       eshopts_pop
        rmdir "${D}/${QT4_LIBDIR}"/pkgconfig || die
 
-       install_qconfigs
-       fix_includes
+       qt4_install_module_qconfigs
+       qt4_symlink_framework_headers
 }
 
 qt4_multilib_src_install_all() {
@@ -510,16 +515,19 @@
 # Regenerate configuration, plus throw a message about possible
 # breakages and proposed solutions.
 qt4-build-multilib_pkg_postinst() {
-       generate_qconfigs
+       qt4_regenerate_global_qconfigs
 }
 
 # @FUNCTION: qt4-build-multilib_pkg_postrm
 # @DESCRIPTION:
 # Regenerate configuration when the package is completely removed.
 qt4-build-multilib_pkg_postrm() {
-       generate_qconfigs
+       qt4_regenerate_global_qconfigs
 }
 
+
+######  Public helpers  ######
+
 # @FUNCTION: qt_use
 # @USAGE: <flag> [feature] [enableval]
 # @DESCRIPTION:
@@ -622,11 +630,11 @@
                || die "qmake failed (${projectdir})"
 }
 
-# @FUNCTION: install_qconfigs
+# @FUNCTION: qt4_install_module_qconfigs
 # @INTERNAL
 # @DESCRIPTION:
-# Install gentoo-specific mkspecs configurations.
-install_qconfigs() {
+# Creates and installs gentoo-specific ${PN}-qconfig.{h,pri} files.
+qt4_install_module_qconfigs() {
        local x
        if [[ -n ${QCONFIG_ADD} || -n ${QCONFIG_REMOVE} ]]; then
                for x in QCONFIG_ADD QCONFIG_REMOVE; do
@@ -645,11 +653,12 @@
        fi
 }
 
-# @FUNCTION: generate_qconfigs
+# @FUNCTION: qt4_regenerate_global_qconfigs
 # @INTERNAL
 # @DESCRIPTION:
-# Generates gentoo-specific qconfig.{h,pri}.
-generate_qconfigs() {
+# Generates Gentoo-specific qconfig.{h,pri} according to the build 
configuration.
+# Don't call die here because dying in pkg_post{inst,rm} only makes things 
worse.
+qt4_regenerate_global_qconfigs() {
        if [[ -n ${QCONFIG_ADD} || -n ${QCONFIG_REMOVE} || -n ${QCONFIG_DEFINE} 
|| ${PN} == qtcore ]]; then
                local x qconfig_add qconfig_remove qconfig_new
                for x in "${ROOT}${QT4_DATADIR}"/mkspecs/gentoo/*-qconfig.pri; 
do
@@ -658,8 +667,6 @@
                        qconfig_remove+=" $(sed -n 's/^QCONFIG_REMOVE=//p' 
"${x}")"
                done
 
-               # these error checks do not use die because dying in 
pkg_post{inst,rm}
-               # just makes things worse.
                if [[ -e "${ROOT}${QT4_DATADIR}"/mkspecs/gentoo/qconfig.pri ]]; 
then
                        # start with the qconfig.pri that qtcore installed
                        if ! cp 
"${ROOT}${QT4_DATADIR}"/mkspecs/gentoo/qconfig.pri \
@@ -705,11 +712,11 @@
        fi
 }
 
-# @FUNCTION: fix_includes
+# @FUNCTION: qt4_symlink_framework_headers
 # @DESCRIPTION:
-# For MacOS X we need to add some symlinks when frameworks are
-# being used, to avoid complications with some more or less stupid packages.
-fix_includes() {
+# On OS X we need to add some symlinks when frameworks are being
+# used, to avoid complications with some more or less stupid packages.
+qt4_symlink_framework_headers() {
        if use_if_iuse aqua && [[ ${CHOST##*-darwin} -ge 9 ]]; then
                local frw dest f h rdir
                # Some packages tend to include <Qt/...>




Reply via email to