/[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.16 Revision 1.18
1# Copyright 2007-2008 Gentoo Foundation 1# Copyright 2007-2008 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.16 2008/09/18 22:07:50 yngwin Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.18 2009/01/21 08:55:28 gengor Exp $
4 4
5# @ECLASS: qt4-build.eclass 5# @ECLASS: qt4-build.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Caleb Tennis <caleb@gentoo.org> 7# Caleb Tennis <caleb@gentoo.org>
8# @BLURB: Eclass for Qt4 split ebuilds. 8# @BLURB: Eclass for Qt4 split ebuilds.
91 skip_qmake_build_patch 91 skip_qmake_build_patch
92 skip_project_generation_patch 92 skip_project_generation_patch
93 symlink_binaries_to_buildtree 93 symlink_binaries_to_buildtree
94 fi 94 fi
95 95
96 # Bug 253127
97 if [[ $(gcc-major-version) -lt "4" ]] ; then
98 sed -e "/^QMAKE_CFLAGS\t/ s:$: -fno-stack-protector-all:" \
99 -i "${S}"/mkspecs/common/g++.conf || die "sed ${S}/mkspecs/common/g++.conf failed"
100 fi
101
96 sed -e "s:QMAKE_CFLAGS_RELEASE.*=.*:QMAKE_CFLAGS_RELEASE=${CFLAGS}:" \ 102 sed -e "s:QMAKE_CFLAGS_RELEASE.*=.*:QMAKE_CFLAGS_RELEASE=${CFLAGS}:" \
97 -e "s:QMAKE_CXXFLAGS_RELEASE.*=.*:QMAKE_CXXFLAGS_RELEASE=${CXXFLAGS}:" \ 103 -e "s:QMAKE_CXXFLAGS_RELEASE.*=.*:QMAKE_CXXFLAGS_RELEASE=${CXXFLAGS}:" \
98 -e "s:QMAKE_LFLAGS_RELEASE.*=.*:QMAKE_LFLAGS_RELEASE=${LDFLAGS}:" \ 104 -e "s:QMAKE_LFLAGS_RELEASE.*=.*:QMAKE_LFLAGS_RELEASE=${LDFLAGS}:" \
99 -e "s:X11R6/::" \ 105 -e "s:X11R6/::" \
100 -i "${S}"/mkspecs/$(qt_mkspecs_dir)/qmake.conf || die "sed ${S}/mkspecs/$(qt_mkspecs_dir)/qmake.conf failed" 106 -i "${S}"/mkspecs/$(qt_mkspecs_dir)/qmake.conf || die "sed ${S}/mkspecs/$(qt_mkspecs_dir)/qmake.conf failed"
109 # Don't let the user go too overboard with flags. If you really want to, uncomment 115 # Don't let the user go too overboard with flags. If you really want to, uncomment
110 # out the line below and give 'er a whirl. 116 # out the line below and give 'er a whirl.
111 strip-flags 117 strip-flags
112 replace-flags -O3 -O2 118 replace-flags -O3 -O2
113 119
114 if [[ $(gcc-fullversion) == "3.4.6" && gcc-specs-ssp ]] ; then 120 if [[ $(gcc-major-version) -lt "4" ]] ; then
115 ewarn "Appending -fno-stack-protector to CFLAGS/CXXFLAGS" 121 ewarn "Appending -fno-stack-protector to CXXFLAGS"
116 append-flags -fno-stack-protector 122 append-cxxflags -fno-stack-protector
117 fi 123 fi
118 124
119 # Bug 178652 125 # Bug 178652
120 if [[ "$(gcc-major-version)" == "3" ]] && use amd64; then 126 if [[ "$(gcc-major-version)" == "3" ]] && use amd64; then
121 ewarn "Appending -fno-gcse to CFLAGS/CXXFLAGS" 127 ewarn "Appending -fno-gcse to CFLAGS/CXXFLAGS"
301 generate_qconfigs 307 generate_qconfigs
302} 308}
303 309
304qt4-build_pkg_postinst() { 310qt4-build_pkg_postinst() {
305 generate_qconfigs 311 generate_qconfigs
312 echo
313 ewarn "After a rebuild or upgrade of Qt, it can happen that Qt plugins (such as Qt"
314 ewarn "and KDE styles and widgets) can no longer be loaded. In this situation you"
315 ewarn "should recompile the packages providing these plugins. Also, make sure you"
316 ewarn "compile the Qt packages, and the packages that depend on it, with the same"
317 ewarn "GCC version and the same USE flag settings (especially the debug flag)."
318 ewarn
319 ewarn "Packages that typically need to be recompiled are kdelibs from KDE4, any"
320 ewarn "additional KDE4/Qt4 styles, qscintilla and PyQt4. Before filing a bug report,"
321 ewarn "make sure all your Qt4 packages are up-to-date and built with the same"
322 ewarn "configuration."
323 ewarn
324 ewarn "For more information, see http://doc.trolltech.com/4.4/plugins-howto.html"
325 echo
306} 326}
307 327
308skip_qmake_build_patch() { 328skip_qmake_build_patch() {
309 # Don't need to build qmake, as it's already installed from qt-core 329 # Don't need to build qmake, as it's already installed from qt-core
310 sed -i -e "s:if true:if false:g" "${S}"/configure || die "Sed failed" 330 sed -i -e "s:if true:if false:g" "${S}"/configure || die "Sed failed"

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.18

  ViewVC Help
Powered by ViewVC 1.1.20