summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-06-20 18:24:09 +0200
committerMichał Górny <mgorny@gentoo.org>2020-06-20 18:32:55 +0200
commitb18dd9cc1373f55bfcfcb0d323c4ca56a02b1db9 (patch)
tree53d2cc904421f44191c19e40f3e02aeb19cca8e1 /sys-libs/libcxx
parentsys-libs/libcxxabi: Port to py3.9 (diff)
downloadgentoo-b18dd9cc1373f55bfcfcb0d323c4ca56a02b1db9.tar.gz
gentoo-b18dd9cc1373f55bfcfcb0d323c4ca56a02b1db9.tar.bz2
gentoo-b18dd9cc1373f55bfcfcb0d323c4ca56a02b1db9.zip
sys-libs/libcxx: Apply patches in WORKDIR in 10.0.1+
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'sys-libs/libcxx')
-rw-r--r--sys-libs/libcxx/libcxx-10.0.1.9999.ebuild17
-rw-r--r--sys-libs/libcxx/libcxx-10.0.1_rc1.ebuild17
-rw-r--r--sys-libs/libcxx/libcxx-11.0.0.9999.ebuild17
3 files changed, 33 insertions, 18 deletions
diff --git a/sys-libs/libcxx/libcxx-10.0.1.9999.ebuild b/sys-libs/libcxx/libcxx-10.0.1.9999.ebuild
index 6e1bba971a9b..8e1fa4f04199 100644
--- a/sys-libs/libcxx/libcxx-10.0.1.9999.ebuild
+++ b/sys-libs/libcxx/libcxx-10.0.1.9999.ebuild
@@ -33,12 +33,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
@@ -58,6 +52,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
diff --git a/sys-libs/libcxx/libcxx-10.0.1_rc1.ebuild b/sys-libs/libcxx/libcxx-10.0.1_rc1.ebuild
index 6e1bba971a9b..8e1fa4f04199 100644
--- a/sys-libs/libcxx/libcxx-10.0.1_rc1.ebuild
+++ b/sys-libs/libcxx/libcxx-10.0.1_rc1.ebuild
@@ -33,12 +33,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
@@ -58,6 +52,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
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