1 | # Copyright 1999-2012 Gentoo Foundation |
1 | # Copyright 1999-2012 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.121 2012/03/01 15:06:00 pesa Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.122 2012/03/01 15:19:14 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. |
… | |
… | |
751 | # @RETURN: the specs-directory w/o path |
751 | # @RETURN: the specs-directory w/o path |
752 | # @DESCRIPTION: |
752 | # @DESCRIPTION: |
753 | # Allows us to define which mkspecs dir we want to use. |
753 | # Allows us to define which mkspecs dir we want to use. |
754 | qt_mkspecs_dir() { |
754 | qt_mkspecs_dir() { |
755 | local spec= |
755 | local spec= |
|
|
756 | |
756 | case ${CHOST} in |
757 | case "${CHOST}" in |
757 | *-freebsd*|*-dragonfly*) |
758 | *-freebsd*|*-dragonfly*) |
758 | spec=freebsd ;; |
759 | spec=freebsd ;; |
759 | *-openbsd*) |
760 | *-openbsd*) |
760 | spec=openbsd ;; |
761 | spec=openbsd ;; |
761 | *-netbsd*) |
762 | *-netbsd*) |
… | |
… | |
772 | *-solaris*) |
773 | *-solaris*) |
773 | spec=solaris ;; |
774 | spec=solaris ;; |
774 | *-linux-*|*-linux) |
775 | *-linux-*|*-linux) |
775 | spec=linux ;; |
776 | spec=linux ;; |
776 | *) |
777 | *) |
777 | die "Unknown CHOST, no platform chosen" |
778 | die "${FUNCNAME}(): Unknown CHOST '${CHOST}'" ;; |
778 | esac |
779 | esac |
779 | |
780 | |
780 | CXX=$(tc-getCXX) |
781 | case "$(tc-getCXX)" in |
781 | if [[ ${CXX} == *g++* ]]; then |
782 | *g++*) |
782 | spec+=-g++ |
783 | spec+=-g++ ;; |
783 | elif [[ ${CXX} == *icpc* ]]; then |
784 | *icpc*) |
784 | spec+=-icc |
785 | spec+=-icc ;; |
785 | else |
786 | *) |
786 | die "Unknown compiler '${CXX}'" |
787 | die "${FUNCNAME}(): Unknown compiler '$(tc-getCXX)'" ;; |
787 | fi |
788 | esac |
788 | |
789 | |
789 | # Add -64 for 64bit profiles |
790 | # Add -64 for 64bit profiles |
790 | if use x64-freebsd || |
791 | if use x64-freebsd || |
791 | use amd64-linux || |
792 | use amd64-linux || |
792 | use x64-macos || |
793 | use x64-macos || |