/[gentoo-x86]/eclass/qt4-build.eclass
Gentoo

Diff of /eclass/qt4-build.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.156 Revision 1.157
1# Copyright 1999-2014 Gentoo Foundation 1# Copyright 1999-2014 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.156 2014/09/22 00:03:25 pesa Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.157 2014/11/17 01:31:41 pesa Exp $
4 4
5# @ECLASS: qt4-build.eclass 5# @ECLASS: qt4-build.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Qt herd <qt@gentoo.org> 7# Qt herd <qt@gentoo.org>
8# @BLURB: Eclass for Qt4 split ebuilds. 8# @BLURB: Eclass for Qt4 split ebuilds.
12case ${EAPI} in 12case ${EAPI} in
13 4|5) : ;; 13 4|5) : ;;
14 *) die "qt4-build.eclass: unsupported EAPI=${EAPI:-0}" ;; 14 *) die "qt4-build.eclass: unsupported EAPI=${EAPI:-0}" ;;
15esac 15esac
16 16
17inherit eutils flag-o-matic multilib toolchain-funcs versionator 17inherit eutils flag-o-matic multilib toolchain-funcs
18
19if [[ ${PV} == *9999* ]]; then
20 QT4_BUILD_TYPE="live"
21 inherit git-r3
22else
23 QT4_BUILD_TYPE="release"
24fi
25 18
26HOMEPAGE="https://www.qt.io/ https://qt-project.org/" 19HOMEPAGE="https://www.qt.io/ https://qt-project.org/"
27LICENSE="|| ( LGPL-2.1 GPL-3 )" 20LICENSE="|| ( LGPL-2.1 GPL-3 )"
21SLOT="4"
28 22
29case ${QT4_BUILD_TYPE} in 23case ${PV} in
30 live) 24 4.?.9999)
25 QT4_BUILD_TYPE="live"
31 EGIT_REPO_URI=( 26 EGIT_REPO_URI=(
32 "git://gitorious.org/qt/qt.git" 27 "git://gitorious.org/qt/qt.git"
33 "https://git.gitorious.org/qt/qt.git" 28 "https://git.gitorious.org/qt/qt.git"
34 ) 29 )
35 EGIT_BRANCH=${PV%.9999} 30 EGIT_BRANCH=${PV%.9999}
31 inherit git-r3
36 ;; 32 ;;
37 release) 33 *)
34 QT4_BUILD_TYPE="release"
38 MY_P=qt-everywhere-opensource-src-${PV/_/-} 35 MY_P=qt-everywhere-opensource-src-${PV/_/-}
39 SRC_URI="http://download.qt-project.org/archive/qt/${PV%.*}/${PV}/${MY_P}.tar.gz" 36 SRC_URI="http://download.qt-project.org/archive/qt/${PV%.*}/${PV}/${MY_P}.tar.gz"
40 S=${WORKDIR}/${MY_P} 37 S=${WORKDIR}/${MY_P}
41 ;; 38 ;;
42esac 39esac
43 40
44IUSE="aqua debug pch" 41IUSE="aqua debug pch"
45if ! version_is_at_least 4.8.5; then
46 [[ ${CATEGORY}/${PN} != dev-qt/qtwebkit ]] && IUSE+=" c++0x"
47fi
48[[ ${CATEGORY}/${PN} != dev-qt/qtxmlpatterns ]] && IUSE+=" +exceptions" 42[[ ${PN} != qtxmlpatterns ]] && IUSE+=" +exceptions"
49 43
50DEPEND="virtual/pkgconfig" 44DEPEND="virtual/pkgconfig"
51if [[ ${QT4_BUILD_TYPE} == live ]]; then 45if [[ ${QT4_BUILD_TYPE} == live ]]; then
52 DEPEND+=" dev-lang/perl" 46 DEPEND+=" dev-lang/perl"
53fi 47fi
76 QT4_EXTRACT_DIRECTORIES="src/gui/kernel/qapplication_mac.mm 70 QT4_EXTRACT_DIRECTORIES="src/gui/kernel/qapplication_mac.mm
77 ${QT4_EXTRACT_DIRECTORIES}" 71 ${QT4_EXTRACT_DIRECTORIES}"
78 fi 72 fi
79} 73}
80 74
75# @ECLASS-VARIABLE: PATCHES
76# @DEFAULT_UNSET
77# @DESCRIPTION:
78# Array variable containing all the patches to be applied. This variable
79# is expected to be defined in the global scope of ebuilds. Make sure to
80# specify the full path. This variable is used in src_prepare phase.
81#
82# Example:
83# @CODE
84# PATCHES=(
85# "${FILESDIR}/mypatch.patch"
86# "${FILESDIR}/patches_folder/"
87# )
88# @CODE
89
81# @ECLASS-VARIABLE: QT4_EXTRACT_DIRECTORIES 90# @ECLASS-VARIABLE: QT4_EXTRACT_DIRECTORIES
82# @DEFAULT_UNSET 91# @DEFAULT_UNSET
83# @DESCRIPTION: 92# @DESCRIPTION:
84# Space-separated list including the directories that will be extracted from 93# Space-separated list of directories that will be extracted
85# Qt tarball. 94# from Qt tarball.
86 95
87# @ECLASS-VARIABLE: QT4_TARGET_DIRECTORIES 96# @ECLASS-VARIABLE: QT4_TARGET_DIRECTORIES
88# @DEFAULT_UNSET 97# @DEFAULT_UNSET
89# @DESCRIPTION: 98# @DESCRIPTION:
90# Arguments for build_target_directories. Takes the directories in which the 99# Space-separated list of directories that will be configured,
91# code should be compiled. This is a space-separated list. 100# compiled, and installed. All paths must be relative to ${S}.
92 101
93# @FUNCTION: qt4-build_src_unpack 102# @FUNCTION: qt4-build_src_unpack
94# @DESCRIPTION: 103# @DESCRIPTION:
95# Unpacks the sources. 104# Unpacks the sources.
96qt4-build_src_unpack() { 105qt4-build_src_unpack() {
97 setqtenv 106 setqtenv
98 107
99 if ! version_is_at_least 4.4 $(gcc-version); then 108 if [[ $(gcc-major-version) -lt 4 ]] || [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ]]; then
100 ewarn 109 ewarn
101 ewarn "Using a GCC version lower than 4.4 is not supported." 110 ewarn "Using a GCC version lower than 4.4 is not supported."
102 ewarn 111 ewarn
103 fi 112 fi
104 113
105 if [[ ${CATEGORY}/${PN} == dev-qt/qtwebkit ]]; then 114 if [[ ${PN} == qtwebkit ]]; then
106 eshopts_push -s extglob 115 eshopts_push -s extglob
107 if is-flagq '-g?(gdb)?([1-9])'; then 116 if is-flagq '-g?(gdb)?([1-9])'; then
108 ewarn 117 ewarn
109 ewarn "You have enabled debug info (probably have -g or -ggdb in your CFLAGS/CXXFLAGS)." 118 ewarn "You have enabled debug info (probably have -g or -ggdb in your CFLAGS/CXXFLAGS)."
110 ewarn "You may experience really long compilation times and/or increased memory usage." 119 ewarn "You may experience really long compilation times and/or increased memory usage."
132 tar -xzf "${DISTDIR}/${tarball}" ${targets} 141 tar -xzf "${DISTDIR}/${tarball}" ${targets}
133 eend $? || die "failed to unpack" 142 eend $? || die "failed to unpack"
134 ;; 143 ;;
135 esac 144 esac
136} 145}
137
138# @ECLASS-VARIABLE: PATCHES
139# @DEFAULT_UNSET
140# @DESCRIPTION:
141# PATCHES array variable containing all various patches to be applied.
142# This variable is expected to be defined in global scope of ebuild.
143# Make sure to specify the full path. This variable is utilised in
144# src_prepare() phase.
145#
146# @CODE
147# PATCHES=( "${FILESDIR}/mypatch.patch"
148# "${FILESDIR}/patches_folder/" )
149# @CODE
150 146
151# @FUNCTION: qt4-build_src_prepare 147# @FUNCTION: qt4-build_src_prepare
152# @DESCRIPTION: 148# @DESCRIPTION:
153# Prepare the sources before the configure phase. Strip CFLAGS if necessary, and fix 149# Prepare the sources before the configure phase. Strip CFLAGS if necessary, and fix
154# the build system in order to respect CFLAGS/CXXFLAGS/LDFLAGS specified in make.conf. 150# the build system in order to respect CFLAGS/CXXFLAGS/LDFLAGS specified in make.conf.

Legend:
Removed from v.1.156  
changed lines
  Added in v.1.157

  ViewVC Help
Powered by ViewVC 1.1.20