/[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.136 Revision 1.146
1# Copyright 1999-2012 Gentoo Foundation 1# Copyright 1999-2013 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.136 2012/09/27 16:35:41 axs Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.146 2013/04/28 16:15:33 zmedico 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.
9# @DESCRIPTION: 9# @DESCRIPTION:
10# This eclass contains various functions that are used when building Qt4. 10# This eclass contains various functions that are used when building Qt4.
11 11
12case ${EAPI} in 12case ${EAPI} in
13 2|3|4|5) : ;; 13 3|4|5) : ;;
14 *) die "qt4-build.eclass requires EAPI 2, 3 or 4." ;; 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 versionator
18 18
19if [[ ${PV} == *9999* ]]; then 19if [[ ${PV} == *9999* ]]; then
21 inherit git-2 21 inherit git-2
22else 22else
23 QT4_BUILD_TYPE="release" 23 QT4_BUILD_TYPE="release"
24fi 24fi
25 25
26HOMEPAGE="http://qt-project.org/ http://qt.nokia.com/" 26HOMEPAGE="http://qt-project.org/ http://qt.digia.com/"
27LICENSE="|| ( LGPL-2.1 GPL-3 )" 27LICENSE="|| ( LGPL-2.1 GPL-3 )"
28 28
29MY_PV=${PV/_/-} 29MY_PV=${PV/_/-}
30MY_P=qt-everywhere-opensource-src-${MY_PV} 30MY_P=qt-everywhere-opensource-src-${MY_PV}
31 31
34 EGIT_REPO_URI="git://gitorious.org/qt/qt.git 34 EGIT_REPO_URI="git://gitorious.org/qt/qt.git
35 https://git.gitorious.org/qt/qt.git" 35 https://git.gitorious.org/qt/qt.git"
36 EGIT_BRANCH=${PV%.9999} 36 EGIT_BRANCH=${PV%.9999}
37 ;; 37 ;;
38 release) 38 release)
39 if version_is_at_least 4.8.1; then
40 SRC_URI="http://releases.qt-project.org/qt4/source/${MY_P}.tar.gz" 39 SRC_URI="http://releases.qt-project.org/qt4/source/${MY_P}.tar.gz"
41 else
42 SRC_URI="http://get.qt.nokia.com/qt/source/${MY_P}.tar.gz"
43 fi
44 ;; 40 ;;
45esac 41esac
46 42
47IUSE="aqua debug pch" 43IUSE="aqua debug pch"
44[[ ${CATEGORY}/${PN} != dev-qt/qtwebkit ]] && IUSE+=" c++0x"
48[[ ${CATEGORY}/${PN} != x11-libs/qt-xmlpatterns ]] && IUSE+=" +exceptions" 45[[ ${CATEGORY}/${PN} != dev-qt/qtxmlpatterns ]] && IUSE+=" +exceptions"
49if version_is_at_least 4.8; then
50 [[ ${CATEGORY}/${PN} != x11-libs/qt-webkit ]] && IUSE+=" c++0x"
51 version_is_at_least 4.8.3 || IUSE+=" qpa"
52fi
53 46
54DEPEND="virtual/pkgconfig" 47DEPEND="virtual/pkgconfig"
55if [[ ${QT4_BUILD_TYPE} == live ]]; then 48if [[ ${QT4_BUILD_TYPE} == live ]]; then
56 DEPEND+=" dev-lang/perl" 49 DEPEND+=" dev-lang/perl"
57fi 50fi
58 51
59RDEPEND="
60 !<x11-libs/qt-assistant-${PV}:4
61 !>x11-libs/qt-assistant-${PV}-r9999:4
62 !<x11-libs/qt-bearer-${PV}:4
63 !>x11-libs/qt-bearer-${PV}-r9999:4
64 !<x11-libs/qt-core-${PV}:4
65 !>x11-libs/qt-core-${PV}-r9999:4
66 !<x11-libs/qt-dbus-${PV}:4
67 !>x11-libs/qt-dbus-${PV}-r9999:4
68 !<x11-libs/qt-declarative-${PV}:4
69 !>x11-libs/qt-declarative-${PV}-r9999:4
70 !<x11-libs/qt-demo-${PV}:4
71 !>x11-libs/qt-demo-${PV}-r9999:4
72 !<x11-libs/qt-gui-${PV}:4
73 !>x11-libs/qt-gui-${PV}-r9999:4
74 !<x11-libs/qt-multimedia-${PV}:4
75 !>x11-libs/qt-multimedia-${PV}-r9999:4
76 !<x11-libs/qt-opengl-${PV}:4
77 !>x11-libs/qt-opengl-${PV}-r9999:4
78 !<x11-libs/qt-openvg-${PV}:4
79 !>x11-libs/qt-openvg-${PV}-r9999:4
80 !<x11-libs/qt-phonon-${PV}:4
81 !>x11-libs/qt-phonon-${PV}-r9999:4
82 !<x11-libs/qt-qt3support-${PV}:4
83 !>x11-libs/qt-qt3support-${PV}-r9999:4
84 !<x11-libs/qt-script-${PV}:4
85 !>x11-libs/qt-script-${PV}-r9999:4
86 !<x11-libs/qt-sql-${PV}:4
87 !>x11-libs/qt-sql-${PV}-r9999:4
88 !<x11-libs/qt-svg-${PV}:4
89 !>x11-libs/qt-svg-${PV}-r9999:4
90 !<x11-libs/qt-test-${PV}:4
91 !>x11-libs/qt-test-${PV}-r9999:4
92 !<x11-libs/qt-webkit-${PV}:4
93 !>x11-libs/qt-webkit-${PV}-r9999:4
94 !<x11-libs/qt-xmlpatterns-${PV}:4
95 !>x11-libs/qt-xmlpatterns-${PV}-r9999:4
96"
97
98S=${WORKDIR}/${MY_P} 52S=${WORKDIR}/${MY_P}
99 53
100# @FUNCTION: qt4-build_pkg_setup 54# @FUNCTION: qt4-build_pkg_setup
101# @DESCRIPTION: 55# @DESCRIPTION:
102# Sets up PATH and LD_LIBRARY_PATH. 56# Sets up PATH and LD_LIBRARY_PATH.
103qt4-build_pkg_setup() { 57qt4-build_pkg_setup() {
104 [[ ${EAPI} == 2 ]] && use !prefix && EPREFIX=
105
106 # Protect users by not allowing downgrades between releases. 58 # Protect users by not allowing downgrades between releases.
107 # Downgrading revisions within the same release should be allowed. 59 # Downgrading revisions within the same release should be allowed.
108 if has_version ">${CATEGORY}/${P}-r9999:4"; then 60 if has_version ">${CATEGORY}/${P}-r9999:4"; then
109 if [[ -z ${I_KNOW_WHAT_I_AM_DOING} ]]; then 61 if [[ -z ${I_KNOW_WHAT_I_AM_DOING} ]]; then
110 eerror " *** Sanity check to keep you from breaking your system ***" 62 eerror " *** Sanity check to keep you from breaking your system ***"
149 101
150 if ! version_is_at_least 4.1 $(gcc-version); then 102 if ! version_is_at_least 4.1 $(gcc-version); then
151 ewarn "Using a GCC version lower than 4.1 is not supported." 103 ewarn "Using a GCC version lower than 4.1 is not supported."
152 fi 104 fi
153 105
154 if [[ ${PN} == qt-webkit ]]; then 106 if [[ ${CATEGORY}/${PN} == dev-qt/qtwebkit ]]; then
155 eshopts_push -s extglob 107 eshopts_push -s extglob
156 if is-flagq '-g?(gdb)?([1-9])'; then 108 if is-flagq '-g?(gdb)?([1-9])'; then
157 echo 109 echo
158 ewarn "You have enabled debug info (probably have -g or -ggdb in your CFLAGS/CXXFLAGS)." 110 ewarn "You have enabled debug info (probably have -g or -ggdb in your CFLAGS/CXXFLAGS)."
159 ewarn "You may experience really long compilation times and/or increased memory usage." 111 ewarn "You may experience really long compilation times and/or increased memory usage."
188# @DEFAULT_UNSET 140# @DEFAULT_UNSET
189# @DESCRIPTION: 141# @DESCRIPTION:
190# PATCHES array variable containing all various patches to be applied. 142# PATCHES array variable containing all various patches to be applied.
191# This variable is expected to be defined in global scope of ebuild. 143# This variable is expected to be defined in global scope of ebuild.
192# Make sure to specify the full path. This variable is utilised in 144# Make sure to specify the full path. This variable is utilised in
193# src_unpack/src_prepare phase, based on EAPI. 145# src_prepare() phase.
194# 146#
195# @CODE 147# @CODE
196# PATCHES=( "${FILESDIR}/mypatch.patch" 148# PATCHES=( "${FILESDIR}/mypatch.patch"
197# "${FILESDIR}/patches_folder/" ) 149# "${FILESDIR}/patches_folder/" )
198# @CODE 150# @CODE
199 151
200# @FUNCTION: qt4-build_src_prepare 152# @FUNCTION: qt4-build_src_prepare
201# @DESCRIPTION: 153# @DESCRIPTION:
202# Prepare the sources before the configure phase. Strip CFLAGS if necessary, and fix 154# Prepare the sources before the configure phase. Strip CFLAGS if necessary, and fix
203# the build system in order to respect CFLAGS/CXXFLAGS/LDFLAGS specified in /etc/make.conf. 155# the build system in order to respect CFLAGS/CXXFLAGS/LDFLAGS specified in make.conf.
204qt4-build_src_prepare() { 156qt4-build_src_prepare() {
205 setqtenv 157 setqtenv
206 158
207 if [[ ${QT4_BUILD_TYPE} == live ]]; then 159 if [[ ${QT4_BUILD_TYPE} == live ]]; then
208 QTDIR="." ./bin/syncqt || die "syncqt failed" 160 QTDIR="." ./bin/syncqt || die "syncqt failed"
209 fi 161 fi
210 162
211 if version_is_at_least 4.7; then
212 # avoid X11 dependency in non-gui packages 163 # avoid X11 dependency in non-gui packages
213 local nolibx11_pkgs="qt-core qt-dbus qt-script qt-sql qt-test qt-xmlpatterns" 164 local nolibx11_pkgs="qtcore qtdbus qtscript qtsql qttest qtxmlpatterns"
214 has ${PN} ${nolibx11_pkgs} && qt_nolibx11 165 has ${PN} ${nolibx11_pkgs} && qt_nolibx11
215 fi
216 166
217 if use aqua; then 167 if use aqua; then
218 # provide a proper macx-g++-64 168 # provide a proper macx-g++-64
219 use x64-macos && ln -s macx-g++ mkspecs/$(qt_mkspecs_dir) 169 use x64-macos && ln -s macx-g++ mkspecs/$(qt_mkspecs_dir)
220 170
221 sed -e '/^CONFIG/s:app_bundle::' \ 171 sed -e '/^CONFIG/s:app_bundle::' \
222 -e '/^CONFIG/s:plugin_no_soname:plugin_with_soname absolute_library_soname:' \ 172 -e '/^CONFIG/s:plugin_no_soname:plugin_with_soname absolute_library_soname:' \
223 -i mkspecs/$(qt_mkspecs_dir)/qmake.conf || die 173 -i mkspecs/$(qt_mkspecs_dir)/qmake.conf || die
224 fi 174 fi
225 175
226 if [[ ${PN} != qt-core ]]; then 176 if [[ ${CATEGORY}/${PN} != dev-qt/qtcore ]]; then
227 skip_qmake_build 177 skip_qmake_build
228 skip_project_generation 178 skip_project_generation
229 symlink_binaries_to_buildtree 179 symlink_binaries_to_buildtree
230 fi 180 fi
231 181
276 -i configure \ 226 -i configure \
277 || die "sed SYSTEM_VARIABLES failed" 227 || die "sed SYSTEM_VARIABLES failed"
278 228
279 # Respect CC, CXX, LINK and *FLAGS in config.tests 229 # Respect CC, CXX, LINK and *FLAGS in config.tests
280 find config.tests/unix -name '*.test' -type f -print0 | xargs -0 \ 230 find config.tests/unix -name '*.test' -type f -print0 | xargs -0 \
281 sed -i -e "/bin\/qmake/ s: \"QT_BUILD_TREE=: \ 231 sed -i -e "/bin\/qmake/ s: \"\$SRCDIR/: \
282 'QMAKE_CC=$(tc-getCC)' 'QMAKE_CXX=$(tc-getCXX)' 'QMAKE_LINK=$(tc-getCXX)' \ 232 'QMAKE_CC=$(tc-getCC)' 'QMAKE_CXX=$(tc-getCXX)' 'QMAKE_LINK=$(tc-getCXX)' \
283 'QMAKE_CFLAGS+=${CFLAGS}' 'QMAKE_CXXFLAGS+=${CXXFLAGS}' 'QMAKE_LFLAGS+=${LDFLAGS}'&:" \ 233 'QMAKE_CFLAGS+=${CFLAGS}' 'QMAKE_CXXFLAGS+=${CXXFLAGS}' 'QMAKE_LFLAGS+=${LDFLAGS}'&:" \
284 || die "sed config.tests failed" 234 || die "sed config.tests failed"
285
286 if ! version_is_at_least 4.8; then
287 # Strip predefined CFLAGS from mkspecs (bugs 312689 and 352778)
288 sed -i -e '/^QMAKE_CFLAGS_RELEASE/s:+=.*:+=:' mkspecs/common/g++.conf || die
289 fi
290 235
291 # Bug 172219 236 # Bug 172219
292 sed -e 's:/X11R6/:/:' -i mkspecs/$(qt_mkspecs_dir)/qmake.conf || die 237 sed -e 's:/X11R6/:/:' -i mkspecs/$(qt_mkspecs_dir)/qmake.conf || die
293 238
294 if [[ ${CHOST} == *-darwin* ]]; then 239 if [[ ${CHOST} == *-darwin* ]]; then
374 -bindir ${QTBINDIR} 319 -bindir ${QTBINDIR}
375 -libdir ${QTLIBDIR} 320 -libdir ${QTLIBDIR}
376 -docdir ${QTDOCDIR} 321 -docdir ${QTDOCDIR}
377 -headerdir ${QTHEADERDIR} 322 -headerdir ${QTHEADERDIR}
378 -plugindir ${QTPLUGINDIR} 323 -plugindir ${QTPLUGINDIR}
379 $(version_is_at_least 4.7 && echo -importdir ${QTIMPORTDIR}) 324 -importdir ${QTIMPORTDIR}
380 -datadir ${QTDATADIR} 325 -datadir ${QTDATADIR}
381 -translationdir ${QTTRANSDIR} 326 -translationdir ${QTTRANSDIR}
382 -sysconfdir ${QTSYSCONFDIR} 327 -sysconfdir ${QTSYSCONFDIR}
383 -examplesdir ${QTEXAMPLESDIR} 328 -examplesdir ${QTEXAMPLESDIR}
384 -demosdir ${QTDEMOSDIR} 329 -demosdir ${QTDEMOSDIR}
413 conf+=" -no-separate-debug-info" 358 conf+=" -no-separate-debug-info"
414 359
415 # exceptions USE flag 360 # exceptions USE flag
416 conf+=" $(in_iuse exceptions && qt_use exceptions || echo -exceptions)" 361 conf+=" $(in_iuse exceptions && qt_use exceptions || echo -exceptions)"
417 362
418 # disable rpath on Qt >= 4.8 (bug 380415) 363 # disable rpath (bug 380415), except on prefix (bug 417169)
419 # but leave it enabled on prefix (bug 417169) 364 use prefix || conf+=" -no-rpath"
420 version_is_at_least 4.8 && use !prefix && conf+=" -no-rpath"
421 365
422 # precompiled headers don't work on hardened, where the flag is masked 366 # precompiled headers don't work on hardened, where the flag is masked
423 conf+=" $(qt_use pch)" 367 conf+=" $(qt_use pch)"
424 368
425 # -reduce-relocations 369 # -reduce-relocations
438 if use_if_iuse glib; then 382 if use_if_iuse glib; then
439 local glibflags="$(pkg-config --cflags --libs glib-2.0 gthread-2.0)" 383 local glibflags="$(pkg-config --cflags --libs glib-2.0 gthread-2.0)"
440 # avoid the -pthread argument 384 # avoid the -pthread argument
441 conf+=" ${glibflags//-pthread}" 385 conf+=" ${glibflags//-pthread}"
442 unset glibflags 386 unset glibflags
443 fi
444
445 if use_if_iuse qpa; then
446 echo
447 ewarn "The qpa useflag enables the Qt Platform Abstraction, formely"
448 ewarn "known as Qt Lighthouse. If you are not sure what that is, then"
449 ewarn "disable it before reporting any bugs related to this useflag."
450 echo
451 conf+=" -qpa"
452 fi 387 fi
453 388
454 if use aqua; then 389 if use aqua; then
455 # On (snow) leopard use the new (frameworked) cocoa code. 390 # On (snow) leopard use the new (frameworked) cocoa code.
456 if [[ ${CHOST##*-darwin} -ge 9 ]]; then 391 if [[ ${CHOST##*-darwin} -ge 9 ]]; then
494# @FUNCTION: qt4-build_src_test 429# @FUNCTION: qt4-build_src_test
495# @DESCRIPTION: 430# @DESCRIPTION:
496# Runs tests only in target directories. 431# Runs tests only in target directories.
497qt4-build_src_test() { 432qt4-build_src_test() {
498 # QtMultimedia does not have any test suite (bug #332299) 433 # QtMultimedia does not have any test suite (bug #332299)
499 [[ ${PN} == qt-multimedia ]] && return 434 [[ ${CATEGORY}/${PN} == dev-qt/qtmultimedia ]] && return
500 435
501 for dir in ${QT4_TARGET_DIRECTORIES}; do 436 for dir in ${QT4_TARGET_DIRECTORIES}; do
502 emake -j1 check -C ${dir} 437 emake -j1 check -C ${dir}
503 done 438 done
504} 439}
548 483
549# @FUNCTION: qt4-build_src_install 484# @FUNCTION: qt4-build_src_install
550# @DESCRIPTION: 485# @DESCRIPTION:
551# Perform the actual installation including some library fixes. 486# Perform the actual installation including some library fixes.
552qt4-build_src_install() { 487qt4-build_src_install() {
553 [[ ${EAPI} == 2 ]] && use !prefix && ED=${D}
554 setqtenv 488 setqtenv
555 489
556 install_directories ${QT4_TARGET_DIRECTORIES} 490 install_directories ${QT4_TARGET_DIRECTORIES}
557 install_qconfigs 491 install_qconfigs
558 fix_library_files 492 fix_library_files
559 fix_includes 493 fix_includes
560 494
561 # remove .la files since we are building only shared Qt libraries 495 # remove .la files since we are building only shared libraries
562 find "${D}"${QTLIBDIR} -type f -name '*.la' -print0 | xargs -0 rm -f 496 prune_libtool_files
563} 497}
564 498
565# @FUNCTION: setqtenv 499# @FUNCTION: setqtenv
566# @INTERNAL 500# @INTERNAL
567setqtenv() { 501setqtenv() {
568 # Set up installation directories 502 # Set up installation directories
569 QTPREFIXDIR=${EPREFIX}/usr 503 QTPREFIXDIR=${EPREFIX}/usr
570 QTBINDIR=${EPREFIX}/usr/bin 504 QTBINDIR=${QTPREFIXDIR}/bin
571 QTLIBDIR=${EPREFIX}/usr/$(get_libdir)/qt4 505 QTLIBDIR=${QTPREFIXDIR}/$(get_libdir)/qt4
572 QTPCDIR=${EPREFIX}/usr/$(get_libdir)/pkgconfig 506 QTPCDIR=${QTPREFIXDIR}/$(get_libdir)/pkgconfig
573 QTDOCDIR=${EPREFIX}/usr/share/doc/qt-${PV} 507 QTDOCDIR=${QTPREFIXDIR}/share/doc/qt-${PV}
574 QTHEADERDIR=${EPREFIX}/usr/include/qt4 508 QTHEADERDIR=${QTPREFIXDIR}/include/qt4
575 QTPLUGINDIR=${QTLIBDIR}/plugins 509 QTPLUGINDIR=${QTLIBDIR}/plugins
576 QTIMPORTDIR=${QTLIBDIR}/imports 510 QTIMPORTDIR=${QTLIBDIR}/imports
577 QTDATADIR=${EPREFIX}/usr/share/qt4 511 QTDATADIR=${QTPREFIXDIR}/share/qt4
578 QTTRANSDIR=${QTDATADIR}/translations 512 QTTRANSDIR=${QTDATADIR}/translations
579 QTSYSCONFDIR=${EPREFIX}/etc/qt4 513 QTSYSCONFDIR=${EPREFIX}/etc/qt4
580 QTEXAMPLESDIR=${QTDATADIR}/examples 514 QTEXAMPLESDIR=${QTDATADIR}/examples
581 QTDEMOSDIR=${QTDATADIR}/demos 515 QTDEMOSDIR=${QTDATADIR}/demos
582 QMAKE_LIBDIR_QT=${QTLIBDIR} 516 QMAKE_LIBDIR_QT=${QTLIBDIR}
583 QT_INSTALL_PREFIX=${EPREFIX}/usr/$(get_libdir)/qt4
584 517
585 PLATFORM=$(qt_mkspecs_dir) 518 PLATFORM=$(qt_mkspecs_dir)
586 unset QMAKESPEC 519 unset QMAKESPEC
587 520
588 export XDG_CONFIG_HOME="${T}" 521 export XDG_CONFIG_HOME="${T}"
595# Generates Makefiles for the given list of directories. 528# Generates Makefiles for the given list of directories.
596prepare_directories() { 529prepare_directories() {
597 for x in "$@"; do 530 for x in "$@"; do
598 pushd "${S}"/${x} >/dev/null || die 531 pushd "${S}"/${x} >/dev/null || die
599 einfo "Running qmake in: ${x}" 532 einfo "Running qmake in: ${x}"
600 # avoid running over the maximum argument number, bug #299810 533 "${S}"/bin/qmake \
601 { 534 "LIBS+=-L${QTLIBDIR}" \
602 echo "${S}"/mkspecs/common/*.conf 535 "CONFIG+=nostrip" \
603 find "${S}" -name '*.pr[io]' 536 || die "qmake failed"
604 } | xargs sed -i \
605 -e "s:\$\$\[QT_INSTALL_LIBS\]:${QTLIBDIR}:g" \
606 -e "s:\$\$\[QT_INSTALL_PLUGINS\]:${QTPLUGINDIR}:g" \
607 || die
608 "${S}"/bin/qmake "LIBS+=-L${QTLIBDIR}" "CONFIG+=nostrip" || die "qmake failed"
609 popd >/dev/null || die 537 popd >/dev/null || die
610 done 538 done
611} 539}
612
613 540
614# @FUNCTION: build_directories 541# @FUNCTION: build_directories
615# @USAGE: < directories > 542# @USAGE: < directories >
616# @INTERNAL 543# @INTERNAL
617# @DESCRIPTION: 544# @DESCRIPTION:
618# Compiles the code in the given list of directories. 545# Compiles the code in the given list of directories.
619build_directories() { 546build_directories() {
620 for x in "$@"; do 547 for x in "$@"; do
621 pushd "${S}"/${x} >/dev/null || die 548 pushd "${S}"/${x} >/dev/null || die
549 emake \
550 AR="$(tc-getAR) cqs" \
622 emake CC="$(tc-getCC)" \ 551 CC="$(tc-getCC)" \
623 CXX="$(tc-getCXX)" \ 552 CXX="$(tc-getCXX)" \
624 LINK="$(tc-getCXX)" || die "emake failed" 553 LINK="$(tc-getCXX)" \
554 RANLIB=":" \
555 STRIP=":" \
556 || die "emake failed"
625 popd >/dev/null || die 557 popd >/dev/null || die
626 done 558 done
627} 559}
628 560
629# @FUNCTION: install_directories 561# @FUNCTION: install_directories
680# @FUNCTION: generate_qconfigs 612# @FUNCTION: generate_qconfigs
681# @INTERNAL 613# @INTERNAL
682# @DESCRIPTION: 614# @DESCRIPTION:
683# Generates gentoo-specific qconfig.{h,pri}. 615# Generates gentoo-specific qconfig.{h,pri}.
684generate_qconfigs() { 616generate_qconfigs() {
685 if [[ -n ${QCONFIG_ADD} || -n ${QCONFIG_REMOVE} || -n ${QCONFIG_DEFINE} || ${PN} == qt-core ]]; then 617 if [[ -n ${QCONFIG_ADD} || -n ${QCONFIG_REMOVE} || -n ${QCONFIG_DEFINE} || ${CATEGORY}/${PN} == dev-qt/qtcore ]]; then
686 local x qconfig_add qconfig_remove qconfig_new 618 local x qconfig_add qconfig_remove qconfig_new
687 for x in "${ROOT}${QTDATADIR}"/mkspecs/gentoo/*-qconfig.pri; do 619 for x in "${ROOT}${QTDATADIR}"/mkspecs/gentoo/*-qconfig.pri; do
688 [[ -f ${x} ]] || continue 620 [[ -f ${x} ]] || continue
689 qconfig_add+=" $(sed -n 's/^QCONFIG_ADD=//p' "${x}")" 621 qconfig_add+=" $(sed -n 's/^QCONFIG_ADD=//p' "${x}")"
690 qconfig_remove+=" $(sed -n 's/^QCONFIG_REMOVE=//p' "${x}")" 622 qconfig_remove+=" $(sed -n 's/^QCONFIG_REMOVE=//p' "${x}")"
691 done 623 done
692 624
693 # these error checks do not use die because dying in pkg_post{inst,rm} 625 # these error checks do not use die because dying in pkg_post{inst,rm}
694 # just makes things worse. 626 # just makes things worse.
695 if [[ -e "${ROOT}${QTDATADIR}"/mkspecs/gentoo/qconfig.pri ]]; then 627 if [[ -e "${ROOT}${QTDATADIR}"/mkspecs/gentoo/qconfig.pri ]]; then
696 # start with the qconfig.pri that qt-core installed 628 # start with the qconfig.pri that qtcore installed
697 if ! cp "${ROOT}${QTDATADIR}"/mkspecs/gentoo/qconfig.pri \ 629 if ! cp "${ROOT}${QTDATADIR}"/mkspecs/gentoo/qconfig.pri \
698 "${ROOT}${QTDATADIR}"/mkspecs/qconfig.pri; then 630 "${ROOT}${QTDATADIR}"/mkspecs/qconfig.pri; then
699 eerror "cp qconfig failed." 631 eerror "cp qconfig failed."
700 return 1 632 return 1
701 fi 633 fi
753} 685}
754 686
755# @FUNCTION: skip_qmake_build 687# @FUNCTION: skip_qmake_build
756# @INTERNAL 688# @INTERNAL
757# @DESCRIPTION: 689# @DESCRIPTION:
758# Patches configure to skip qmake compilation, as it's already installed by qt-core. 690# Patches configure to skip qmake compilation, as it's already installed by qtcore.
759skip_qmake_build() { 691skip_qmake_build() {
760 sed -i -e "s:if true:if false:g" "${S}"/configure || die 692 sed -i -e "s:if true:if false:g" "${S}"/configure || die
761} 693}
762 694
763# @FUNCTION: skip_project_generation 695# @FUNCTION: skip_project_generation

Legend:
Removed from v.1.136  
changed lines
  Added in v.1.146

  ViewVC Help
Powered by ViewVC 1.1.20