|
Lines 8-14
Link Here
|
| 8 |
|
8 |
|
| 9 |
[ "${PV%9999}" != "${PV}" ] && SCM="subversion" || SCM="" |
9 |
[ "${PV%9999}" != "${PV}" ] && SCM="subversion" || SCM="" |
| 10 |
|
10 |
|
| 11 |
inherit cmake-utils ${SCM} base flag-o-matic toolchain-funcs multilib |
11 |
inherit cmake-utils cmake-multilib ${SCM} base flag-o-matic toolchain-funcs multilib |
| 12 |
|
12 |
|
| 13 |
DESCRIPTION="New implementation of the C++ standard library, targeting C++11" |
13 |
DESCRIPTION="New implementation of the C++ standard library, targeting C++11" |
| 14 |
HOMEPAGE="http://libcxx.llvm.org/" |
14 |
HOMEPAGE="http://libcxx.llvm.org/" |
|
Lines 66-91
Link Here
|
| 66 |
|
66 |
|
| 67 |
if use static-libs ; then |
67 |
if use static-libs ; then |
| 68 |
local mycmakeargs=( "${mycmakeargs_base[@]}" "-DLIBCXX_ENABLE_SHARED=OFF" ) |
68 |
local mycmakeargs=( "${mycmakeargs_base[@]}" "-DLIBCXX_ENABLE_SHARED=OFF" ) |
| 69 |
BUILD_DIR="${S}_static" cmake-utils_src_configure |
69 |
BUILD_DIR="${S}_static" cmake-multilib_src_configure |
| 70 |
fi |
70 |
fi |
| 71 |
local mycmakeargs=( "${mycmakeargs_base[@]}" ) |
71 |
local mycmakeargs=( "${mycmakeargs_base[@]}" ) |
| 72 |
BUILD_DIR="${S}_shared" cmake-utils_src_configure |
72 |
BUILD_DIR="${S}_shared" cmake-multilib_src_configure |
| 73 |
} |
73 |
} |
| 74 |
|
74 |
|
| 75 |
src_compile() { |
75 |
src_compile() { |
| 76 |
use static-libs && BUILD_DIR="${S}_static" cmake-utils_src_compile |
76 |
use static-libs && BUILD_DIR="${S}_static" cmake-multilib_src_compile |
| 77 |
BUILD_DIR="${S}_shared" cmake-utils_src_compile |
77 |
BUILD_DIR="${S}_shared" cmake-multilib_src_compile |
| 78 |
} |
78 |
} |
| 79 |
|
79 |
|
| 80 |
# Tests fail for now, if anybody is able to fix them, help is very welcome. |
80 |
# Tests fail for now, if anybody is able to fix them, help is very welcome. |
| 81 |
src_test() { |
81 |
src_test() { |
| 82 |
cd "${S}/test" |
82 |
do_libcxx_multilib_test(){ |
| 83 |
LD_LIBRARY_PATH="${S}_shared/lib:${LD_LIBRARY_PATH}" \ |
83 |
cp -rp "${S}"/test/* "${BUILD_DIR}"/test/ |
|
|
84 |
cd "${BUILD_DIR}/test" |
| 85 |
|
| 86 |
case ${ABI} in |
| 87 |
x86|x86_fbsd) local add_cflags="-m32" ;; |
| 88 |
esac |
| 89 |
|
| 90 |
if [[ ${ABI} == x86_fbsd ]] && has_multilib_profile ; then |
| 91 |
export LD_32_LIBRARY_PATH="${BUILD_DIR}/lib:${LD_32_LIBRARY_PATH}" |
| 92 |
else |
| 93 |
export LD_LIBRARY_PATH="${BUILD_DIR}/lib:${LD_LIBRARY_PATH}" |
| 94 |
fi |
| 95 |
|
| 84 |
CC="clang++" \ |
96 |
CC="clang++" \ |
| 85 |
HEADER_INCLUDE="-I${S}/include" \ |
97 |
OPTIONS="${add_cflags} -std=c++0x -stdlib=libc++" \ |
| 86 |
SOURCE_LIB="-L${S}_shared/lib" \ |
98 |
HEADER_INCLUDE="-I${BUILD_DIR}/include" \ |
| 87 |
LIBS="-lm" \ |
99 |
SOURCE_LIB="-L${BUILD_DIR}/lib" \ |
| 88 |
./testit || die |
100 |
LIBS="-lm" \ |
|
|
101 |
./testit || die |
| 102 |
} |
| 103 |
|
| 104 |
BUILD_DIR="${S}_shared" multilib_foreach_abi do_libcxx_multilib_test |
| 89 |
} |
105 |
} |
| 90 |
|
106 |
|
| 91 |
gen_static_ldscript() { |
107 |
gen_static_ldscript() { |
|
Lines 119-128
Link Here
|
| 119 |
|
135 |
|
| 120 |
src_install() { |
136 |
src_install() { |
| 121 |
if use static-libs ; then |
137 |
if use static-libs ; then |
| 122 |
BUILD_DIR="${S}_static" cmake-utils_src_install |
138 |
BUILD_DIR="${S}_static" cmake-multilib_src_install |
| 123 |
gen_static_ldscript |
139 |
multilib_foreach_abi gen_static_ldscript |
| 124 |
fi |
140 |
fi |
| 125 |
BUILD_DIR="${S}_shared" cmake-utils_src_install |
141 |
BUILD_DIR="${S}_shared" cmake-multilib_src_install |
| 126 |
} |
142 |
} |
| 127 |
|
143 |
|
| 128 |
pkg_postinst() { |
144 |
pkg_postinst() { |