Skip to content

Commit

Permalink
dev-util/cmake: fix compilation on Darwin, bug #652134
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/652134
Package-Manager: Portage-2.3.24, Repoman-2.3.6
  • Loading branch information
grobian committed Apr 25, 2018
1 parent c48adfe commit 7255548
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
9 changes: 8 additions & 1 deletion dev-util/cmake/cmake-3.11.0.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ cmake_src_bootstrap() {

# execinfo.h on Solaris isn't quite what it is on Darwin
if [[ ${CHOST} == *-solaris* ]] ; then
sed -i -e 's/execinfo\.h/blablabla.h/' Source/kwsys/CMakeLists.txt || die
sed -i -e 's/execinfo\.h/blablabla.h/' \
Source/kwsys/CMakeLists.txt || die
fi

tc-export CC CXX LD
Expand Down Expand Up @@ -123,6 +124,12 @@ cmake_src_test() {
src_prepare() {
cmake-utils_src_prepare

# disable Xcode hooks, bug #652134
if [[ ${CHOST} == *-darwin* ]] ; then
sed -i -e 's/__APPLE__/__DISABLED_APPLE__/' \
Source/cmGlobalXCodeGenerator.cxx || die
fi

# Add gcc libs to the default link paths
sed -i \
-e "s|@GENTOO_PORTAGE_GCCLIBDIR@|${EPREFIX}/usr/${CHOST}/lib/|g" \
Expand Down
9 changes: 8 additions & 1 deletion dev-util/cmake/cmake-3.11.1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ cmake_src_bootstrap() {

# execinfo.h on Solaris isn't quite what it is on Darwin
if [[ ${CHOST} == *-solaris* ]] ; then
sed -i -e 's/execinfo\.h/blablabla.h/' Source/kwsys/CMakeLists.txt || die
sed -i -e 's/execinfo\.h/blablabla.h/' \
Source/kwsys/CMakeLists.txt || die
fi

tc-export CC CXX LD
Expand Down Expand Up @@ -123,6 +124,12 @@ cmake_src_test() {
src_prepare() {
cmake-utils_src_prepare

# disable Xcode hooks, bug #652134
if [[ ${CHOST} == *-darwin* ]] ; then
sed -i -e 's/__APPLE__/__DISABLED_APPLE__/' \
Source/cmGlobalXCodeGenerator.cxx || die
fi

# Add gcc libs to the default link paths
sed -i \
-e "s|@GENTOO_PORTAGE_GCCLIBDIR@|${EPREFIX}/usr/${CHOST}/lib/|g" \
Expand Down

0 comments on commit 7255548

Please sign in to comment.