/[gentoo-x86]/dev-lang/path64/path64-1.0.0_pre20110924.ebuild
Gentoo

Contents of /dev-lang/path64/path64-1.0.0_pre20110924.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sat Sep 24 10:04:20 2011 UTC (2 years, 11 months ago) by xarthisius
Branch: MAIN
CVS Tags: HEAD
Version bump, drop old

(Portage version: 2.2.0_alpha59/cvs/Linux x86_64)

1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-lang/path64/path64-1.0.0_pre20110821.ebuild,v 1.2 2011/08/29 06:22:33 xarthisius Exp $
4
5 EAPI=4
6 CMAKE_VERBOSE=1
7 MY_MIRROR=http://dev.gentoo.org/~xarthisius/distfiles
8
9 inherit cmake-utils multilib toolchain-funcs
10
11 DESCRIPTION="Path64 Compiler Suite Community Edition"
12 HOMEPAGE="http://www.pathscale.com/ekopath-compiler-suite"
13 SRC_URI="${MY_MIRROR}/${PN}-suite-${PV}.tbz2
14 ${MY_MIRROR}/${PN}-compiler-${PV}.tbz2
15 assembler? ( ${MY_MIRROR}/${PN}-assembler-${PV}.tbz2 )
16 debugger? ( ${MY_MIRROR}/${PN}-debugger-${PV}.tbz2 )"
17
18 LICENSE="GPL-3"
19 SLOT="0"
20 KEYWORDS="~amd64"
21 IUSE="assembler custom-cflags debugger fortran +native +openmp valgrind"
22
23 DEPEND="!native? ( sys-devel/gcc[vanilla] )
24 native? ( || ( dev-lang/ekopath dev-lang/path64 ) )
25 valgrind? ( dev-util/valgrind )"
26 RDEPEND="${DEPEND}"
27
28 S=${WORKDIR}/${PN}
29
30 pkg_setup() {
31 if use custom-cflags ; then
32 ewarn "You are trying to build ${PN} with custom-cflags"
33 ewarn "There is a high chance that you will utterly fail!"
34 ewarn "Unless you know what you are doing you'd better stop now"
35 ewarn "Should you decide to proceed, you are on your own..."
36 fi
37 }
38
39 src_prepare() {
40 local ver=$(grep 'SET(PSC_FULL_VERSION' CMakeLists.txt | cut -d'"' -f2)
41 cat > "98${PN}" <<-EOF
42 PATH=/usr/$(get_libdir)/${PN}/bin
43 ROOTPATH=/usr/$(get_libdir)/${PN}/bin
44 LDPATH=/usr/$(get_libdir)/${PN}/lib:/usr/$(get_libdir)/${PN}/lib/${ver}/x8664/64
45 EOF
46 sed -i -e "s/-Wl,-s //" CMakeLists.txt || die #strip
47 }
48
49 src_configure() {
50 local linker=$($(tc-getCC) --help -v 2>&1 >/dev/null | \
51 sed -n -e '/dynamic-linker/s:.* -dynamic-linker \([^ ]\+\) .*:\1:p')
52 local libgcc=$($(tc-getCC) -print-libgcc-file-name)
53 use custom-cflags && flags=(
54 -DCMAKE_C_FLAGS="${CFLAGS}"
55 -DCMAKE_CXX_FLAGS="${CXXFLAGS}"
56 )
57
58 # Yup, I know how bad it is, but I'd rather have a working compiler
59 unset FC F90 F77 FCFLAGS F90FLAGS FFLAGS CFLAGS CXXFLAGS
60
61 if use native ; then
62 export CMAKE_BUILD_TYPE=Release
63 export CC=pathcc
64 export CXX=pathCC
65 export MYCMAKEARGS="-UCMAKE_USER_MAKE_RULES_OVERRIDE"
66 else
67 export CMAKE_BUILD_TYPE=Debug
68 fi
69 mycmakeargs=(
70 -DCMAKE_INSTALL_PREFIX=/usr/$(get_libdir)/${PN}
71 -DPATH64_ENABLE_TARGETS="x86_64"
72 -DPATH64_ENABLE_PROFILING=ON
73 -DPATH64_ENABLE_MATHLIBS=ON
74 -DPATH64_ENABLE_PATHOPT2=OFF
75 $(cmake-utils_use assembler PATH64_ENABLE_PATHAS)
76 $(cmake-utils_use assembler PATH64_ENABLE_DEFAULT_PATHAS)
77 $(cmake-utils_use fortran PATH64_ENABLE_FORTRAN)
78 $(cmake-utils_use openmp PATH64_ENABLE_OPENMP)
79 $(cmake-utils_use debugger PATH64_ENABLE_PATHDB)
80 $(cmake-utils_use valgrind PATH64_ENABLE_VALGRIND)
81 -DPSC_CRT_PATH_x86_64=/usr/$(get_libdir)
82 -DPSC_CRTBEGIN_PATH=$(dirname ${libgcc})
83 -DPSC_DYNAMIC_LINKER_x86_64=${linker}
84 -DCMAKE_C_COMPILER="$(tc-getCC)"
85 -DCMAKE_CXX_COMPILER="$(tc-getCXX)"
86 "${flags[@]}"
87 )
88 cmake-utils_src_configure
89 }
90
91 src_install() {
92 cmake-utils_src_install
93 doenvd "98${PN}"
94 }

  ViewVC Help
Powered by ViewVC 1.1.20