summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-libs/libcxx/libcxx-11.0.0.9999.ebuild')
-rw-r--r--sys-libs/libcxx/libcxx-11.0.0.9999.ebuild17
1 files changed, 11 insertions, 6 deletions
diff --git a/sys-libs/libcxx/libcxx-11.0.0.9999.ebuild b/sys-libs/libcxx/libcxx-11.0.0.9999.ebuild
index c8f3b48d30c5..a06bb57dd7bd 100644
--- a/sys-libs/libcxx/libcxx-11.0.0.9999.ebuild
+++ b/sys-libs/libcxx/libcxx-11.0.0.9999.ebuild
@@ -34,12 +34,6 @@ BDEPEND="
DOCS=( CREDITS.TXT )
-PATCHES=(
- # Add link flag "-Wl,-z,defs" to avoid underlinking; this is needed in a
- # out-of-tree build.
- "${FILESDIR}/${PN}-3.9-cmake-link-flags.patch"
-)
-
# least intrusive of all
CMAKE_BUILD_TYPE=RelWithDebInfo
@@ -59,6 +53,17 @@ pkg_setup() {
fi
}
+src_prepare() {
+ # Add link flag "-Wl,-z,defs" to avoid underlinking; this is needed in a
+ # out-of-tree build.
+ eapply "${FILESDIR}/${PN}-3.9-cmake-link-flags.patch"
+
+ # cmake eclasses suck by forcing ${S} here
+ CMAKE_USE_DIR=${S} \
+ S=${WORKDIR} \
+ cmake-utils_src_prepare
+}
+
test_compiler() {
$(tc-getCXX) ${CXXFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c++ - \
<<<'int main() { return 0; }' &>/dev/null