Gentoo Archives: gentoo-commits

From: Christoph Junghans <ottxor@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-chemistry/votca-csg/, sci-chemistry/votca-csg/files/
Date: Thu, 14 Jul 2016 17:30:39
Message-Id: 1468517422.16bc156fe66e38628bca0158cadb6d479bacb171.ottxor@gentoo
1 commit: 16bc156fe66e38628bca0158cadb6d479bacb171
2 Author: Christoph Junghans <ottxor <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jul 14 17:08:20 2016 +0000
4 Commit: Christoph Junghans <ottxor <AT> gentoo <DOT> org>
5 CommitDate: Thu Jul 14 17:30:22 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=16bc156f
7
8 sci-chemistry/votca-csg: fix cmake-3.4 build (bug #588834)
9
10 Package-Manager: portage-2.2.28
11
12 .../votca-csg/files/votca-csg-1.3-cmake-3.4.patch | 62 ++++++++++++++++++++++
13 ...otca-csg-1.3.ebuild => votca-csg-1.3-r1.ebuild} | 9 ++--
14 2 files changed, 67 insertions(+), 4 deletions(-)
15
16 diff --git a/sci-chemistry/votca-csg/files/votca-csg-1.3-cmake-3.4.patch b/sci-chemistry/votca-csg/files/votca-csg-1.3-cmake-3.4.patch
17 new file mode 100644
18 index 0000000..59d83ca
19 --- /dev/null
20 +++ b/sci-chemistry/votca-csg/files/votca-csg-1.3-cmake-3.4.patch
21 @@ -0,0 +1,62 @@
22 +From 34d55f6d771bcf026f453457f45d787391910598 Mon Sep 17 00:00:00 2001
23 +From: Christoph Junghans <junghans@×××××.org>
24 +Date: Tue, 2 Feb 2016 13:56:50 -0700
25 +Subject: [PATCH] cmake: fixed CheckCXXLibraryExists() with >=cmake-3.4
26 +
27 +---
28 + CMakeModules/CheckCXXLibraryExists.cmake | 6 +-----
29 + CMakeModules/CheckFunctionExists.cpp | 23 +++++++++++++++++++++++
30 + 2 files changed, 24 insertions(+), 5 deletions(-)
31 + create mode 100644 CMakeModules/CheckFunctionExists.cpp
32 +
33 +diff --git a/CMakeModules/CheckCXXLibraryExists.cmake b/CMakeModules/CheckCXXLibraryExists.cmake
34 +index 9c76fe2..d84aea7 100644
35 +--- a/CMakeModules/CheckCXXLibraryExists.cmake
36 ++++ b/CMakeModules/CheckCXXLibraryExists.cmake
37 +@@ -54,13 +54,9 @@ macro(CHECK_CXX_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE)
38 + set(CHECK_LIBRARY_EXISTS_LIBRARIES
39 + ${CHECK_LIBRARY_EXISTS_LIBRARIES} ${CMAKE_REQUIRED_LIBRARIES})
40 + endif()
41 +- if(NOT EXISTS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckFunctionExists.cpp)
42 +- file(COPY ${CMAKE_ROOT}/Modules/CheckFunctionExists.c DESTINATION ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY})
43 +- file(RENAME ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckFunctionExists.c ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckFunctionExists.cpp)
44 +- endif()
45 + try_compile(${VARIABLE}
46 + ${CMAKE_BINARY_DIR}
47 +- ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckFunctionExists.cpp
48 ++ ${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/CheckFunctionExists.cpp
49 + COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
50 + LINK_LIBRARIES ${CHECK_LIBRARY_EXISTS_LIBRARIES}
51 + CMAKE_FLAGS
52 +diff --git a/CMakeModules/CheckFunctionExists.cpp b/CMakeModules/CheckFunctionExists.cpp
53 +new file mode 100644
54 +index 0000000..607b3e8
55 +--- /dev/null
56 ++++ b/CMakeModules/CheckFunctionExists.cpp
57 +@@ -0,0 +1,23 @@
58 ++#ifdef CHECK_FUNCTION_EXISTS
59 ++
60 ++char CHECK_FUNCTION_EXISTS();
61 ++#ifdef __CLASSIC_C__
62 ++int main(){
63 ++ int ac;
64 ++ char*av[];
65 ++#else
66 ++int main(int ac, char*av[]){
67 ++#endif
68 ++ CHECK_FUNCTION_EXISTS();
69 ++ if(ac > 1000)
70 ++ {
71 ++ return *av[0];
72 ++ }
73 ++ return 0;
74 ++}
75 ++
76 ++#else /* CHECK_FUNCTION_EXISTS */
77 ++
78 ++# error "CHECK_FUNCTION_EXISTS has to specify the function"
79 ++
80 ++#endif /* CHECK_FUNCTION_EXISTS */
81 +--
82 +2.7.3
83 +
84
85 diff --git a/sci-chemistry/votca-csg/votca-csg-1.3.ebuild b/sci-chemistry/votca-csg/votca-csg-1.3-r1.ebuild
86 similarity index 95%
87 rename from sci-chemistry/votca-csg/votca-csg-1.3.ebuild
88 rename to sci-chemistry/votca-csg/votca-csg-1.3-r1.ebuild
89 index 87883b4..5f6435b 100644
90 --- a/sci-chemistry/votca-csg/votca-csg-1.3.ebuild
91 +++ b/sci-chemistry/votca-csg/votca-csg-1.3-r1.ebuild
92 @@ -2,7 +2,7 @@
93 # Distributed under the terms of the GNU General Public License v2
94 # $Id$
95
96 -EAPI=5
97 +EAPI=6
98
99 CMAKE_MAKEFILE_GENERATOR="ninja"
100
101 @@ -16,6 +16,7 @@ if [ "${PV}" != "9999" ]; then
102 examples? ( https://github.com/${PN/-//}-tutorials/archive/v${PV}.tar.gz -> ${PN}-tutorials-${PV}.tar.gz )"
103 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-macos"
104 S="${WORKDIR}/${P#votca-}"
105 + PATCHES=( "${FILESDIR}/${P}-cmake-3.4.patch" )
106 else
107 inherit git-r3
108 EGIT_REPO_URI="git://github.com/${PN/-//}.git https://github.com/${PN/-//}.git"
109 @@ -69,8 +70,8 @@ src_unpack() {
110
111 src_configure() {
112 mycmakeargs=(
113 - $(cmake-utils_use_with gromacs GMX)
114 - $(cmake-utils_use_with hdf5 H5MD)
115 + -DWITH_GMX=$(usex gromacs)
116 + -DWITH_H5MD=$(usex hdf5)
117 -DWITH_RC_FILES=OFF
118 -DLIB=$(get_libdir)
119 )
120 @@ -95,7 +96,7 @@ src_install() {
121 dodoc "${DISTDIR}/${PN}-manual-${PV}.pdf"
122 fi
123 cmake-utils_src_make -C "${CMAKE_BUILD_DIR}" html
124 - dohtml -r "${CMAKE_BUILD_DIR}"/share/doc/html/*
125 + dodoc -r "${CMAKE_BUILD_DIR}"/share/doc/html
126 fi
127 if use examples; then
128 insinto "/usr/share/doc/${PF}/tutorials"