Install global docs (part of bug 457028). Generate and install qtchooser configuratio...
authorDavide Pesavento <pesa@gentoo.org>
Fri, 14 Nov 2014 02:49:57 +0000 (02:49 +0000)
committerDavide Pesavento <pesa@gentoo.org>
Fri, 14 Nov 2014 02:49:57 +0000 (02:49 +0000)
eclass/ChangeLog
eclass/qt5-build.eclass

index a6b494218d4b98249360659bfd4054c747214355..5fabf9420586bcacfbc870d4d2e96b54302eb51c 100644 (file)
@@ -1,6 +1,10 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1419 2014/11/13 07:15:54 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1420 2014/11/14 02:49:57 pesa Exp $
+
+  14 Nov 2014; Davide Pesavento <pesa@gentoo.org> qt5-build.eclass:
+  Install global docs (part of bug 457028). Generate and install qtchooser
+  configuration file.
 
   13 Nov 2014; Ulrich Müller <ulm@gentoo.org> bzr.eclass:
   Remove Emacs team from maintainers of bzr.eclass.
index 411974ab86316f652d0b3c0420704c8745773d5b..7bc459e8438a60497640acf217e87552378f8457 100644 (file)
@@ -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/qt5-build.eclass,v 1.9 2014/10/09 16:55:28 pesa Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/qt5-build.eclass,v 1.10 2014/11/14 02:49:57 pesa Exp $
 
 # @ECLASS: qt5-build.eclass
 # @MAINTAINER:
@@ -261,12 +261,14 @@ qt5-build_src_install() {
        if [[ ${PN} == qtcore ]]; then
                pushd "${QT5_BUILD_DIR}" >/dev/null || die
 
-               set -- emake INSTALL_ROOT="${D}" install_{mkspecs,qmake,syncqt}
+               set -- emake INSTALL_ROOT="${D}" install_{global_docs,mkspecs,qmake,syncqt}
                einfo "Running $*"
                "$@"
 
                popd >/dev/null || die
 
+               docompress -x "${QT5_DOCDIR#${EPREFIX}}"/global
+
                # install an empty Gentoo/gentoo-qconfig.h in ${D}
                # so that it's placed under package manager control
                > "${T}"/gentoo-qconfig.h
@@ -276,9 +278,24 @@ qt5-build_src_install() {
                )
 
                # include gentoo-qconfig.h at the beginning of QtCore/qconfig.h
-               sed -i -e '1a#include <Gentoo/gentoo-qconfig.h>\n' \
+               sed -i -e '1i #include <Gentoo/gentoo-qconfig.h>\n' \
                        "${D}${QT5_HEADERDIR}"/QtCore/qconfig.h \
                        || die "sed failed (qconfig.h)"
+
+               # install qtchooser configuration file
+               cat > "${T}/qt5-${CHOST}.conf" <<-_EOF_
+                       ${QT5_BINDIR}
+                       ${QT5_LIBDIR}
+               _EOF_
+
+               (
+                       insinto /etc/xdg/qtchooser
+                       doins "${T}/qt5-${CHOST}.conf"
+               )
+
+               # convenience symlinks
+               dosym qt5-"${CHOST}".conf /etc/xdg/qtchooser/5.conf
+               dosym qt5-"${CHOST}".conf /etc/xdg/qtchooser/qt5.conf
        fi
 
        qt5_install_module_qconfigs