summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenda Xu <heroxbd@gentoo.org>2016-03-04 07:03:54 +0900
committerBenda Xu <heroxbd@gentoo.org>2016-03-04 07:03:54 +0900
commit7e6efbc86266a92e930b99bb2f84ac6337968494 (patch)
tree58ae360f681a4d8ef650c3581494ae96ad81179d /dev-util
parentdev-utils/cmake: locate Qt4 inside $EPREFIX. (diff)
downloadandroid-7e6efbc86266a92e930b99bb2f84ac6337968494.tar.gz
android-7e6efbc86266a92e930b99bb2f84ac6337968494.tar.bz2
android-7e6efbc86266a92e930b99bb2f84ac6337968494.zip
dev-utils/cmake: runtime test of utimensat.
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/cmake/cmake-3.4.3.ebuild1
-rw-r--r--dev-util/cmake/files/cmake-3.4.3-utimensat-test.patch33
2 files changed, 34 insertions, 0 deletions
diff --git a/dev-util/cmake/cmake-3.4.3.ebuild b/dev-util/cmake/cmake-3.4.3.ebuild
index 2de6794..802fc61 100644
--- a/dev-util/cmake/cmake-3.4.3.ebuild
+++ b/dev-util/cmake/cmake-3.4.3.ebuild
@@ -65,6 +65,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-3.1.0-FindPythonInterp.patch
# upstream fixes (can usually be removed with a version bump)
+ "${FILESDIR}"/${PN}-3.4.3-utimensat-test.patch
)
cmake_src_bootstrap() {
diff --git a/dev-util/cmake/files/cmake-3.4.3-utimensat-test.patch b/dev-util/cmake/files/cmake-3.4.3-utimensat-test.patch
new file mode 100644
index 0000000..42a06a5
--- /dev/null
+++ b/dev-util/cmake/files/cmake-3.4.3-utimensat-test.patch
@@ -0,0 +1,33 @@
+Before linux-2.6.22, utimensat does not exist in the kernel.
+>=glibc-2.6 exposes it, but would always fail if the kernel
+does not has an implementation.
+
+Just compiling utimensat does not mean it is usable. Thus
+runtime test is necessary.
+
+Index: cmake-3.4.3/Source/kwsys/CMakeLists.txt
+===================================================================
+--- cmake-3.4.3.orig/Source/kwsys/CMakeLists.txt
++++ cmake-3.4.3/Source/kwsys/CMakeLists.txt
+@@ -509,7 +509,7 @@ IF(KWSYS_USE_SystemTools)
+ "Checking whether CXX compiler has environ in stdlib.h" DIRECT)
+ KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_UTIMES
+ "Checking whether CXX compiler has utimes" DIRECT)
+- KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_UTIMENSAT
++ KWSYS_PLATFORM_CXX_TEST_RUN(KWSYS_CXX_HAS_UTIMENSAT
+ "Checking whether CXX compiler has utimensat" DIRECT)
+ SET_PROPERTY(SOURCE SystemTools.cxx APPEND PROPERTY COMPILE_DEFINITIONS
+ KWSYS_CXX_HAS_SETENV=${KWSYS_CXX_HAS_SETENV}
+Index: cmake-3.4.3/Source/kwsys/kwsysPlatformTestsCXX.cxx
+===================================================================
+--- cmake-3.4.3.orig/Source/kwsys/kwsysPlatformTestsCXX.cxx
++++ cmake-3.4.3/Source/kwsys/kwsysPlatformTestsCXX.cxx
+@@ -272,7 +272,7 @@ int main()
+ int main()
+ {
+ struct timespec times[2] = {{0,UTIME_OMIT},{0,UTIME_NOW}};
+- return utimensat(AT_FDCWD, "/example", times, AT_SYMLINK_NOFOLLOW);
++ return utimensat(AT_FDCWD, ".", times, AT_SYMLINK_NOFOLLOW);
+ }
+ #endif
+