/[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.29 Revision 1.32
1# Copyright 2007-2009 Gentoo Foundation 1# Copyright 2007-2009 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.29 2009/03/28 00:21:13 gengor Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.32 2009/04/23 11:45:38 hwoarang Exp $
4 4
5# @ECLASS: qt4-build.eclass 5# @ECLASS: qt4-build.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Ben de Groot <yngwin@gentoo.org>, 7# Ben de Groot <yngwin@gentoo.org>,
8# Markos Chandras <hwoarang@gentoo.org>, 8# Markos Chandras <hwoarang@gentoo.org>,
50 fi 50 fi
51 51
52 # Check USE requirements 52 # Check USE requirements
53 qt4-build_check_use 53 qt4-build_check_use
54 fi 54 fi
55
56 # Set up installation directories 55 # Set up installation directories
57 QTBASEDIR=/usr/$(get_libdir)/qt4 56 QTBASEDIR=/usr/$(get_libdir)/qt4
58 QTPREFIXDIR=/usr 57 QTPREFIXDIR=/usr
59 QTBINDIR=/usr/bin 58 QTBINDIR=/usr/bin
60 QTLIBDIR=/usr/$(get_libdir)/qt4 59 QTLIBDIR=/usr/$(get_libdir)/qt4
74 LD_LIBRARY_PATH="${S}/lib:${LD_LIBRARY_PATH}" 73 LD_LIBRARY_PATH="${S}/lib:${LD_LIBRARY_PATH}"
75 74
76 if ! version_is_at_least 4.1 $(gcc-version) ; then 75 if ! version_is_at_least 4.1 $(gcc-version) ; then
77 ewarn "Using a GCC version lower than 4.1 is not supported!" 76 ewarn "Using a GCC version lower than 4.1 is not supported!"
78 echo 77 echo
79 ebeep 5 78 ebeep 3
80 fi 79 fi
81 80
82 if use custom-cxxflags; then 81 if use custom-cxxflags; then
83 echo 82 echo
84 ewarn "You have set USE=custom-cxxflags, which means Qt will be built with the" 83 ewarn "You have set USE=custom-cxxflags, which means Qt will be built with the"
133 # Don't let the user go too overboard with flags. 132 # Don't let the user go too overboard with flags.
134 strip-flags 133 strip-flags
135 replace-flags -O3 -O2 134 replace-flags -O3 -O2
136 fi 135 fi
137 136
137 # Bug 178652
138 if [[ "$(gcc-major-version)" == "3" ]] && use amd64; then
139 ewarn "Appending -fno-gcse to CFLAGS/CXXFLAGS"
140 append-flags -fno-gcse
141 fi
142
138 # Unsupported old gcc versions - hardened needs this :( 143 # Unsupported old gcc versions - hardened needs this :(
139 if [[ $(gcc-major-version) -lt "4" ]] ; then 144 if [[ $(gcc-major-version) -lt "4" ]] ; then
140 ewarn "Appending -fno-stack-protector to CXXFLAGS" 145 ewarn "Appending -fno-stack-protector to CXXFLAGS"
141 append-cxxflags -fno-stack-protector 146 append-cxxflags -fno-stack-protector
142 fi
143
144 # Bug 178652
145 if [[ "$(gcc-major-version)" == "3" ]] && use amd64; then
146 ewarn "Appending -fno-gcse to CFLAGS/CXXFLAGS"
147 append-flags -fno-gcse
148 fi
149
150 # Bug 253127 147 # Bug 253127
151 if [[ $(gcc-major-version) -lt "4" ]] ; then
152 sed -e "/^QMAKE_CFLAGS\t/ s:$: -fno-stack-protector-all:" \ 148 sed -e "/^QMAKE_CFLAGS\t/ s:$: -fno-stack-protector-all:" \
153 -i "${S}"/mkspecs/common/g++.conf || die "sed ${S}/mkspecs/common/g++.conf failed" 149 -i "${S}"/mkspecs/common/g++.conf || die "sed ${S}/mkspecs/common/g++.conf failed"
154 fi 150 fi
155 151
156 # Bug 172219 152 # Bug 172219
230 -plugindir ${QTPLUGINDIR} -sysconfdir ${QTSYSCONFDIR} 226 -plugindir ${QTPLUGINDIR} -sysconfdir ${QTSYSCONFDIR}
231 -translationdir ${QTTRANSDIR} -examplesdir ${QTEXAMPLESDIR} 227 -translationdir ${QTTRANSDIR} -examplesdir ${QTEXAMPLESDIR}
232 -demosdir ${QTDEMOSDIR} -silent -fast 228 -demosdir ${QTDEMOSDIR} -silent -fast
233 $([[ ${PN} == qt-xmlpatterns ]] || echo -no-exceptions) 229 $([[ ${PN} == qt-xmlpatterns ]] || echo -no-exceptions)
234 -reduce-relocations -nomake examples -nomake demos" 230 -reduce-relocations -nomake examples -nomake demos"
231
232 # Make eclass 4.5.{1,2} ready
233 case "${MY_PV}" in
234 4.5.1 | 4.5.2)
235 myconf="${myconf} -opensource"
236 ;;
237 esac
235 238
236 echo "${myconf}" 239 echo "${myconf}"
237} 240}
238 241
239build_directories() { 242build_directories() {

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.32

  ViewVC Help
Powered by ViewVC 1.1.20