From b18dd9cc1373f55bfcfcb0d323c4ca56a02b1db9 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Sat, 20 Jun 2020 18:24:09 +0200 Subject: sys-libs/libcxx: Apply patches in WORKDIR in 10.0.1+ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- sys-libs/libcxx/libcxx-10.0.1.9999.ebuild | 17 +++++++++++------ sys-libs/libcxx/libcxx-10.0.1_rc1.ebuild | 17 +++++++++++------ sys-libs/libcxx/libcxx-11.0.0.9999.ebuild | 17 +++++++++++------ 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 -- cgit v1.2.3-65-gdbad