pesa        14/11/17 01:31:41

  Modified:             qt4-build.eclass
  Log:
  Dead code removal and other simplifications.

Revision  Changes    Path
1.157                eclass/qt4-build.eclass

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

Index: qt4-build.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v
retrieving revision 1.156
retrieving revision 1.157
diff -u -r1.156 -r1.157
--- qt4-build.eclass    22 Sep 2014 00:03:25 -0000      1.156
+++ qt4-build.eclass    17 Nov 2014 01:31:41 -0000      1.157
@@ -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/qt4-build.eclass,v 1.156 2014/09/22 
00:03:25 pesa Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.157 2014/11/17 
01:31:41 pesa Exp $
 
 # @ECLASS: qt4-build.eclass
 # @MAINTAINER:
@@ -14,27 +14,24 @@
        *)      die "qt4-build.eclass: unsupported EAPI=${EAPI:-0}" ;;
 esac
 
-inherit eutils flag-o-matic multilib toolchain-funcs versionator
-
-if [[ ${PV} == *9999* ]]; then
-       QT4_BUILD_TYPE="live"
-       inherit git-r3
-else
-       QT4_BUILD_TYPE="release"
-fi
+inherit eutils flag-o-matic multilib toolchain-funcs
 
 HOMEPAGE="https://www.qt.io/ https://qt-project.org/";
 LICENSE="|| ( LGPL-2.1 GPL-3 )"
+SLOT="4"
 
-case ${QT4_BUILD_TYPE} in
-       live)
+case ${PV} in
+       4.?.9999)
+               QT4_BUILD_TYPE="live"
                EGIT_REPO_URI=(
                        "git://gitorious.org/qt/qt.git"
                        "https://git.gitorious.org/qt/qt.git";
                )
                EGIT_BRANCH=${PV%.9999}
+               inherit git-r3
                ;;
-       release)
+       *)
+               QT4_BUILD_TYPE="release"
                MY_P=qt-everywhere-opensource-src-${PV/_/-}
                
SRC_URI="http://download.qt-project.org/archive/qt/${PV%.*}/${PV}/${MY_P}.tar.gz";
                S=${WORKDIR}/${MY_P}
@@ -42,10 +39,7 @@
 esac
 
 IUSE="aqua debug pch"
-if ! version_is_at_least 4.8.5; then
-       [[ ${CATEGORY}/${PN} != dev-qt/qtwebkit ]] && IUSE+=" c++0x"
-fi
-[[ ${CATEGORY}/${PN} != dev-qt/qtxmlpatterns ]] && IUSE+=" +exceptions"
+[[ ${PN} != qtxmlpatterns ]] && IUSE+=" +exceptions"
 
 DEPEND="virtual/pkgconfig"
 if [[ ${QT4_BUILD_TYPE} == live ]]; then
@@ -78,17 +72,32 @@
        fi
 }
 
+# @ECLASS-VARIABLE: PATCHES
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Array variable containing all the patches to be applied. This variable
+# is expected to be defined in the global scope of ebuilds. Make sure to
+# specify the full path. This variable is used in src_prepare phase.
+#
+# Example:
+# @CODE
+#      PATCHES=(
+#              "${FILESDIR}/mypatch.patch"
+#              "${FILESDIR}/patches_folder/"
+#      )
+# @CODE
+
 # @ECLASS-VARIABLE: QT4_EXTRACT_DIRECTORIES
 # @DEFAULT_UNSET
 # @DESCRIPTION:
-# Space-separated list including the directories that will be extracted from
-# Qt tarball.
+# Space-separated list of directories that will be extracted
+# from Qt tarball.
 
 # @ECLASS-VARIABLE: QT4_TARGET_DIRECTORIES
 # @DEFAULT_UNSET
 # @DESCRIPTION:
-# Arguments for build_target_directories. Takes the directories in which the
-# code should be compiled. This is a space-separated list.
+# Space-separated list of directories that will be configured,
+# compiled, and installed. All paths must be relative to ${S}.
 
 # @FUNCTION: qt4-build_src_unpack
 # @DESCRIPTION:
@@ -96,13 +105,13 @@
 qt4-build_src_unpack() {
        setqtenv
 
-       if ! version_is_at_least 4.4 $(gcc-version); then
+       if [[ $(gcc-major-version) -lt 4 ]] || [[ $(gcc-major-version) -eq 4 && 
$(gcc-minor-version) -lt 4 ]]; then
                ewarn
                ewarn "Using a GCC version lower than 4.4 is not supported."
                ewarn
        fi
 
-       if [[ ${CATEGORY}/${PN} == dev-qt/qtwebkit ]]; then
+       if [[ ${PN} == qtwebkit ]]; then
                eshopts_push -s extglob
                if is-flagq '-g?(gdb)?([1-9])'; then
                        ewarn
@@ -135,19 +144,6 @@
        esac
 }
 
-# @ECLASS-VARIABLE: PATCHES
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# PATCHES array variable containing all various patches to be applied.
-# This variable is expected to be defined in global scope of ebuild.
-# Make sure to specify the full path. This variable is utilised in
-# src_prepare() phase.
-#
-# @CODE
-#   PATCHES=( "${FILESDIR}/mypatch.patch"
-#             "${FILESDIR}/patches_folder/" )
-# @CODE
-
 # @FUNCTION: qt4-build_src_prepare
 # @DESCRIPTION:
 # Prepare the sources before the configure phase. Strip CFLAGS if necessary, 
and fix




Reply via email to