/[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.134 Revision 1.145
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.134 2012/07/10 21:43:19 pesa Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.145 2013/04/07 21:14:46 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.
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) : ;; 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
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
264 sed -e "/^SYSTEM_VARIABLES=/i \ 214 sed -e "/^SYSTEM_VARIABLES=/i \
265 CC='$(tc-getCC)'\n\ 215 CC='$(tc-getCC)'\n\
266 CXX='$(tc-getCXX)'\n\ 216 CXX='$(tc-getCXX)'\n\
267 CFLAGS='${CFLAGS}'\n\ 217 CFLAGS='${CFLAGS}'\n\
268 CXXFLAGS='${CXXFLAGS}'\n\ 218 CXXFLAGS='${CXXFLAGS}'\n\
269 LDFLAGS='${LDFLAGS}'\n" \ 219 LDFLAGS='${LDFLAGS}'\n\
220 QMakeVar set QMAKE_CFLAGS_RELEASE\n\
221 QMakeVar set QMAKE_CFLAGS_DEBUG\n\
222 QMakeVar set QMAKE_CXXFLAGS_RELEASE\n\
223 QMakeVar set QMAKE_CXXFLAGS_DEBUG\n\
224 QMakeVar set QMAKE_LFLAGS_RELEASE\n\
225 QMakeVar set QMAKE_LFLAGS_DEBUG\n"\
270 -i configure \ 226 -i configure \
271 || die "sed SYSTEM_VARIABLES failed" 227 || die "sed SYSTEM_VARIABLES failed"
272 228
273 # Respect CC, CXX, LINK and *FLAGS in config.tests 229 # Respect CC, CXX, LINK and *FLAGS in config.tests
274 find config.tests/unix -name '*.test' -type f -print0 | xargs -0 \ 230 find config.tests/unix -name '*.test' -type f -print0 | xargs -0 \
275 sed -i -e "/bin\/qmake/ s: \"QT_BUILD_TREE=: \ 231 sed -i -e "/bin\/qmake/ s: \"\$SRCDIR/: \
276 '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)' \
277 'QMAKE_CFLAGS+=${CFLAGS}' 'QMAKE_CXXFLAGS+=${CXXFLAGS}' 'QMAKE_LFLAGS+=${LDFLAGS}'&:" \ 233 'QMAKE_CFLAGS+=${CFLAGS}' 'QMAKE_CXXFLAGS+=${CXXFLAGS}' 'QMAKE_LFLAGS+=${LDFLAGS}'&:" \
278 || die "sed config.tests failed" 234 || die "sed config.tests failed"
279
280 if ! version_is_at_least 4.8; then
281 # Strip predefined CFLAGS from mkspecs (bugs 312689 and 352778)
282 sed -i -e '/^QMAKE_CFLAGS_RELEASE/s:+=.*:+=:' mkspecs/common/g++.conf || die
283 fi
284 235
285 # Bug 172219 236 # Bug 172219
286 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
287 238
288 if [[ ${CHOST} == *-darwin* ]]; then 239 if [[ ${CHOST} == *-darwin* ]]; then
368 -bindir ${QTBINDIR} 319 -bindir ${QTBINDIR}
369 -libdir ${QTLIBDIR} 320 -libdir ${QTLIBDIR}
370 -docdir ${QTDOCDIR} 321 -docdir ${QTDOCDIR}
371 -headerdir ${QTHEADERDIR} 322 -headerdir ${QTHEADERDIR}
372 -plugindir ${QTPLUGINDIR} 323 -plugindir ${QTPLUGINDIR}
373 $(version_is_at_least 4.7 && echo -importdir ${QTIMPORTDIR}) 324 -importdir ${QTIMPORTDIR}
374 -datadir ${QTDATADIR} 325 -datadir ${QTDATADIR}
375 -translationdir ${QTTRANSDIR} 326 -translationdir ${QTTRANSDIR}
376 -sysconfdir ${QTSYSCONFDIR} 327 -sysconfdir ${QTSYSCONFDIR}
377 -examplesdir ${QTEXAMPLESDIR} 328 -examplesdir ${QTEXAMPLESDIR}
378 -demosdir ${QTDEMOSDIR} 329 -demosdir ${QTDEMOSDIR}
407 conf+=" -no-separate-debug-info" 358 conf+=" -no-separate-debug-info"
408 359
409 # exceptions USE flag 360 # exceptions USE flag
410 conf+=" $(in_iuse exceptions && qt_use exceptions || echo -exceptions)" 361 conf+=" $(in_iuse exceptions && qt_use exceptions || echo -exceptions)"
411 362
412 # disable rpath on Qt >= 4.8 (bug 380415) 363 # disable rpath (bug 380415), except on prefix (bug 417169)
413 # but leave it enabled on prefix (bug 417169) 364 use prefix || conf+=" -no-rpath"
414 version_is_at_least 4.8 && use !prefix && conf+=" -no-rpath"
415 365
416 # 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
417 conf+=" $(qt_use pch)" 367 conf+=" $(qt_use pch)"
418 368
419 # -reduce-relocations 369 # -reduce-relocations
432 if use_if_iuse glib; then 382 if use_if_iuse glib; then
433 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)"
434 # avoid the -pthread argument 384 # avoid the -pthread argument
435 conf+=" ${glibflags//-pthread}" 385 conf+=" ${glibflags//-pthread}"
436 unset glibflags 386 unset glibflags
437 fi
438
439 if use_if_iuse qpa; then
440 echo
441 ewarn "The qpa useflag enables the Qt Platform Abstraction, formely"
442 ewarn "known as Qt Lighthouse. If you are not sure what that is, then"
443 ewarn "disable it before reporting any bugs related to this useflag."
444 echo
445 conf+=" -qpa"
446 fi 387 fi
447 388
448 if use aqua; then 389 if use aqua; then
449 # On (snow) leopard use the new (frameworked) cocoa code. 390 # On (snow) leopard use the new (frameworked) cocoa code.
450 if [[ ${CHOST##*-darwin} -ge 9 ]]; then 391 if [[ ${CHOST##*-darwin} -ge 9 ]]; then
488# @FUNCTION: qt4-build_src_test 429# @FUNCTION: qt4-build_src_test
489# @DESCRIPTION: 430# @DESCRIPTION:
490# Runs tests only in target directories. 431# Runs tests only in target directories.
491qt4-build_src_test() { 432qt4-build_src_test() {
492 # QtMultimedia does not have any test suite (bug #332299) 433 # QtMultimedia does not have any test suite (bug #332299)
493 [[ ${PN} == qt-multimedia ]] && return 434 [[ ${CATEGORY}/${PN} == dev-qt/qtmultimedia ]] && return
494 435
495 for dir in ${QT4_TARGET_DIRECTORIES}; do 436 for dir in ${QT4_TARGET_DIRECTORIES}; do
496 emake -j1 check -C ${dir} 437 emake -j1 check -C ${dir}
497 done 438 done
498} 439}
542 483
543# @FUNCTION: qt4-build_src_install 484# @FUNCTION: qt4-build_src_install
544# @DESCRIPTION: 485# @DESCRIPTION:
545# Perform the actual installation including some library fixes. 486# Perform the actual installation including some library fixes.
546qt4-build_src_install() { 487qt4-build_src_install() {
547 [[ ${EAPI} == 2 ]] && use !prefix && ED=${D}
548 setqtenv 488 setqtenv
549 489
550 install_directories ${QT4_TARGET_DIRECTORIES} 490 install_directories ${QT4_TARGET_DIRECTORIES}
551 install_qconfigs 491 install_qconfigs
552 fix_library_files 492 fix_library_files
553 fix_includes 493 fix_includes
554 494
555 # remove .la files since we are building only shared Qt libraries 495 # remove .la files since we are building only shared libraries
556 find "${D}"${QTLIBDIR} -type f -name '*.la' -print0 | xargs -0 rm -f 496 prune_libtool_files
557} 497}
558 498
559# @FUNCTION: setqtenv 499# @FUNCTION: setqtenv
560# @INTERNAL 500# @INTERNAL
561setqtenv() { 501setqtenv() {
562 # Set up installation directories 502 # Set up installation directories
563 QTPREFIXDIR=${EPREFIX}/usr 503 QTPREFIXDIR=${EPREFIX}/usr
564 QTBINDIR=${EPREFIX}/usr/bin 504 QTBINDIR=${QTPREFIXDIR}/bin
565 QTLIBDIR=${EPREFIX}/usr/$(get_libdir)/qt4 505 QTLIBDIR=${QTPREFIXDIR}/$(get_libdir)/qt4
566 QTPCDIR=${EPREFIX}/usr/$(get_libdir)/pkgconfig 506 QTPCDIR=${QTPREFIXDIR}/$(get_libdir)/pkgconfig
567 QTDOCDIR=${EPREFIX}/usr/share/doc/qt-${PV} 507 QTDOCDIR=${QTPREFIXDIR}/share/doc/qt-${PV}
568 QTHEADERDIR=${EPREFIX}/usr/include/qt4 508 QTHEADERDIR=${QTPREFIXDIR}/include/qt4
569 QTPLUGINDIR=${QTLIBDIR}/plugins 509 QTPLUGINDIR=${QTLIBDIR}/plugins
570 QTIMPORTDIR=${QTLIBDIR}/imports 510 QTIMPORTDIR=${QTLIBDIR}/imports
571 QTDATADIR=${EPREFIX}/usr/share/qt4 511 QTDATADIR=${QTPREFIXDIR}/share/qt4
572 QTTRANSDIR=${QTDATADIR}/translations 512 QTTRANSDIR=${QTDATADIR}/translations
573 QTSYSCONFDIR=${EPREFIX}/etc/qt4 513 QTSYSCONFDIR=${EPREFIX}/etc/qt4
574 QTEXAMPLESDIR=${QTDATADIR}/examples 514 QTEXAMPLESDIR=${QTDATADIR}/examples
575 QTDEMOSDIR=${QTDATADIR}/demos 515 QTDEMOSDIR=${QTDATADIR}/demos
576 QMAKE_LIBDIR_QT=${QTLIBDIR} 516 QMAKE_LIBDIR_QT=${QTLIBDIR}
577 QT_INSTALL_PREFIX=${EPREFIX}/usr/$(get_libdir)/qt4
578 517
579 PLATFORM=$(qt_mkspecs_dir) 518 PLATFORM=$(qt_mkspecs_dir)
580 unset QMAKESPEC 519 unset QMAKESPEC
581 520
582 export XDG_CONFIG_HOME="${T}" 521 export XDG_CONFIG_HOME="${T}"
589# Generates Makefiles for the given list of directories. 528# Generates Makefiles for the given list of directories.
590prepare_directories() { 529prepare_directories() {
591 for x in "$@"; do 530 for x in "$@"; do
592 pushd "${S}"/${x} >/dev/null || die 531 pushd "${S}"/${x} >/dev/null || die
593 einfo "Running qmake in: ${x}" 532 einfo "Running qmake in: ${x}"
594 # avoid running over the maximum argument number, bug #299810 533 "${S}"/bin/qmake \
595 { 534 "LIBS+=-L${QTLIBDIR}" \
596 echo "${S}"/mkspecs/common/*.conf 535 "CONFIG+=nostrip" \
597 find "${S}" -name '*.pr[io]' 536 || die "qmake failed"
598 } | xargs sed -i \
599 -e "s:\$\$\[QT_INSTALL_LIBS\]:${QTLIBDIR}:g" \
600 -e "s:\$\$\[QT_INSTALL_PLUGINS\]:${QTPLUGINDIR}:g" \
601 || die
602 "${S}"/bin/qmake "LIBS+=-L${QTLIBDIR}" "CONFIG+=nostrip" || die "qmake failed"
603 popd >/dev/null || die 537 popd >/dev/null || die
604 done 538 done
605} 539}
606
607 540
608# @FUNCTION: build_directories 541# @FUNCTION: build_directories
609# @USAGE: < directories > 542# @USAGE: < directories >
610# @INTERNAL 543# @INTERNAL
611# @DESCRIPTION: 544# @DESCRIPTION:
612# Compiles the code in the given list of directories. 545# Compiles the code in the given list of directories.
613build_directories() { 546build_directories() {
614 for x in "$@"; do 547 for x in "$@"; do
615 pushd "${S}"/${x} >/dev/null || die 548 pushd "${S}"/${x} >/dev/null || die
549 emake \
550 AR="$(tc-getAR) cqs" \
616 emake CC="$(tc-getCC)" \ 551 CC="$(tc-getCC)" \
617 CXX="$(tc-getCXX)" \ 552 CXX="$(tc-getCXX)" \
618 LINK="$(tc-getCXX)" || die "emake failed" 553 LINK="$(tc-getCXX)" \
554 RANLIB=":" \
555 STRIP=":" \
556 || die "emake failed"
619 popd >/dev/null || die 557 popd >/dev/null || die
620 done 558 done
621} 559}
622 560
623# @FUNCTION: install_directories 561# @FUNCTION: install_directories
674# @FUNCTION: generate_qconfigs 612# @FUNCTION: generate_qconfigs
675# @INTERNAL 613# @INTERNAL
676# @DESCRIPTION: 614# @DESCRIPTION:
677# Generates gentoo-specific qconfig.{h,pri}. 615# Generates gentoo-specific qconfig.{h,pri}.
678generate_qconfigs() { 616generate_qconfigs() {
679 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
680 local x qconfig_add qconfig_remove qconfig_new 618 local x qconfig_add qconfig_remove qconfig_new
681 for x in "${ROOT}${QTDATADIR}"/mkspecs/gentoo/*-qconfig.pri; do 619 for x in "${ROOT}${QTDATADIR}"/mkspecs/gentoo/*-qconfig.pri; do
682 [[ -f ${x} ]] || continue 620 [[ -f ${x} ]] || continue
683 qconfig_add+=" $(sed -n 's/^QCONFIG_ADD=//p' "${x}")" 621 qconfig_add+=" $(sed -n 's/^QCONFIG_ADD=//p' "${x}")"
684 qconfig_remove+=" $(sed -n 's/^QCONFIG_REMOVE=//p' "${x}")" 622 qconfig_remove+=" $(sed -n 's/^QCONFIG_REMOVE=//p' "${x}")"
685 done 623 done
686 624
687 # 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}
688 # just makes things worse. 626 # just makes things worse.
689 if [[ -e "${ROOT}${QTDATADIR}"/mkspecs/gentoo/qconfig.pri ]]; then 627 if [[ -e "${ROOT}${QTDATADIR}"/mkspecs/gentoo/qconfig.pri ]]; then
690 # start with the qconfig.pri that qt-core installed 628 # start with the qconfig.pri that qtcore installed
691 if ! cp "${ROOT}${QTDATADIR}"/mkspecs/gentoo/qconfig.pri \ 629 if ! cp "${ROOT}${QTDATADIR}"/mkspecs/gentoo/qconfig.pri \
692 "${ROOT}${QTDATADIR}"/mkspecs/qconfig.pri; then 630 "${ROOT}${QTDATADIR}"/mkspecs/qconfig.pri; then
693 eerror "cp qconfig failed." 631 eerror "cp qconfig failed."
694 return 1 632 return 1
695 fi 633 fi
747} 685}
748 686
749# @FUNCTION: skip_qmake_build 687# @FUNCTION: skip_qmake_build
750# @INTERNAL 688# @INTERNAL
751# @DESCRIPTION: 689# @DESCRIPTION:
752# 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.
753skip_qmake_build() { 691skip_qmake_build() {
754 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
755} 693}
756 694
757# @FUNCTION: skip_project_generation 695# @FUNCTION: skip_project_generation

Legend:
Removed from v.1.134  
changed lines
  Added in v.1.145

  ViewVC Help
Powered by ViewVC 1.1.20