├── CMakeLists.txt
├── LICENSE.GPLv3
├── Projects.cmake
├── README.md
├── Thing.cmake
├── Thing_gitDownload.cmake
├── config.local.example
├── patches
├── boost-1.56.0-fixes.patch
├── crypto++-5.6.5-CMakeLists.txt
├── exprtk-CMakeLists.txt
└── libsortnetwork-1.1.0.patch
└── profiles
├── DebianBookworm.cmake
├── DebianBullseye.cmake
├── DebianBuster.cmake
├── DebianJessie.cmake
├── DebianStretch.cmake
├── Gentoo.cmake
└── common.cmake
/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2015 Cybernetica
3 | #
4 | # Research/Commercial License Usage
5 | # Licensees holding a valid Research License or Commercial License
6 | # for the Software may use this file according to the written
7 | # agreement between you and Cybernetica.
8 | #
9 | # GNU General Public License Usage
10 | # Alternatively, this file may be used under the terms of the GNU
11 | # General Public License version 3.0 as published by the Free Software
12 | # Foundation and appearing in the file LICENSE.GPL included in the
13 | # packaging of this file. Please review the following information to
14 | # ensure the GNU General Public License version 3.0 requirements will be
15 | # met: http://www.gnu.org/copyleft/gpl-3.0.html.
16 | #
17 | # For further information, please contact us at sharemind@cyber.ee.
18 | #
19 |
20 | CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
21 | IF(POLICY CMP0054)
22 | CMAKE_POLICY(SET CMP0054 NEW)
23 | ENDIF()
24 | PROJECT(SHAREMIND_APPSERV_BUILD NONE)
25 |
26 | IF("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
27 | MESSAGE(FATAL_ERROR "Generation in source directory is not supported by build.git!")
28 | ENDIF()
29 |
30 | INCLUDE(Thing.cmake)
31 | Thing_addKeywords(SHAREMIND_TYPE SHAREMIND_CHECK_COMMAND)
32 |
33 | IF(DEFINED SHAREMIND_REPOSITORIES_ROOT_OVERRIDE)
34 | SET(SHAREMIND_REPOSITORIES_ROOT "${SHAREMIND_REPOSITORIES_ROOT_OVERRIDE}" CACHE INTERNAL "")
35 | ELSE()
36 | SET(SHAREMIND_REPOSITORIES_ROOT "https://github.com/sharemind-sdk" CACHE INTERNAL "")
37 | ENDIF()
38 | IF(DEFINED SHAREMIND_DEPENDENCIES_ROOT_OVERRIDE)
39 | SET(SHAREMIND_DEPENDENCIES_ROOT "${SHAREMIND_DEPENDENCIES_ROOT_OVERRIDE}" CACHE INTERNAL "")
40 | ELSE()
41 | SET(SHAREMIND_DEPENDENCIES_ROOT
42 | "https://github.com/sharemind-sdk/dependencies/raw/master" CACHE INTERNAL "")
43 | ENDIF()
44 |
45 | MESSAGE(STATUS "CMake version detected: ${CMAKE_VERSION}")
46 | IF("${CMAKE_VERSION}" VERSION_LESS "3.18.4")
47 | MESSAGE(STATUS "Also building CMake 3.18.4 for targets.")
48 | SET(SHAREMIND_CMAKE_INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/newCMake")
49 | SET(SHAREMIND_CMAKE_BIN "${SHAREMIND_CMAKE_INSTALL_DIR}/bin/cmake")
50 | Thing_add(cmake
51 | URL "${SHAREMIND_DEPENDENCIES_ROOT}/cmake-3.18.4.tar.gz"
52 | URL_HASH SHA512=2f0c5647ed58bf911d0bfeafc7f22a3de09aa3be86301158fa51c8560e994534d7500869067432ecf91e82213a0b36ddb5db11c5c55d2ca5e5647ac9f75717b9
53 | URL_MD5 0380beaee1c39a22455db02651abe7be
54 | INSTALL_DIR "${SHAREMIND_CMAKE_INSTALL_DIR}"
55 | CONFIGURE_COMMAND
56 | "${CMAKE_CURRENT_SOURCE_DIR}/cmake/bootstrap"
57 | "--no-qt-gui"
58 | "--verbose"
59 | "--prefix=${SHAREMIND_CMAKE_INSTALL_DIR}"
60 | )
61 | FUNCTION(SetNewerCMake out)
62 | Thing_resetArgs("${ARGN}" CMAKE_COMMAND "${SHAREMIND_CMAKE_BIN}" args)
63 | Thing_getArgs_concat("${args}" DEPENDS deps)
64 | LIST(APPEND deps "cmake")
65 | Thing_resetArgs("${args}" DEPENDS "${deps}" args)
66 | SET("${out}" "${args}" PARENT_SCOPE)
67 | ENDFUNCTION()
68 | ELSE()
69 | SET(SHAREMIND_CMAKE_BIN "${CMAKE_COMMAND}")
70 | ENDIF()
71 | FILE(WRITE "${CMAKE_CURRENT_BINARY_DIR}/cmake_binary.txt" "${SHAREMIND_CMAKE_BIN}\n")
72 |
73 | IF(NOT DEFINED SHAREMIND_PROJECTFILE)
74 | SET(SHAREMIND_PROJECTFILE "${CMAKE_CURRENT_SOURCE_DIR}/Projects.cmake")
75 | ENDIF()
76 | SET(SHAREMIND_PROJECTS_LIST_PASS "INIT")
77 |
78 | INCLUDE("${CMAKE_CURRENT_SOURCE_DIR}/config.local" OPTIONAL)
79 | INCLUDE("${CMAKE_CURRENT_BINARY_DIR}/config.local" OPTIONAL)
80 |
81 | MESSAGE(STATUS "Using ${SHAREMIND_PROJECTFILE} as project file.")
82 |
83 | IF(DEFINED SHAREMIND_INSTALL_PREFIX)
84 | SET(CMAKE_INSTALL_PREFIX "${SHAREMIND_INSTALL_PREFIX}")
85 | ELSE()
86 | IF(NOT ("${CMAKE_BUILD_TYPE}" STREQUAL "Release"))
87 | SET(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/prefix")
88 | ENDIF()
89 | ENDIF()
90 | LIST(APPEND CMAKE_PREFIX_PATH "${CMAKE_INSTALL_PREFIX}")
91 | LIST(REMOVE_DUPLICATES CMAKE_PREFIX_PATH)
92 |
93 | IF(NOT DEFINED Thing_SKIP)
94 | INCLUDE("${CMAKE_CURRENT_SOURCE_DIR}/profiles/common.cmake" REQUIRED)
95 | ENDIF()
96 |
97 | # Parse project list:
98 | ThingNewEmptyList(SHAREMIND_TARGETS)
99 | ThingNewEmptyList(SHAREMIND_TARGETS_DEP)
100 | ThingNewEmptyList(SHAREMIND_TARGETS_ALL)
101 | ThingNewEmptyList(SHAREMIND_TARGETS_CHECK)
102 | MACRO(SharemindAddCommon name)
103 | LIST(APPEND SHAREMIND_TARGETS_ALL "${name}")
104 | Thing_hasArg("${ARGN}" SHAREMIND_CHECK_COMMAND hasCheckCommand)
105 | IF(hasCheckCommand)
106 | LIST(APPEND SHAREMIND_TARGETS_CHECK "${name}")
107 | Thing_getArgs_concat("${ARGN}" SHAREMIND_CHECK_COMMAND
108 | "SHAREMIND_CHECK_COMMAND_${name}")
109 | ENDIF()
110 | UNSET(hasCheckCommand)
111 | ThingNewEmptyList("SHAREMIND_ARGS_${name}")
112 | LIST(APPEND "SHAREMIND_ARGS_${name}" ${ARGN})
113 | ThingNewEmptyList("SHAREMIND_DEPS_${name}")
114 | ThingNewEmptyList("SHAREMIND_RDEPS_${name}")
115 | Thing_getArgs_concat("${ARGN}" DEPENDS SharemindAddCommon_deps)
116 | FOREACH(d IN LISTS SharemindAddCommon_deps)
117 | LIST(FIND Thing_SKIP "${d}" isSkipped)
118 | IF(${isSkipped} EQUAL -1)
119 | LIST(APPEND "SHAREMIND_DEPS_${name}" "${d}")
120 | LIST(APPEND "SHAREMIND_RDEPS_${d}" "${name}")
121 | ENDIF()
122 | ENDFOREACH()
123 | UNSET(d)
124 | LIST(APPEND "${listName}" "${name}")
125 | ENDMACRO()
126 | MACRO(SharemindAddExternalDependency name)
127 | LIST(FIND Thing_SKIP "${name}" isSkipped)
128 | IF(${isSkipped} EQUAL -1)
129 | LIST(APPEND SHAREMIND_TARGETS_DEP "${name}")
130 | SharemindAddCommon("${name}" ${ARGN})
131 | ENDIF()
132 | ENDMACRO()
133 | MACRO(SharemindAddRepository name)
134 | LIST(FIND Thing_SKIP "${name}" isSkipped)
135 | IF(${isSkipped} EQUAL -1)
136 | LIST(APPEND SHAREMIND_TARGETS "${name}")
137 | Thing_getArgs_concat("${ARGN}" GIT_REPOSITORY "SHAREMIND_REPOSITORY_${name}")
138 | SharemindAddCommon("${name}" ${ARGN})
139 | ENDIF()
140 | ENDMACRO()
141 | MACRO(SharemindAddShallowRepository name)
142 | SharemindAddRepository("${name}" ${ARGN})
143 | ENDMACRO()
144 | SET(SHAREMIND_PROJECTS_LIST_PASS "PARSE_ONLY")
145 | INCLUDE("${SHAREMIND_PROJECTFILE}")
146 | LIST(SORT SHAREMIND_TARGETS_DEP)
147 | LIST(SORT SHAREMIND_TARGETS)
148 | LIST(SORT SHAREMIND_TARGETS_ALL)
149 | LIST(SORT SHAREMIND_TARGETS_CHECK)
150 | FUNCTION(SharemindCalcDeepDeps prefix name out)
151 | UNSET(p)
152 | ThingNewEmptyList(p)
153 | FOREACH(d IN LISTS "${prefix}${name}")
154 | LIST(APPEND p "${d}")
155 | SharemindCalcDeepDeps("${prefix}" "${d}" o)
156 | LIST(APPEND p ${o})
157 | UNSET(o)
158 | ENDFOREACH()
159 | LIST(REMOVE_DUPLICATES p)
160 | SET("${out}" ${p} PARENT_SCOPE)
161 | UNSET(p)
162 | ENDFUNCTION()
163 | FOREACH(t IN LISTS SHAREMIND_TARGETS_ALL)
164 | SharemindCalcDeepDeps("SHAREMIND_DEPS_" "${t}" "SHAREMIND_DEEPDEPS_${t}")
165 | SharemindCalcDeepDeps("SHAREMIND_RDEPS_" "${t}" "SHAREMIND_DEEPRDEPS_${t}")
166 | ENDFOREACH()
167 | UNSET(t)
168 |
169 | # List targets to be built:
170 | STRING(REPLACE ";" " " SHAREMIND_TARGETS_DEP_STR "${SHAREMIND_TARGETS_DEP}")
171 | STRING(REPLACE ";" " " SHAREMIND_TARGETS_STR "${SHAREMIND_TARGETS}")
172 | MESSAGE(STATUS "Building dependencies: ${SHAREMIND_TARGETS_DEP_STR}")
173 | MESSAGE(STATUS "Building targets: ${SHAREMIND_TARGETS_STR}")
174 |
175 | # Generate build graphs:
176 | FIND_PROGRAM(DOT_COMMAND dot)
177 | IF(DOT_COMMAND)
178 | FUNCTION(GenerateDotFile f)
179 | FILE(WRITE "${f}" "digraph \"build.git\" {\n")
180 | FILE(APPEND "${f}" " compound = true; rankdir = TB; style = filled;\n")
181 | FILE(APPEND "${f}" " nodesep = 0.5; ranksep = 5; remincross = true;\n")
182 | FILE(APPEND "${f}" " searchsize = 9999;\n\n")
183 | FILE(APPEND "${f}" " node [shape=box style=filled];\n\n")
184 | SET(SHAREMIND_MAXRDEPS 0)
185 | FOREACH(t IN LISTS ARGN)
186 | LIST(LENGTH "SHAREMIND_DEEPRDEPS_${t}" l)
187 | IF(SHAREMIND_MAXRDEPS LESS l)
188 | SET(SHAREMIND_MAXRDEPS "${l}")
189 | ENDIF()
190 | UNSET(l)
191 | ENDFOREACH()
192 | UNSET(t)
193 | FUNCTION(ZEROPREFIX maxlen v out)
194 | STRING(LENGTH "${v}" l)
195 | IF(l LESS maxlen)
196 | MATH(EXPR m "${maxlen} - 1")
197 | ZEROPREFIX("${m}" "0${v}" v)
198 | ENDIF()
199 | SET("${out}" "${v}" PARENT_SCOPE)
200 | ENDFUNCTION()
201 | SET(i 0)
202 | LIST(LENGTH ARGN k)
203 | FOREACH(t IN LISTS ARGN)
204 | MATH(EXPR h "((${k} - ${i} - 1) * 10000) / ${k}")
205 | ZEROPREFIX(4 "${h}" h)
206 | LIST(LENGTH "SHAREMIND_DEEPRDEPS_${t}" r)
207 | MATH(EXPR s "(${r} * 10000) / (${SHAREMIND_MAXRDEPS} + 1)") # [0,10k)
208 | UNSET(r)
209 | MATH(EXPR s "((${s} + 3334) * 10000) / 13333") # [2500,10k)
210 | MATH(EXPR v "12499-${s}")
211 | ZEROPREFIX(4 "${s}" s)
212 | ZEROPREFIX(4 "${v}" v)
213 | FILE(APPEND "${f}" "\n \"${t}\" [fillcolor=\"0.${h}, 0.${s}, 0.${v}\"];\n")
214 | UNSET(h)
215 | UNSET(s)
216 | UNSET(v)
217 | LIST(LENGTH "SHAREMIND_DEPS_${t}" l)
218 | IF("${l}" GREATER 0)
219 | FILE(APPEND "${f}" " \"${t}\" -> {")
220 | FOREACH(d IN LISTS "SHAREMIND_DEPS_${t}")
221 | FILE(APPEND "${f}" " \"${d}\"")
222 | ENDFOREACH()
223 | UNSET(d)
224 | FILE(APPEND "${f}" " };\n")
225 | ENDIF()
226 | UNSET(l)
227 | MATH(EXPR i "${i} + 1")
228 | ENDFOREACH()
229 | UNSET(k)
230 | UNSET(i)
231 | UNSET(t)
232 | FILE(APPEND "${f}" "}")
233 | UNSET(f)
234 | ENDFUNCTION()
235 |
236 | ADD_CUSTOM_TARGET("graphs")
237 |
238 | GenerateDotFile("${CMAKE_CURRENT_BINARY_DIR}/graph.dot" ${SHAREMIND_TARGETS_ALL})
239 | ADD_CUSTOM_TARGET("graph"
240 | COMMAND "${DOT_COMMAND}" "-Tpng" "graph.dot" "-o" "graph.png"
241 | WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
242 | COMMENT "Generating graph.png")
243 | ADD_DEPENDENCIES("graphs" "graph")
244 | FOREACH(t IN LISTS SHAREMIND_TARGETS_ALL)
245 | GenerateDotFile("${CMAKE_CURRENT_BINARY_DIR}/${t}/graph.dot" ${t} ${SHAREMIND_DEEPDEPS_${t}})
246 | ADD_CUSTOM_TARGET("graph_${t}"
247 | COMMAND "${DOT_COMMAND}" "-Tpng" "graph.dot" "-o" "graph.png"
248 | WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${t}/"
249 | COMMENT "Generating ${t}/graph.png")
250 | ADD_DEPENDENCIES("graphs" "graph_${t}")
251 | ENDFOREACH()
252 | MESSAGE(STATUS "Wrote dependency graph description files. Use `make graphs` to generate all graphs.")
253 | ENDIF()
254 |
255 | # Add targets to build:
256 | MACRO(SharemindAdd name type)
257 | IF(COMMAND SetNewerCMake)
258 | SetNewerCMake(a ${ARGN})
259 | ELSE()
260 | SET(a "${ARGN}")
261 | ENDIF()
262 | Thing_resetArgs("${a}" SHAREMIND_TYPE "${type}" a)
263 | Thing_add("${name}" ${a})
264 | IF(DEFINED "SHAREMIND_CHECK_COMMAND_${name}")
265 | Thing_getProperty("${name}" binary_dir a)
266 | ADD_CUSTOM_TARGET("just_check_${name}"
267 | ${SHAREMIND_CHECK_COMMAND_${name}}
268 | WORKING_DIRECTORY "${a}"
269 | COMMENT "Running checks on ${name}...")
270 | ADD_CUSTOM_TARGET("check_${name}"
271 | ${SHAREMIND_CHECK_COMMAND_${name}}
272 | WORKING_DIRECTORY "${a}"
273 | DEPENDS "${name}"
274 | COMMENT "Running checks on ${name}...")
275 | ENDIF()
276 | UNSET(a)
277 | ENDMACRO()
278 | MACRO(SharemindAddExternalDependency name)
279 | SharemindAdd("${name}" "externalDependency" ${ARGN})
280 | ENDMACRO()
281 | MACRO(SharemindAddRepository name)
282 | SharemindAdd("${name}" "sharemindRepository" ${ARGN})
283 | ENDMACRO()
284 | MACRO(SharemindAddShallowRepository name)
285 | Thing_resetArgs("${ARGN}" SHALLOW_CLONE "1" a)
286 | SharemindAdd("${name}" "sharemindRepository" ${a})
287 | UNSET(a)
288 | ENDMACRO()
289 | SET(SHAREMIND_PROJECTS_LIST_PASS "FINAL")
290 | INCLUDE("${SHAREMIND_PROJECTFILE}")
291 | MESSAGE(STATUS "Added all targets to build.")
292 | MESSAGE(STATUS "The full CMAKE_PREFIX_PATH list is: ${CMAKE_PREFIX_PATH}")
293 |
294 | # Add "deps" meta-target to build all dependencies:
295 | ADD_CUSTOM_TARGET(deps
296 | DEPENDS ${SHAREMIND_TARGETS_DEP}
297 | COMMENT "Finished building all dependencies")
298 |
299 | # Add "check" and "just_check" meta-targets to do all checks:
300 | ADD_CUSTOM_TARGET(check COMMENT "All checks done!")
301 | ADD_CUSTOM_TARGET(just_check COMMENT "All checks done!")
302 | FOREACH(name IN LISTS SHAREMIND_TARGETS_CHECK)
303 | ADD_DEPENDENCIES(check "check_${name}")
304 | ADD_DEPENDENCIES(just_check "just_check_${name}")
305 | ENDFOREACH()
306 |
307 | # Write meta-information to files:
308 | FUNCTION(WriteMetaInfoList filename list)
309 | LIST(LENGTH list l)
310 | IF("${l}" GREATER 0)
311 | STRING(REPLACE ";" "\n" o "${list}")
312 | SET(o "${o}\n")
313 | ELSE()
314 | SET(o "")
315 | ENDIF()
316 | FILE(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${filename}" "${o}")
317 | ENDFUNCTION()
318 | WriteMetaInfoList("projectfile.txt" "${SHAREMIND_PROJECTFILE}")
319 | WriteMetaInfoList("targets.txt" "${SHAREMIND_TARGETS}")
320 | WriteMetaInfoList("deps.txt" "${SHAREMIND_TARGETS_DEP}")
321 | WriteMetaInfoList("all.txt" "${SHAREMIND_TARGETS_ALL}")
322 | WriteMetaInfoList("check.txt" "${SHAREMIND_TARGETS_CHECK}")
323 | FOREACH(t IN LISTS SHAREMIND_TARGETS_ALL)
324 | WriteMetaInfoList("${t}/self.txt" "${t}")
325 | WriteMetaInfoList("${t}/deps.txt" "${SHAREMIND_DEPS_${t}}")
326 | WriteMetaInfoList("${t}/rdeps.txt" "${SHAREMIND_RDEPS_${t}}")
327 | WriteMetaInfoList("${t}/deepdeps.txt" "${SHAREMIND_DEEPDEPS_${t}}")
328 | WriteMetaInfoList("${t}/deeprdeps.txt" "${SHAREMIND_DEEPRDEPS_${t}}")
329 | Thing_getProperty("${t}" source_dir o)
330 | WriteMetaInfoList("${t}/sourcedir.txt" "${o}")
331 | Thing_getProperty("${t}" binary_dir o)
332 | WriteMetaInfoList("${t}/binarydir.txt" "${o}")
333 | UNSET(o)
334 | ENDFOREACH()
335 | FOREACH(t IN LISTS SHAREMIND_TARGETS)
336 | WriteMetaInfoList("${t}/repository.txt" "${SHAREMIND_REPOSITORY_${t}}")
337 | ENDFOREACH()
338 | UNSET(t)
339 | MESSAGE(STATUS "Wrote build meta-information files.")
340 |
341 | IF(COMMAND Sharemind_hook_postLists)
342 | MESSAGE(STATUS "Executing post-CMakeLists.txt hook...")
343 | Sharemind_hook_postLists()
344 | ENDIF()
345 |
--------------------------------------------------------------------------------
/LICENSE.GPLv3:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------
/Projects.cmake:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) Cybernetica
3 | #
4 | # Research/Commercial License Usage
5 | # Licensees holding a valid Research License or Commercial License
6 | # for the Software may use this file according to the written
7 | # agreement between you and Cybernetica.
8 | #
9 | # GNU General Public License Usage
10 | # Alternatively, this file may be used under the terms of the GNU
11 | # General Public License version 3.0 as published by the Free Software
12 | # Foundation and appearing in the file LICENSE.GPL included in the
13 | # packaging of this file. Please review the following information to
14 | # ensure the GNU General Public License version 3.0 requirements will be
15 | # met: http://www.gnu.org/copyleft/gpl-3.0.html.
16 | #
17 | # For further information, please contact us at sharemind@cyber.ee.
18 | #
19 |
20 | SharemindAddExternalDependency(exprtk
21 | URL "https://github.com/ArashPartow/exprtk/tarball/ce2320489562192e2e81489d8978b9871bd1a4b2"
22 | DOWNLOAD_NAME "exprtk-ce232048.tar.gz"
23 | URL_HASH SHA512=469b9099ae4fa7294b3a1d7ccd2a743e92872c81ae46e568f67dac35999d29cbb926a395969f694a087a0982ccc1764cc4d65c087e28bc37a8f9a607868b4d54
24 | URL_MD5 872400594e9b4b1f41db9641675ca8fe
25 | PATCH_COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/patches/exprtk-CMakeLists.txt" CMakeLists.txt)
26 |
27 | SharemindAddRepository(cmake-helpers
28 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/cmake-helpers.git")
29 |
30 | SharemindAddRepository(cheaders
31 | DEPENDS cmake-helpers
32 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/cheaders.git")
33 |
34 | SharemindAddRepository(libsoftfloat
35 | DEPENDS cheaders cmake-helpers
36 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/libsoftfloat.git")
37 |
38 | SharemindAddRepository(libsoftfloat_math
39 | DEPENDS cheaders cmake-helpers libsoftfloat
40 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/libsoftfloat_math.git")
41 |
42 | SharemindAddRepository(cxxheaders
43 | DEPENDS cheaders cmake-helpers
44 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/cxxheaders.git"
45 | SHAREMIND_CHECK_COMMAND $(MAKE) check)
46 |
47 | SharemindAddRepository(libaccesscontrolprocessfacility
48 | DEPENDS cmake-helpers cxxheaders
49 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/libaccesscontrolprocessfacility.git")
50 |
51 | SharemindAddRepository(vm_m4
52 | DEPENDS cmake-helpers
53 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/vm_m4.git")
54 |
55 | SharemindAddRepository(libvmi
56 | DEPENDS cmake-helpers cxxheaders vm_m4
57 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/libvmi.git")
58 |
59 | SharemindAddRepository(libexecutable
60 | DEPENDS cmake-helpers cxxheaders
61 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/libexecutable.git")
62 |
63 | SharemindAddRepository(module-apis
64 | DEPENDS cheaders cmake-helpers
65 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/module-apis.git")
66 |
67 | SharemindAddRepository(libmodapi
68 | DEPENDS cheaders cmake-helpers module-apis
69 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/libmodapi.git")
70 |
71 | SharemindAddRepository(libmodapicxx
72 | DEPENDS cmake-helpers cxxheaders libmodapi
73 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/libmodapicxx.git")
74 |
75 | SharemindAddRepository(libprocessfacility
76 | DEPENDS cheaders cmake-helpers
77 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/libprocessfacility.git")
78 |
79 | SharemindAddRepository(facility-module-apis
80 | DEPENDS cheaders cmake-helpers libprocessfacility module-apis
81 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/facility-module-apis.git")
82 |
83 | SharemindAddRepository(libfmodapi
84 | DEPENDS cmake-helpers cxxheaders facility-module-apis
85 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/libfmodapi.git")
86 |
87 | SharemindAddRepository(libvm
88 | DEPENDS cheaders cmake-helpers cxxheaders libexecutable libsoftfloat libvmi vm_m4
89 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/libvm.git")
90 |
91 | SharemindAddRepository(loghard
92 | DEPENDS cheaders cmake-helpers cxxheaders
93 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/loghard.git"
94 | SHAREMIND_CHECK_COMMAND $(MAKE) check)
95 |
96 | SharemindAddRepository(libconsensusservice
97 | DEPENDS cmake-helpers
98 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/libconsensusservice.git")
99 |
100 | SharemindAddRepository(data-store-api
101 | DEPENDS cmake-helpers
102 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/data-store-api.git")
103 |
104 | SharemindAddRepository(libdatastoremanager
105 | DEPENDS cmake-helpers cxxheaders data-store-api
106 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/libdatastoremanager.git")
107 |
108 | SharemindAddRepository(libexecutionmodelevaluator
109 | DEPENDS cmake-helpers cxxheaders exprtk loghard
110 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/libexecutionmodelevaluator.git")
111 |
112 | SharemindAddRepository(libexecutionprofiler
113 | DEPENDS cmake-helpers cxxheaders loghard
114 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/libexecutionprofiler.git")
115 |
116 | SharemindAddRepository(librandom
117 | DEPENDS cmake-helpers cxxheaders
118 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/librandom.git"
119 | SHAREMIND_CHECK_COMMAND $(MAKE) check)
120 |
121 | SharemindAddRepository(libsortnetwork
122 | DEPENDS cmake-helpers cxxheaders
123 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/libsortnetwork.git")
124 |
125 | SharemindAddRepository(mod_algorithms
126 | DEPENDS cheaders cmake-helpers cxxheaders libsoftfloat libsoftfloat_math libsortnetwork module-apis
127 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/mod_algorithms.git")
128 |
129 | SharemindAddRepository(libconfiguration
130 | DEPENDS cmake-helpers cxxheaders
131 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/libconfiguration.git")
132 |
133 | SharemindAddRepository(pdkheaders
134 | DEPENDS cmake-helpers cxxheaders module-apis
135 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/pdkheaders.git")
136 |
137 | SharemindAddRepository(libemulator_protocols
138 | DEPENDS cmake-helpers pdkheaders
139 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/libemulator_protocols.git")
140 |
141 | SharemindAddRepository(mod_shared3p_emu
142 | DEPENDS cheaders cmake-helpers cxxheaders libconfiguration libemulator_protocols libexecutionmodelevaluator libexecutionprofiler libsoftfloat libsoftfloat_math loghard module-apis pdkheaders
143 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/mod_shared3p_emu.git")
144 |
145 | SharemindAddRepository(mod_aby_emu
146 | DEPENDS cheaders cmake-helpers cxxheaders libemulator_protocols libexecutionmodelevaluator libexecutionprofiler loghard module-apis pdkheaders
147 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/mod_aby_emu.git")
148 |
149 | SharemindAddRepository(mod_spdz_fresco_emu
150 | DEPENDS cheaders cmake-helpers cxxheaders libemulator_protocols libexecutionmodelevaluator libexecutionprofiler libmodapi loghard module-apis pdkheaders
151 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/mod_spdz_fresco_emu.git")
152 |
153 | SharemindAddRepository(libdbcommon
154 | DEPENDS cmake-helpers
155 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/libdbcommon.git")
156 |
157 | SharemindAddRepository(mod_keydb
158 | DEPENDS cmake-helpers data-store-api libaccesscontrolprocessfacility libconsensusservice libprocessfacility loghard module-apis pdkheaders
159 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/mod_keydb.git")
160 |
161 | SharemindAddRepository(mod_tabledb
162 | DEPENDS cheaders cmake-helpers cxxheaders data-store-api libaccesscontrolprocessfacility libconfiguration libconsensusservice libdbcommon libmodapi libprocessfacility loghard module-apis
163 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/mod_tabledb.git")
164 |
165 | SharemindAddRepository(mod_tabledb_hdf5
166 | DEPENDS cmake-helpers cxxheaders data-store-api libconfiguration libconsensusservice libdbcommon libprocessfacility loghard mod_tabledb module-apis
167 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/mod_tabledb_hdf5.git")
168 |
169 | SharemindAddRepository(facility_loghard
170 | DEPENDS cmake-helpers cxxheaders facility-module-apis loghard
171 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/facility_loghard.git")
172 |
173 | SharemindAddRepository(facility_executionprofiler
174 | DEPENDS cmake-helpers cxxheaders facility-module-apis libexecutionprofiler loghard
175 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/facility_executionprofiler.git")
176 |
177 | SharemindAddRepository(facility_datastoremanager
178 | DEPENDS cmake-helpers facility-module-apis libdatastoremanager
179 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/facility_datastoremanager.git")
180 |
181 | SharemindAddRepository(mod_executionprofiler
182 | DEPENDS cheaders cmake-helpers libexecutionprofiler module-apis
183 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/mod_executionprofiler.git")
184 |
185 | SharemindAddRepository(emulator
186 | DEPENDS cmake-helpers cxxheaders libaccesscontrolprocessfacility libconfiguration libfmodapi libmodapicxx libprocessfacility librandom libvm
187 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/emulator.git")
188 |
189 | SharemindAddRepository(sbdump
190 | DEPENDS cheaders cmake-helpers cxxheaders libexecutable libvmi loghard
191 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/sbdump.git")
192 |
193 | SharemindAddRepository(libas
194 | DEPENDS cheaders cmake-helpers libexecutable libvmi
195 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/libas.git")
196 |
197 | SharemindAddRepository(secrec
198 | DEPENDS cheaders cmake-helpers cxxheaders libas
199 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/secrec.git")
200 |
201 | SharemindAddRepository(secrec-stdlib
202 | DEPENDS cmake-helpers secrec
203 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/secrec-stdlib.git")
204 |
205 | SharemindAddRepository(qtcreator-plugin-sharemind-mpc
206 | DEPENDS cmake-helpers
207 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/qtcreator-plugin-sharemind-mpc.git")
208 |
209 | IF(NOT DEFINED SHAREMIND_EXCLUDE_NODE)
210 | SET(SHAREMIND_EXCLUDE_NODE 1)
211 | ENDIF()
212 |
213 | SharemindAddRepository(profile_log_visualizer
214 | DEPENDS cmake-helpers
215 | GIT_REPOSITORY "${SHAREMIND_REPOSITORIES_ROOT}/profile_log_visualizer.git"
216 | EXCLUDE_FROM_ALL ${SHAREMIND_EXCLUDE_NODE})
217 |
218 | UNSET(SHAREMIND_REPOSITORIES_ROOT)
219 | UNSET(SHAREMIND_DEPENDENCIES_ROOT)
220 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Sharemind SDK build repository
2 |
3 | ## Quick start guide
4 |
5 | ### Debian Bullseye
6 |
7 | Install the dependencies:
8 |
9 | ```bash
10 | sudo apt-get install bison cmake doxygen flex g++ gcc git libboost-dev libboost-filesystem-dev libboost-iostreams-dev libboost-program-options-dev libboost-system-dev libcrypto++-dev libhdf5-dev libhiredis-dev libmpfr-dev m4 make
11 | sudo apt-get install --no-install-recommends doxygen
12 | ```
13 |
14 | Build Sharemind SDK:
15 | ```bash
16 | git clone https://github.com/sharemind-sdk/build-sdk.git
17 | cd build-sdk
18 | echo 'INCLUDE("${CMAKE_CURRENT_SOURCE_DIR}/profiles/DebianBullseye.cmake" REQUIRED)' > config.local
19 | mkdir b
20 | cd b
21 | cmake ..
22 | make
23 | ```
24 |
25 | After this, everything should already be installed in the `prefix/` subdirectory
26 | under `/path/to/this/repository/`.
27 |
28 | ## Detailed build instructions
29 |
30 | Some dependencies can be built by this repository and are pulled from the
31 | [sharemind-sdk/dependencies](https://github.com/sharemind-sdk/dependencies/)
32 | repository.
33 |
34 | To include the installation of these dependencies to the build, configure the build
35 | as follows:
36 |
37 | ```bash
38 | cd /path/to/this/repository
39 | echo 'SET(Thing_SKIP "")' > config.local
40 | ```
41 |
42 | Building [sharemind-sdk/profile_log_visualizer](https://github.com/sharemind-sdk/profile_log_visualizer/)
43 | is disabled by default, refer to example configuration for enabling it.
44 |
45 | For more complex builds, see
46 | [`config.local.example`](https://github.com/sharemind-sdk/build-sdk/blob/master/config.local.example).
47 |
48 | Build profiles for specific systems can be found under
49 | [`profiles`](https://github.com/sharemind-sdk/build-sdk/tree/master/profiles).
50 | These profiles can be configured in the `config.local` file before running CMake.
51 |
--------------------------------------------------------------------------------
/Thing.cmake:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) Cybernetica
3 | #
4 | # Research/Commercial License Usage
5 | # Licensees holding a valid Research License or Commercial License
6 | # for the Software may use this file according to the written
7 | # agreement between you and Cybernetica.
8 | #
9 | # GNU General Public License Usage
10 | # Alternatively, this file may be used under the terms of the GNU
11 | # General Public License version 3.0 as published by the Free Software
12 | # Foundation and appearing in the file LICENSE.GPL included in the
13 | # packaging of this file. Please review the following information to
14 | # ensure the GNU General Public License version 3.0 requirements will be
15 | # met: http://www.gnu.org/copyleft/gpl-3.0.html.
16 | #
17 | # For further information, please contact us at sharemind@cyber.ee.
18 | #
19 |
20 | IF(CMAKE_VERSION VERSION_LESS 2.8.12)
21 | MESSAGE(FATAL_ERROR "Thing: CMake 2.8.12 or later required, but version ${CMAKE_VERSION} found!")
22 | ENDIF()
23 |
24 | INCLUDE(ExternalProject)
25 | INCLUDE(Thing_gitDownload.cmake)
26 |
27 | SET(Thing_VoidCommand ${CMAKE_COMMAND} -E echo_append)
28 |
29 | MACRO(ThingNewEmptyList name)
30 | IF(DEFINED "${name}")
31 | MESSAGE(FATAL_ERROR "CMake variable ${name} is already defined!")
32 | ENDIF()
33 | SET("${name}" tmp)
34 | LIST(REMOVE_ITEM "${name}" tmp)
35 | ENDMACRO()
36 |
37 | # Joins all items of a list to a string using the given glue:
38 | FUNCTION(Thing_join output glue)
39 | STRING(REGEX REPLACE "([^\\]|^);" "\\1${glue}" tmp "${ARGN}")
40 | STRING(REGEX REPLACE "[\\](.)" "\\1" tmp "${tmp}")
41 | SET(${output} "${tmp}" PARENT_SCOPE)
42 | ENDFUNCTION()
43 |
44 | FUNCTION(Thing_pathJoin output)
45 | IF(WIN32)
46 | Thing_join(out ";" ${ARGN})
47 | ELSE()
48 | Thing_join(out ":" ${ARGN})
49 | ENDIF()
50 | SET(${output} "${out}" PARENT_SCOPE)
51 | ENDFUNCTION()
52 |
53 | IF(NOT DEFINED Thing_EXTRA_KEYWORDS)
54 | SET(Thing_EXTRA_KEYWORDS "")
55 | ENDIF()
56 | SET(Thing__stoppers
57 | # General options:
58 | "DEPENDS" "PREFIX" "LIST_SEPARATOR" "TMP_DIR" "STAMP_DIR" "EXCLUDE_FROM_ALL"
59 | # Download step options:
60 | "DOWNLOAD_NAME" "DOWNLOAD_DIR" "DOWNLOAD_COMMAND" "DOWNLOAD_NO_PROGRESS"
61 | "CVS_REPOSITORY" "CVS_MODULE" "CVS_TAG"
62 | "SVN_REPOSITORY" "SVN_REVISION" "SVN_USERNAME" "SVN_PASSWORD" "SVN_TRUST_CERT"
63 | "GIT_REPOSITORY" "GIT_TAG" "GIT_SUBMODULES"
64 | "HG_REPOSITORY" "HG_TAG"
65 | "URL" "URL_HASH" "URL_MD5"
66 | "TLS_VERIFY" "TLS_CAINFO"
67 | "TIMEOUT"
68 | # Update/patch step options:
69 | "UPDATE_COMMAND" "UPDATE_DISCONNECTED" "PATCH_COMMAND"
70 | # Configure step options:
71 | "SOURCE_DIR" "CONFIGURE_COMMAND" "CMAKE_COMMAND" "CMAKE_GENERATOR"
72 | "CMAKE_GENERATOR_PLATFORM" "CMAKE_GENERATOR_TOOLSET" "CMAKE_ARGS"
73 | "CMAKE_CACHE_ARGS" "CMAKE_CACHE_DEFAULT_ARGS"
74 | # Build step options:
75 | "BINARY_DIR" "BUILD_COMMAND" "BUILD_IN_SOURCE" "BUILD_ALWAYS"
76 | "BUILD_BYPRODUCTS"
77 | # Install step options:
78 | "INSTALL_DIR" "INSTALL_COMMAND"
79 | # Test step options:
80 | "TEST_BEFORE_INSTALL" "TEST_AFTER_INSTALL" "TEST_EXCLUDE_FROM_MAIN"
81 | "TEST_COMMAND"
82 | # Output logging options:
83 | "LOG_DOWNLOAD" "LOG_UPDATE" "LOG_CONFIGURE" "LOG_BUILD" "LOG_TEST"
84 | "LOG_INSTALL"
85 | # Terminal access options:
86 | "USES_TERMINAL_DOWNLOAD" "USES_TERMINAL_UPDATE" "USES_TERMINAL_CONFIGURE"
87 | "USES_TERMINAL_BUILD" "USES_TERMINAL_TEST" "USES_TERMINAL_INSTALL"
88 | # Other options:
89 | "STEP_TARGETS" "INDEPENDENT_STEP_TARGETS"
90 | # Thing options:
91 | "SHALLOW_CLONE"
92 | )
93 |
94 | MACRO(Thing_addKeywords)
95 | LIST(APPEND Thing_EXTRA_KEYWORDS ${ARGN})
96 | LIST(REMOVE_DUPLICATES Thing_EXTRA_KEYWORDS)
97 | ENDMACRO()
98 |
99 | FUNCTION(Thing_getKeywords out)
100 | SET(allKeywords ${Thing__stoppers})
101 | LIST(APPEND allKeywords ${Thing_EXTRA_KEYWORDS})
102 | SET(${out} ${allKeywords} PARENT_SCOPE)
103 | ENDFUNCTION()
104 |
105 | # Returns all the values from a given ExternalProject_Add arguments group under
106 | # the given argument group name, concatenated:
107 | FUNCTION(Thing_getArgs_concat inArgs argName outArgs)
108 | Thing_getKeywords(stoppers)
109 | LIST(FIND stoppers "${argName}" isStopper)
110 | IF(${isStopper} EQUAL -1)
111 | MESSAGE(WARNING "Thing: Unknown argument name given, but continuing anyway: ${argName}")
112 | ENDIF()
113 | SET(SKIP 1)
114 | ThingNewEmptyList(tmp)
115 | FOREACH(a IN LISTS inArgs)
116 | IF("${a}$" STREQUAL "${argName}$")
117 | SET(SKIP 0)
118 | ELSEIF(NOT SKIP)
119 | LIST(FIND stoppers "${a}" isStopper)
120 | IF(NOT (${isStopper} EQUAL -1))
121 | SET(SKIP 1)
122 | ELSE()
123 | LIST(APPEND tmp "${a}")
124 | ENDIF()
125 | ENDIF()
126 | ENDFOREACH()
127 | SET(${outArgs} "${tmp}" PARENT_SCOPE)
128 | ENDFUNCTION()
129 |
130 | # Removes all given argument groups from a list of ExternalProject_Add arguments:
131 | FUNCTION(Thing_removeArgs inArgs argName outArgs)
132 | Thing_getKeywords(stoppers)
133 | LIST(FIND stoppers "${argName}" isStopper)
134 | IF(${isStopper} EQUAL -1)
135 | MESSAGE(WARNING "Thing: Unknown argument name given, but continuing anyway: ${argName}")
136 | ENDIF()
137 | SET(SKIP 0)
138 | SET(tmp "")
139 | FOREACH(a IN LISTS inArgs)
140 | IF("${a}$" STREQUAL "${argName}$")
141 | SET(SKIP 1)
142 | ELSEIF(SKIP)
143 | LIST(FIND stoppers "${a}" isStopper)
144 | IF(NOT (${isStopper} EQUAL -1))
145 | SET(SKIP 0)
146 | LIST(APPEND tmp "${a}")
147 | ENDIF()
148 | ELSE()
149 | LIST(APPEND tmp "${a}")
150 | ENDIF()
151 | ENDFOREACH()
152 | SET(${outArgs} "${tmp}" PARENT_SCOPE)
153 | ENDFUNCTION()
154 |
155 | # Resets a given argument in a list of ExternalProject_Add arguments:
156 | FUNCTION(Thing_resetArgs inArgs argName newValues outArgs)
157 | Thing_removeArgs("${inArgs}" "${argName}" args)
158 | LIST(APPEND args "${argName}" "${newValues}")
159 | SET(${outArgs} "${args}" PARENT_SCOPE)
160 | ENDFUNCTION()
161 |
162 | # Returns whether the given argument list contains the given argument:
163 | FUNCTION(Thing_hasArg args argName out)
164 | Thing_getKeywords(stoppers)
165 | LIST(FIND stoppers "${argName}" isStopper)
166 | IF(${isStopper} EQUAL -1)
167 | MESSAGE(WARNING "Thing: Unknown argument name given, but continuing anyway: ${argName}")
168 | ENDIF()
169 | LIST(FIND args "${argName}" hasArg)
170 | IF(${hasArg} EQUAL -1)
171 | SET("${out}" FALSE PARENT_SCOPE)
172 | ELSE()
173 | SET("${out}" TRUE PARENT_SCOPE)
174 | ENDIF()
175 | ENDFUNCTION()
176 |
177 | # Sets an argument if it is not already set:
178 | FUNCTION(Thing_setDefaultArg out args arg)
179 | Thing_hasArg("${args}" "${arg}" hasArg)
180 | IF("${hasArg}")
181 | SET(${out} "${args}" PARENT_SCOPE)
182 | ELSE()
183 | Thing_resetArgs("${args}" "${arg}" "${ARGN}" o)
184 | SET("${out}" "${o}" PARENT_SCOPE)
185 | ENDIF()
186 | ENDFUNCTION()
187 |
188 | # Constructs a new ExternalProject_Add argument list for an out-of-tree
189 | # configure and build, e.g configure/cmake && make && make install:
190 | FUNCTION(Thing_remoteConfigure name origArgs buildDir sourceDir outArgs)
191 | SET(argsToRemove DOWNLOAD_NAME DOWNLOAD_DIR DOWNLOAD_COMMAND CVS_REPOSITORY
192 | CVS_MODULE CVS_TAG SVN_REPOSITORY SVN_REVISION SVN_USERNAME
193 | SVN_PASSWORD SVN_TRUST_CERT GIT_REPOSITORY GIT_TAG
194 | HG_REPOSITORY HG_TAG URL URL_HASH URL_MD5 TLS_VERIFY
195 | TLS_CAINFO TIMEOUT UPDATE_COMMAND PATCH_COMMAND SOURCE_DIR
196 | BINARY_DIR SHALLOW_CLONE)
197 | FOREACH(argToRemove IN LISTS argsToRemove)
198 | Thing_removeArgs("${origArgs}" "${argToRemove}" origArgs)
199 | ENDFOREACH()
200 | LIST(APPEND origArgs
201 | "DOWNLOAD_COMMAND" "${Thing_VoidCommand}"
202 | "UPDATE_COMMAND" "${Thing_VoidCommand}"
203 | "PATCH_COMMAND" "${Thing_VoidCommand}"
204 | "BINARY_DIR" "${buildDir}"
205 | "SOURCE_DIR" "${sourceDir}")
206 | SET(${outArgs} "${origArgs}" PARENT_SCOPE)
207 | ENDFUNCTION()
208 |
209 | # Constructs a new ExternalProject_Add argument list for an out-of-tree build,
210 | # e.g. make && make install:
211 | FUNCTION(Thing_remoteBuild name origArgs buildDir sourceDir outArgs)
212 | SET(argsToRemove DOWNLOAD_NAME DOWNLOAD_DIR DOWNLOAD_COMMAND CVS_REPOSITORY
213 | CVS_MODULE CVS_TAG SVN_REPOSITORY SVN_REVISION SVN_USERNAME
214 | SVN_PASSWORD SVN_TRUST_CERT GIT_REPOSITORY GIT_TAG
215 | HG_REPOSITORY HG_TAG URL URL_HASH URL_MD5 TLS_VERIFY
216 | TLS_CAINFO TIMEOUT UPDATE_COMMAND PATCH_COMMAND SOURCE_DIR
217 | CONFIGURE_COMMAND CMAKE_COMMAND CMAKE_GENERATOR
218 | CMAKE_GENERATOR_TOOLSET CMAKE_ARGS CMAKE_CACHE_ARGS
219 | BINARY_DIR SHALLOW_CLONE)
220 | FOREACH(argToRemove IN LISTS argsToRemove)
221 | Thing_removeArgs("${origArgs}" "${argToRemove}" origArgs)
222 | ENDFOREACH()
223 | LIST(APPEND origArgs
224 | "DOWNLOAD_COMMAND" "${Thing_VoidCommand}"
225 | "UPDATE_COMMAND" "${Thing_VoidCommand}"
226 | "PATCH_COMMAND" "${Thing_VoidCommand}"
227 | "CONFIGURE_COMMAND" "${Thing_VoidCommand}"
228 | "BINARY_DIR" "${buildDir}"
229 | "SOURCE_DIR" "${sourceDir}")
230 | SET(${outArgs} "${origArgs}" PARENT_SCOPE)
231 | ENDFUNCTION()
232 |
233 | FUNCTION(Thing_addFromOverride name)
234 | IF(TARGET "${name}")
235 | SET(m "Thing_addFromOverride() called multiple times for target")
236 | MESSAGE(FATAL_ERROR "${m} \"${name}\"!!! Aborting.")
237 | ENDIF()
238 | Thing_getArgs_concat("${ARGN}" DEPENDS deps)
239 | Thing_removeArgs("${ARGN}" DEPENDS newArgs)
240 | IF(deps)
241 | LIST(APPEND newArgs DEPENDS)
242 | FOREACH(dep IN LISTS deps)
243 | LIST(FIND Thing_SKIP "${dep}" depFound)
244 | IF(${depFound} EQUAL -1)
245 | LIST(APPEND newArgs "${dep}")
246 | ENDIF()
247 | ENDFOREACH()
248 | ENDIF()
249 | IF("${CMAKE_VERSION}" VERSION_LESS "2.8.10")
250 | Thing_removeArgs("${newArgs}" URL_HASH newArgs)
251 | ELSE()
252 | Thing_removeArgs("${newArgs}" URL_MD5 newArgs)
253 | ENDIF()
254 | Thing_getArgs_concat("${newArgs}" GIT_REPOSITORY git_repository)
255 | Thing_getArgs_concat("${newArgs}" SHALLOW_CLONE shallow_clone)
256 |
257 | # Remove all non-ExternalProject keywords:
258 | Thing_removeArgs("${newArgs}" SHALLOW_CLONE newArgs)
259 | FOREACH(keyword IN LISTS Thing_EXTRA_KEYWORDS)
260 | Thing_removeArgs("${newArgs}" "${keyword}" newArgs)
261 | ENDFOREACH()
262 |
263 | IF(NOT git_repository)
264 | # Add a non git external dependency using ExternalProject_Add with a dummy UPDATE_COMMAND
265 | # Otherwise UPDATE_COMMAND for http dependencies defaults to none causing changes to installed files not to trigger a reinstall
266 | ExternalProject_Add("${name}" "${newArgs}" UPDATE_COMMAND ${CMAKE_COMMAND} -E echo Update)
267 | ELSE()
268 | Thing_removeArgs("${newArgs}" UPDATE_COMMAND newArgs)
269 | Thing_removeArgs("${newArgs}" DOWNLOAD_COMMAND newArgs)
270 | ExternalProject_Add("${name}" "${newArgs}" UPDATE_COMMAND ${Thing_VoidCommand} DOWNLOAD_COMMAND ${Thing_VoidCommand})
271 |
272 | ExternalProject_Get_Property(${name} source_dir stamp_dir download_dir tmp_dir)
273 | GET_FILENAME_COMPONENT(src_name "${source_dir}" NAME)
274 | GET_FILENAME_COMPONENT(work_dir "${source_dir}" PATH)
275 |
276 | Thing_getArgs_concat("${newArgs}" DOWNLOAD_COMMAND download_command)
277 | SET(download_comment)
278 | IF(download_command)
279 | SET(Thing_GitDownloadCommand ${download_command})
280 | ELSEIF(shallow_clone)
281 | SET(Thing_GitDownloadCommand "git clone --depth 1 ${git_repository} ${src_name}")
282 | SET(download_comment "Performing newGitDownload step (git clone --depth 1) for '${name}'")
283 | ELSE()
284 | SET(Thing_GitDownloadCommand "git clone ${git_repository} ${src_name}")
285 | SET(download_comment "Performing newGitDownload step (git clone) for '${name}'")
286 | ENDIF()
287 |
288 | Thing_getArgs_concat("${newArgs}" GIT_TAG git_tag)
289 | IF(NOT git_tag)
290 | SET(git_tag "master")
291 | ENDIF()
292 |
293 | Thing_getArgs_concat("${newArgs}" UPDATE_COMMAND update_command)
294 | IF(update_command)
295 | SET(Thing_GitUpdateCommand ${update_command})
296 | ELSE()
297 | SET(Thing_GitUpdateCommand "git show-ref --heads ${git_tag} && git fetch && git checkout ${git_tag} && git merge --ff-only --no-verify-signatures origin/${git_tag} || true")
298 | ENDIF()
299 |
300 | Thing_getArgs_concat("${newArgs}" LOG_DOWNLOAD log_download)
301 |
302 | SET(depends)
303 |
304 | # For the download step, and the git clone operation, only the repository
305 | # should be recorded in a configured RepositoryInfo file. If the repo
306 | # changes, the clone script should be run again. But if only the tag
307 | # changes, avoid running the clone script again. Let the 'always' running
308 | # update step checkout the new tag.
309 | #
310 | SET(module)
311 | SET(tag)
312 | IF("${CMAKE_VERSION}" VERSION_LESS "3.23.0")
313 | CONFIGURE_FILE(
314 | "${CMAKE_ROOT}/Modules/RepositoryInfo.txt.in"
315 | "${stamp_dir}/${name}-gitinfo.txt"
316 | @ONLY
317 | )
318 | ELSE()
319 | CONFIGURE_FILE(
320 | "${CMAKE_ROOT}/Modules/ExternalProject/RepositoryInfo.txt.in"
321 | "${stamp_dir}/${name}-gitinfo.txt"
322 | @ONLY
323 | )
324 | ENDIF()
325 |
326 | Thing_writeGitDownloadScript(${tmp_dir}/${name}-gitclone.cmake ${source_dir}
327 | git ${git_repository} ${git_tag} ${src_name} ${work_dir}
328 | ${stamp_dir}/${name}-gitinfo.txt ${stamp_dir}/${name}-gitclone-lastrun.txt
329 | ${Thing_GitDownloadCommand}
330 | )
331 |
332 | SET(download_cmd ${CMAKE_COMMAND} -P ${tmp_dir}/${name}-gitclone.cmake)
333 | LIST(APPEND depends ${stamp_dir}/${name}-gitinfo.txt)
334 |
335 | IF(log_download)
336 | SET(log LOG log_download)
337 | ELSE()
338 | SET(log "")
339 | ENDIF()
340 | ExternalProject_Add_Step(
341 | "${name}" newGitDownload
342 | COMMENT ${download_comment}
343 | COMMAND ${download_cmd}
344 | WORKING_DIRECTORY ${work_dir}
345 | DEPENDEES mkdir
346 | DEPENDERS download
347 | ${log})
348 |
349 | Thing_getArgs_concat("${newArgs}" LOG_UPDATE log_update)
350 | IF(log_update)
351 | SET(log LOG log_update)
352 | ELSE()
353 | SET(log "")
354 | ENDIF()
355 | ExternalProject_Add_Step(
356 | "${name}" newGitUpdate
357 | COMMAND sh -c ${Thing_GitUpdateCommand}
358 | DEPENDEES download
359 | DEPENDERS update
360 | ALWAYS 1
361 | WORKING_DIRECTORY "${source_dir}"
362 | ${log})
363 |
364 | ENDIF()
365 | ENDFUNCTION()
366 |
367 | SET(Thing_Polymorphisms_DIR
368 | "${CMAKE_CURRENT_BINARY_DIR}/ThingPolymorphisms")
369 | FILE(MAKE_DIRECTORY "${Thing_Polymorphisms_DIR}")
370 | MACRO(Thing_call cmdName expr)
371 | FILE(WRITE "${Thing_Polymorphisms_DIR}/${Thing__cmdName}.cmake"
372 | "${cmdName}(${expr})")
373 | INCLUDE("${Thing_Polymorphisms_DIR}/${Thing__cmdName}.cmake")
374 | ENDMACRO()
375 |
376 | SET(Thing_ListSeparator "~~...~~")
377 |
378 | FUNCTION(Thing_add name)
379 | IF(DEFINED Thing_add_HELP_I_am_trapped_in_a_recursive_loop)
380 | SET(m "Unexpected Thing_add() recursion detected!!! Did you call")
381 | SET(m "${m} Thing_add() from inside of Thing_OVERRIDE()? - Call")
382 | MESSAGE(FATAL_ERROR "${m} Thing_addFromOverride() instead. Aborting.")
383 | ENDIF()
384 | SET(Thing_add_HELP_I_am_trapped_in_a_recursive_loop "round-round-round we go")
385 | IF(TARGET "${name}")
386 | SET(m "Thing_add() called multiple times for target")
387 | MESSAGE(FATAL_ERROR "${m} \"${name}\"!!! Aborting.")
388 | ENDIF()
389 | LIST(FIND Thing_SKIP "${name}" isSkipped)
390 | IF(${isSkipped} EQUAL -1)
391 | IF(NOT CMAKE_BUILD_TYPE)
392 | SET(bType "Debug")
393 | ELSE()
394 | SET(bType "${CMAKE_BUILD_TYPE}")
395 | ENDIF()
396 | SET(args "${ARGN}")
397 | Thing_setDefaultArg(args "${args}" "LIST_SEPARATOR"
398 | "${Thing_ListSeparator}")
399 | Thing_getArgs_concat("${args}" "LIST_SEPARATOR" separator)
400 | Thing_setDefaultArg(args "${args}" "PREFIX"
401 | "${CMAKE_CURRENT_BINARY_DIR}/${name}")
402 | Thing_setDefaultArg(args "${args}" "INSTALL_DIR"
403 | "${CMAKE_INSTALL_PREFIX}")
404 | Thing_setDefaultArg(args "${args}" "SOURCE_DIR"
405 | "${CMAKE_CURRENT_SOURCE_DIR}/${name}")
406 | Thing_join(prefixPaths "${separator}" ${CMAKE_PREFIX_PATH})
407 | Thing_setDefaultArg(args "${args}" "CMAKE_ARGS"
408 | "-DCMAKE_PREFIX_PATH=${prefixPaths}"
409 | "-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}"
410 | "-DCMAKE_BUILD_TYPE=${bType}")
411 | FOREACH(override IN LISTS Thing_ARGUMENT_OVERRIDES)
412 | IF(COMMAND "${override}")
413 | Thing_call("${override}" "\"${name}\" \"${args}\" args")
414 | ELSE()
415 | MESSAGE(WARNING "Thing: \"${override}\" in argument overrides is not a command!")
416 | ENDIF()
417 | ENDFOREACH()
418 | IF(COMMAND "Thing_OVERRIDE")
419 | Thing_OVERRIDE("${name}" "${args}")
420 | ELSE()
421 | Thing_addFromOverride("${name}" "${args}")
422 | ENDIF()
423 | ExternalProject_Get_Property("${name}" install_dir)
424 | LIST(FIND CMAKE_PREFIX_PATH "${install_dir}" isInPrefixPath)
425 | IF(${isInPrefixPath} EQUAL -1)
426 | LIST(APPEND CMAKE_PREFIX_PATH "${install_dir}")
427 | ENDIF()
428 | SET(CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH}" PARENT_SCOPE)
429 | SET(Thing_installDir_${name} "${install_dir}" PARENT_SCOPE)
430 | ENDIF()
431 | UNSET(Thing_add_HELP_I_am_trapped_in_a_recursive_loop)
432 | ENDFUNCTION()
433 |
434 | FUNCTION(Thing_getProperty name property out)
435 | ExternalProject_Get_Property("${name}" "${property}")
436 | SET("${out}" "${${property}}" PARENT_SCOPE)
437 | ENDFUNCTION()
438 |
--------------------------------------------------------------------------------
/Thing_gitDownload.cmake:
--------------------------------------------------------------------------------
1 | # CMake - Cross Platform Makefile Generator
2 | # Copyright 2000-2014 Kitware, Inc.
3 | # Copyright 2000-2011 Insight Software Consortium
4 | # All rights reserved.
5 | #
6 | # Redistribution and use in source and binary forms, with or without
7 | # modification, are permitted provided that the following conditions
8 | # are met:
9 | #
10 | # * Redistributions of source code must retain the above copyright
11 | # notice, this list of conditions and the following disclaimer.
12 | #
13 | # * Redistributions in binary form must reproduce the above copyright
14 | # notice, this list of conditions and the following disclaimer in the
15 | # documentation and/or other materials provided with the distribution.
16 | #
17 | # * Neither the names of Kitware, Inc., the Insight Software Consortium,
18 | # nor the names of their contributors may be used to endorse or promote
19 | # products derived from this software without specific prior written
20 | # permission.
21 | #
22 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26 | # HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 |
34 | FUNCTION(Thing_writeGitDownloadScript script_filename source_dir git_EXECUTABLE git_repository git_tag src_name work_dir gitclone_infofile gitclone_stampfile gitclone_cmd)
35 | FILE(WRITE ${script_filename}
36 | "if(\"${git_tag}\" STREQUAL \"\")
37 | message(FATAL_ERROR \"Tag for git checkout should not be empty.\")
38 | endif()
39 |
40 | set(run 0)
41 |
42 | if(\"${gitclone_infofile}\" IS_NEWER_THAN \"${gitclone_stampfile}\")
43 | set(run 1)
44 | endif()
45 |
46 | if(NOT run)
47 | message(STATUS \"Avoiding repeated git clone, stamp file is up to date: '${gitclone_stampfile}'\")
48 | return()
49 | endif()
50 |
51 | execute_process(
52 | COMMAND \${CMAKE_COMMAND} -E remove_directory \"${source_dir}\"
53 | RESULT_VARIABLE error_code
54 | )
55 | if(error_code)
56 | message(FATAL_ERROR \"Failed to remove directory: '${source_dir}'\")
57 | endif()
58 |
59 | # try the clone 3 times incase there is an odd git clone issue
60 | set(error_code 1)
61 | set(number_of_tries 0)
62 | while(error_code AND number_of_tries LESS 3)
63 | execute_process(
64 | COMMAND sh -c \"${gitclone_cmd}\"
65 | WORKING_DIRECTORY \"${work_dir}\"
66 | RESULT_VARIABLE error_code
67 | )
68 | math(EXPR number_of_tries \"\${number_of_tries} + 1\")
69 | endwhile()
70 | if(number_of_tries GREATER 1)
71 | message(STATUS \"Had to git clone more than once:
72 | \${number_of_tries} times.\")
73 | endif()
74 | if(error_code)
75 | message(FATAL_ERROR \"Failed to clone repository: '${git_repository}'\")
76 | endif()
77 |
78 | execute_process(
79 | COMMAND \"${git_EXECUTABLE}\" checkout ${git_tag}
80 | WORKING_DIRECTORY \"${work_dir}/${src_name}\"
81 | RESULT_VARIABLE error_code
82 | )
83 | if(error_code)
84 | message(FATAL_ERROR \"Failed to checkout tag: '${git_tag}'\")
85 | endif()
86 |
87 | execute_process(
88 | COMMAND \"${git_EXECUTABLE}\" submodule init
89 | WORKING_DIRECTORY \"${work_dir}/${src_name}\"
90 | RESULT_VARIABLE error_code
91 | )
92 | if(error_code)
93 | message(FATAL_ERROR \"Failed to init submodules in: '${work_dir}/${src_name}'\")
94 | endif()
95 |
96 | execute_process(
97 | COMMAND \"${git_EXECUTABLE}\" submodule update --recursive
98 | WORKING_DIRECTORY \"${work_dir}/${src_name}\"
99 | RESULT_VARIABLE error_code
100 | )
101 | if(error_code)
102 | message(FATAL_ERROR \"Failed to update submodules in: '${work_dir}/${src_name}'\")
103 | endif()
104 |
105 | # Complete success, update the script-last-run stamp file:
106 | #
107 | execute_process(
108 | COMMAND \${CMAKE_COMMAND} -E copy
109 | \"${gitclone_infofile}\"
110 | \"${gitclone_stampfile}\"
111 | WORKING_DIRECTORY \"${work_dir}/${src_name}\"
112 | RESULT_VARIABLE error_code
113 | )
114 | if(error_code)
115 | message(FATAL_ERROR \"Failed to copy script-last-run stamp file: '${gitclone_stampfile}'\")
116 | endif()
117 |
118 | "
119 | )
120 | ENDFUNCTION()
121 |
--------------------------------------------------------------------------------
/config.local.example:
--------------------------------------------------------------------------------
1 | #
2 | # A config.local file with cmake semantics may be created in the source or build
3 | # directory for this repository. That file will be interpreted when running
4 | # cmake.
5 | #
6 |
7 | #
8 | # First we load a OS-specific or common profile which sets a few configuration
9 | # options, such as additional dependencies which need to be built. See the
10 | # /profiles/ directory for the defined profiles, and read their comments. The
11 | # profile named "common" builds no dependencies. For dependency customization
12 | # modify the Thing_SKIP variable as show below.
13 | #
14 | # INCLUDE("${CMAKE_CURRENT_SOURCE_DIR}/profiles/DebianWheezy.cmake" REQUIRED)
15 | #
16 |
17 | INCLUDE("${CMAKE_CURRENT_SOURCE_DIR}/profiles/common.cmake" REQUIRED)
18 |
19 |
20 | #
21 | # To skip or force building of certain targets or dependencies (see
22 | # CMakeLists.txt for the names of targets), use the following command:
23 | #
24 | # LIST(APPEND Thing_SKIP "target1" "target2" ...)
25 | # LIST(REMOVE_ITEM Thing_SKIP "target1" "target2" ...)
26 | #
27 |
28 | #
29 | # If SHAREMIND_INSTALL_PREFIX is set, CMAKE_INSTALL_PREFIX is set to its value.
30 | # Otherwise if CMAKE_BUILD_TYPE equals "Release", CMAKE_INSTALL_PREFIX is left
31 | # unchanged. Otherwise CMAKE_INSTALL_PREFIX is set to install the output files
32 | # to "${CMAKE_CURRENT_SOURCE_DIR}/prefix".
33 | #
34 | # SET(SHAREMIND_INSTALL_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/prefix")
35 | #
36 |
37 | #
38 | # To build NodeJS based projects (e.g. profile_log_visualizer) set
39 | # SET(SHAREMIND_EXCLUDE_NODE FALSE)
40 | #
41 | # Use a different npm registry
42 | # SET(SHAREMIND_NPM_REGISTRY http://example.com )
43 | #
44 |
45 | #
46 | # To override aspects of building the subtargets, define a macro or function
47 | # called "Thing_OVERRIDE". This command must act similarily to the
48 | # "ExternalProject_Add" function, but eventually call "Thing_addFromOverride"
49 | # instead. For example:
50 | #
51 | # FUNCTION(Thing_OVERRIDE name)
52 | # MESSAGE(STATUS "Adding external project: ${name}")
53 | # # Change Boost URL:
54 | # IF("${name}" STREQUAL "boost")
55 | # # Keep a local copy of the downloaded file to prevent redownloads:
56 | # Thing_removeArgs("${ARGN}" URL args)
57 | # Thing_addFromOverride("${name}" "${args}"
58 | # URL "/home/user/downloads/boost_1_56_0.tar.bz2")
59 | # ELSEIF("${name}" STREQUAL "libfmodapi")
60 | # # Configure the build process to use an out-of-tree preconfigured copy
61 | # # of libfmodapi, where "make && make install" can be run. NOTE that the
62 | # # preconfigured location should use the correct prefix and installation
63 | # # paths, so it can find its dependencies and install its output to a
64 | # # location where its reverse dependencies can find their required files.
65 | # # For CMake subprojects this usually means configuring the correct
66 | # # CMAKE_PREFIX_PATH and CMAKE_INSTALL_PREFIX variables.
67 | # Thing_remotebuild("${name}"
68 | # "${ARGN}"
69 | # "/home/user/dev/libfmodapi.git/b"
70 | # "/home/user/dev/libfmodapi.git"
71 | # args)
72 | # # Uncomment this if it installs elsewhere:
73 | # #Thing_resetArgs("${args}" "INSTALL_DIR" "/new/path" args)
74 | # Thing_addFromOverride("${name}" "${args}")
75 | # ELSEIF("${name}" STREQUAL "emulator")
76 | # # Add some more arguments to CMake:
77 | # Thing_addFromOverride("${name}" "${ARGN}"
78 | # CMAKE_ARGS "-DSHAREMIND_RELEASE_BUILD=TRUE")
79 | # ELSE()
80 | # Thing_addFromOverride("${name}" "${ARGN}")
81 | # ENDIF()
82 | # ENDFUNCTION()
83 | #
84 | # Note that this allows to change all aspects of these targets, including (but
85 | # not limited to) changing fetch commands, allowing out-of-tree builds, changing
86 | # dependencies, passing variables etc.
87 | #
88 | # NOTE: Thing_OVERRIDE is not called if the target is listed in the Thing_SKIP
89 | # variable (see below).
90 | #
91 |
92 |
93 | #
94 | # To run CMake code at the end of CMakeLists.txt, define a macro or function
95 | # named Sharemind_hook_postLists. For example:
96 | #
97 | # MACRO(Sharemind_hook_postLists)
98 | # MESSAGE(STATUS "Hello from Sharemind_hook_postLists()!")
99 | # ENDMACRO()
100 |
--------------------------------------------------------------------------------
/patches/boost-1.56.0-fixes.patch:
--------------------------------------------------------------------------------
1 | --- boost/boost/property_tree/ini_parser.hpp 2014-08-27 11:17:16.308963489 +0300
2 | +++ boost/boost/property_tree/ini_parser.hpp 2014-08-27 11:17:21.027963455 +0300
3 | @@ -219,7 +219,6 @@
4 | using detail::check_dupes;
5 |
6 | typedef typename Ptree::key_type::value_type Ch;
7 | - typedef std::basic_string Str;
8 |
9 | BOOST_ASSERT(validate_flags(flags));
10 | (void)flags;
11 |
--------------------------------------------------------------------------------
/patches/crypto++-5.6.5-CMakeLists.txt:
--------------------------------------------------------------------------------
1 | CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
2 | PROJECT(Crypto++ CXX)
3 |
4 | FILE(GLOB CryptoPP_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
5 | FILE(GLOB CryptoPP_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
6 |
7 | IF(APPLE OR ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
8 | ADD_DEFINITIONS("-DCRYPTOPP_DISABLE_ASM")
9 | ENDIF()
10 |
11 | ADD_LIBRARY("crypto++" SHARED ${CryptoPP_SOURCES})
12 | IF(APPLE AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
13 | SET_TARGET_PROPERTIES("crypto++" PROPERTIES COMPILE_FLAGS "-O2 -fPIC -Wa,-q")
14 | ELSE()
15 | SET_TARGET_PROPERTIES("crypto++" PROPERTIES COMPILE_FLAGS "-O2 -fPIC")
16 | ENDIF()
17 | INSTALL(TARGETS "crypto++"
18 | LIBRARY DESTINATION "lib"
19 | ARCHIVE DESTINATION "lib")
20 |
21 | INSTALL(FILES ${CryptoPP_HEADERS}
22 | DESTINATION "include/crypto++")
23 |
24 | INSTALL(CODE "EXECUTE_PROCESS(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink \"${CMAKE_INSTALL_PREFIX}/include/crypto++\" \"${CMAKE_INSTALL_PREFIX}/include/cryptopp\")")
25 | INSTALL(CODE "EXECUTE_PROCESS(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink \"${CMAKE_INSTALL_PREFIX}/lib/libcrypto++.so\" \"${CMAKE_INSTALL_PREFIX}/lib/libcryptopp.so\")")
26 |
--------------------------------------------------------------------------------
/patches/exprtk-CMakeLists.txt:
--------------------------------------------------------------------------------
1 | CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
2 | PROJECT(ExprTk CXX)
3 |
4 | FILE(GLOB ExprTk_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp")
5 |
6 | INSTALL(FILES ${ExprTk_HEADERS}
7 | DESTINATION "include")
8 |
--------------------------------------------------------------------------------
/patches/libsortnetwork-1.1.0.patch:
--------------------------------------------------------------------------------
1 | diff -r -U3 libsortnetwork.old/configure libsortnetwork/configure
2 | --- libsortnetwork.old/configure 2013-11-15 11:43:31.000000000 +0200
3 | +++ libsortnetwork/configure 2013-11-15 11:50:26.000000000 +0200
4 | @@ -880,8 +880,6 @@
5 | LIBPOPULATION_LIBS
6 | BUILD_WITH_LIBPOPULATION_TRUE
7 | BUILD_WITH_LIBPOPULATION_FALSE
8 | -glib_CFLAGS
9 | -glib_LIBS
10 | LTLIBOBJS'
11 | ac_subst_files=''
12 | ac_precious_vars='build_alias
13 | @@ -902,9 +900,7 @@
14 | PKG_CONFIG
15 | LIBPOPULATION_CPPFLAGS
16 | LIBPOPULATION_LDFLAGS
17 | -LIBPOPULATION_LIBS
18 | -glib_CFLAGS
19 | -glib_LIBS'
20 | +LIBPOPULATION_LIBS'
21 |
22 |
23 | # Initialize some variables set by options.
24 | @@ -1523,8 +1519,6 @@
25 | Linker flags required to build with libpopulation
26 | LIBPOPULATION_LIBS
27 | Other libraries required to link against libpopulation
28 | - glib_CFLAGS C compiler flags for glib, overriding pkg-config
29 | - glib_LIBS linker flags for glib, overriding pkg-config
30 |
31 | Use these variables to override the choices made by `configure' or to help
32 | it to find libraries and programs with nonstandard names/locations.
33 | @@ -21318,84 +21312,6 @@
34 | # }}} --with-libpopulation
35 |
36 |
37 | -pkg_failed=no
38 | -{ echo "$as_me:$LINENO: checking for glib" >&5
39 | -echo $ECHO_N "checking for glib... $ECHO_C" >&6; }
40 | -
41 | -if test -n "$PKG_CONFIG"; then
42 | - if test -n "$glib_CFLAGS"; then
43 | - pkg_cv_glib_CFLAGS="$glib_CFLAGS"
44 | - else
45 | - if test -n "$PKG_CONFIG" && \
46 | - { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0\"") >&5
47 | - ($PKG_CONFIG --exists --print-errors "glib-2.0") 2>&5
48 | - ac_status=$?
49 | - echo "$as_me:$LINENO: \$? = $ac_status" >&5
50 | - (exit $ac_status); }; then
51 | - pkg_cv_glib_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0" 2>/dev/null`
52 | -else
53 | - pkg_failed=yes
54 | -fi
55 | - fi
56 | -else
57 | - pkg_failed=untried
58 | -fi
59 | -if test -n "$PKG_CONFIG"; then
60 | - if test -n "$glib_LIBS"; then
61 | - pkg_cv_glib_LIBS="$glib_LIBS"
62 | - else
63 | - if test -n "$PKG_CONFIG" && \
64 | - { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0\"") >&5
65 | - ($PKG_CONFIG --exists --print-errors "glib-2.0") 2>&5
66 | - ac_status=$?
67 | - echo "$as_me:$LINENO: \$? = $ac_status" >&5
68 | - (exit $ac_status); }; then
69 | - pkg_cv_glib_LIBS=`$PKG_CONFIG --libs "glib-2.0" 2>/dev/null`
70 | -else
71 | - pkg_failed=yes
72 | -fi
73 | - fi
74 | -else
75 | - pkg_failed=untried
76 | -fi
77 | -
78 | -
79 | -
80 | -if test $pkg_failed = yes; then
81 | -
82 | -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
83 | - _pkg_short_errors_supported=yes
84 | -else
85 | - _pkg_short_errors_supported=no
86 | -fi
87 | - if test $_pkg_short_errors_supported = yes; then
88 | - glib_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glib-2.0"`
89 | - else
90 | - glib_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glib-2.0"`
91 | - fi
92 | - # Put the nasty error message in config.log where it belongs
93 | - echo "$glib_PKG_ERRORS" >&5
94 | -
95 | - { echo "$as_me:$LINENO: result: no" >&5
96 | -echo "${ECHO_T}no" >&6; }
97 | - have_libglib="no"
98 | -elif test $pkg_failed = untried; then
99 | - have_libglib="no"
100 | -else
101 | - glib_CFLAGS=$pkg_cv_glib_CFLAGS
102 | - glib_LIBS=$pkg_cv_glib_LIBS
103 | - { echo "$as_me:$LINENO: result: yes" >&5
104 | -echo "${ECHO_T}yes" >&6; }
105 | - have_libglib="yes"
106 | -fi
107 | -
108 | -if test "x$have_libglib" != "xyes"
109 | -then
110 | - { { echo "$as_me:$LINENO: error: The GLib library could not be found. It is required when building libsortnetwork!" >&5
111 | -echo "$as_me: error: The GLib library could not be found. It is required when building libsortnetwork!" >&2;}
112 | - { (exit 1); exit 1; }; }
113 | -fi
114 | -
115 | ac_config_files="$ac_config_files Makefile src/Makefile"
116 |
117 | cat >confcache <<\_ACEOF
118 | diff -r -U3 libsortnetwork.old/configure.ac libsortnetwork/configure.ac
119 | --- libsortnetwork.old/configure.ac 2013-11-15 11:43:31.000000000 +0200
120 | +++ libsortnetwork/configure.ac 2013-11-15 11:50:20.000000000 +0200
121 | @@ -109,15 +109,6 @@
122 | AM_CONDITIONAL(BUILD_WITH_LIBPOPULATION, test "x$with_libpopulation" = "xyes")
123 | # }}} --with-libpopulation
124 |
125 | -PKG_CHECK_MODULES([glib], [glib-2.0],
126 | - [have_libglib="yes"],
127 | - [have_libglib="no"])
128 | -
129 | -if test "x$have_libglib" != "xyes"
130 | -then
131 | - AC_MSG_ERROR([The GLib library could not be found. It is required when building libsortnetwork!])
132 | -fi
133 | -
134 | AC_CONFIG_FILES([Makefile src/Makefile])
135 | AC_OUTPUT
136 |
137 | diff -r -U3 libsortnetwork.old/src/Makefile.am libsortnetwork/src/Makefile.am
138 | --- libsortnetwork.old/src/Makefile.am 2013-11-15 11:43:31.000000000 +0200
139 | +++ libsortnetwork/src/Makefile.am 2013-11-15 11:52:35.000000000 +0200
140 | @@ -2,110 +2,9 @@
141 |
142 | lib_LTLIBRARIES = libsortnetwork.la
143 |
144 | -bin_PROGRAMS = sn-apply \
145 | - sn-bitonicmerge sn-bitonicsort \
146 | - sn-bb sn-bb-merge sn-check-bf \
147 | - sn-count-cuts sn-count-markov sn-cut \
148 | - sn-info sn-markov sn-merge sn-normalize \
149 | - sn-oddevenmerge sn-oddevensort sn-pairwisesort \
150 | - sn-shmoo sn-show sn-svg sn-tex sn-tex-cut sn-transpositionsort
151 | -
152 | libsortnetwork_la_SOURCES = sn_network.c sn_network.h \
153 | sn_stage.c sn_stage.h \
154 | sn_comparator.c sn_comparator.h \
155 | sn_random.c sn_random.h \
156 | sn_hashtable.c sn_hashtable.h
157 | libsortnetwork_la_LDFLAGS = -version-info 1:0:1
158 | -
159 | -sn_apply_SOURCES = sn-apply.c
160 | -sn_apply_LDADD = libsortnetwork.la
161 | -
162 | -sn_bb_SOURCES = sn-bb.c
163 | -sn_bb_LDADD = libsortnetwork.la -lm
164 | -
165 | -sn_bb_merge_SOURCES = sn-bb.c
166 | -sn_bb_merge_CPPFLAGS = $(AM_CPPFLAGS) -DBUILD_MERGE=1
167 | -sn_bb_merge_LDADD = libsortnetwork.la -lm
168 | -
169 | -sn_bitonicmerge_SOURCES = sn-bitonicmerge.c
170 | -sn_bitonicmerge_LDADD = libsortnetwork.la
171 | -
172 | -sn_bitonicsort_SOURCES = sn-bitonicsort.c
173 | -sn_bitonicsort_LDADD = libsortnetwork.la
174 | -
175 | -sn_check_bf_SOURCES = sn-check-bf.c
176 | -sn_check_bf_LDADD = libsortnetwork.la
177 | -
178 | -sn_count_cuts_SOURCES = sn-count-cuts.c
179 | -sn_count_cuts_LDADD = libsortnetwork.la -lm
180 | -
181 | -sn_count_markov_SOURCES = sn-count-markov.c
182 | -sn_count_markov_CFLAGS = $(AM_CFLAGS) $(glib_CFLAGS)
183 | -sn_count_markov_LDADD = libsortnetwork.la $(glib_LIBS)
184 | -
185 | -sn_cut_SOURCES = sn-cut.c
186 | -sn_cut_LDADD = libsortnetwork.la
187 | -
188 | -sn_info_SOURCES = sn-info.c
189 | -sn_info_LDADD = libsortnetwork.la
190 | -
191 | -sn_markov_SOURCES = sn-markov.c \
192 | - histogram.c histogram.h
193 | -sn_markov_LDADD = libsortnetwork.la
194 | -
195 | -sn_merge_SOURCES = sn-merge.c
196 | -sn_merge_LDADD = libsortnetwork.la
197 | -
198 | -sn_normalize_SOURCES = sn-normalize.c
199 | -sn_normalize_LDADD = libsortnetwork.la
200 | -
201 | -sn_oddevenmerge_SOURCES = sn-oddevenmerge.c
202 | -sn_oddevenmerge_LDADD = libsortnetwork.la
203 | -
204 | -sn_oddevensort_SOURCES = sn-oddevensort.c
205 | -sn_oddevensort_LDADD = libsortnetwork.la
206 | -
207 | -sn_pairwisesort_SOURCES = sn-pairwisesort.c
208 | -sn_pairwisesort_LDADD = libsortnetwork.la
209 | -
210 | -sn_shmoo_SOURCES = sn-shmoo.c
211 | -sn_shmoo_LDADD = libsortnetwork.la
212 | -
213 | -sn_show_SOURCES = sn-show.c
214 | -sn_show_LDADD = libsortnetwork.la
215 | -
216 | -sn_svg_SOURCES = sn-svg.c
217 | -sn_svg_LDADD = libsortnetwork.la
218 | -
219 | -sn_tex_SOURCES = sn-tex.c
220 | -sn_tex_LDADD = libsortnetwork.la
221 | -
222 | -sn_tex_cut_SOURCES = sn-tex-cut.c
223 | -sn_tex_cut_LDADD = libsortnetwork.la
224 | -
225 | -sn_transpositionsort_SOURCES = sn-transpositionsort.c
226 | -sn_transpositionsort_LDADD = libsortnetwork.la
227 | -
228 | -if BUILD_WITH_LIBPOPULATION
229 | -bin_PROGRAMS += sn-evolution sn-evolution2 sn-evolution-cut sn-evolution-merge
230 | -
231 | -sn_evolution_SOURCES = sn-evolution.c
232 | -sn_evolution_CPPFLAGS = $(AM_CPPFLAGS) $(LIBPOPULATION_CPPFLAGS)
233 | -sn_evolution_LDFLAGS = $(AM_LDFLAGS) $(LIBPOPULATION_LDFLAGS)
234 | -sn_evolution_LDADD = libsortnetwork.la $(LIBPOPULATION_LIBS)
235 | -
236 | -sn_evolution2_SOURCES = sn-evolution2.c
237 | -sn_evolution2_CPPFLAGS = $(AM_CPPFLAGS) $(LIBPOPULATION_CPPFLAGS)
238 | -sn_evolution2_LDFLAGS = $(AM_LDFLAGS) $(LIBPOPULATION_LDFLAGS)
239 | -sn_evolution2_LDADD = libsortnetwork.la $(LIBPOPULATION_LIBS)
240 | -
241 | -sn_evolution_cut_SOURCES = sn-evolution-cut.c
242 | -sn_evolution_cut_CPPFLAGS = $(AM_CPPFLAGS) $(LIBPOPULATION_CPPFLAGS)
243 | -sn_evolution_cut_LDFLAGS = $(AM_LDFLAGS) $(LIBPOPULATION_LDFLAGS)
244 | -sn_evolution_cut_LDADD = libsortnetwork.la $(LIBPOPULATION_LIBS)
245 | -
246 | -sn_evolution_merge_SOURCES = sn-evolution-merge.c
247 | -sn_evolution_merge_CPPFLAGS = $(AM_CPPFLAGS) $(LIBPOPULATION_CPPFLAGS)
248 | -sn_evolution_merge_LDFLAGS = $(AM_LDFLAGS) $(LIBPOPULATION_LDFLAGS)
249 | -sn_evolution_merge_LDADD = libsortnetwork.la $(LIBPOPULATION_LIBS)
250 | -endif
251 | diff -r -U3 libsortnetwork.old/src/Makefile.in libsortnetwork/src/Makefile.in
252 | --- libsortnetwork.old/src/Makefile.in 2013-11-15 11:43:31.000000000 +0200
253 | +++ libsortnetwork/src/Makefile.in 2013-11-15 11:52:47.000000000 +0200
254 | @@ -38,16 +38,6 @@
255 | POST_UNINSTALL = :
256 | build_triplet = @build@
257 | host_triplet = @host@
258 | -bin_PROGRAMS = sn-apply$(EXEEXT) sn-bitonicmerge$(EXEEXT) \
259 | - sn-bitonicsort$(EXEEXT) sn-bb$(EXEEXT) sn-bb-merge$(EXEEXT) \
260 | - sn-check-bf$(EXEEXT) sn-count-cuts$(EXEEXT) \
261 | - sn-count-markov$(EXEEXT) sn-cut$(EXEEXT) sn-info$(EXEEXT) \
262 | - sn-markov$(EXEEXT) sn-merge$(EXEEXT) sn-normalize$(EXEEXT) \
263 | - sn-oddevenmerge$(EXEEXT) sn-oddevensort$(EXEEXT) \
264 | - sn-pairwisesort$(EXEEXT) sn-shmoo$(EXEEXT) sn-show$(EXEEXT) \
265 | - sn-svg$(EXEEXT) sn-tex$(EXEEXT) sn-tex-cut$(EXEEXT) \
266 | - sn-transpositionsort$(EXEEXT) $(am__EXEEXT_1)
267 | -@BUILD_WITH_LIBPOPULATION_TRUE@am__append_1 = sn-evolution sn-evolution2 sn-evolution-cut sn-evolution-merge
268 | subdir = src
269 | DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \
270 | $(srcdir)/Makefile.in $(srcdir)/config.h.in
271 | diff -r -U3 libsortnetwork.old/Makefile.am libsortnetwork/Makefile.am
272 | --- libsortnetwork.old/Makefile.am 2011-06-06 23:17:13.000000000 +0300
273 | +++ libsortnetwork/Makefile.am 2013-11-26 13:08:57.094981966 +0200
274 | @@ -1,5 +1,3 @@
275 | -ACLOCAL_AMFLAGS = -I m4
276 | -
277 | SUBDIRS = src
278 |
279 | INCLUDES = $(LTDLINCL)
280 | diff -r -U3 libsortnetwork.old/Makefile.in libsortnetwork/Makefile.in
281 | --- libsortnetwork.old/Makefile.in 2011-06-06 23:19:15.000000000 +0300
282 | +++ libsortnetwork/Makefile.in 2013-11-26 13:08:53.383981926 +0200
283 | @@ -183,7 +183,6 @@
284 | sharedstatedir = @sharedstatedir@
285 | sysconfdir = @sysconfdir@
286 | target_alias = @target_alias@
287 | -ACLOCAL_AMFLAGS = -I m4
288 | SUBDIRS = src
289 | INCLUDES = $(LTDLINCL)
290 | all: all-recursive
291 |
--------------------------------------------------------------------------------
/profiles/DebianBookworm.cmake:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) Cybernetica
3 | #
4 | # Research/Commercial License Usage
5 | # Licensees holding a valid Research License or Commercial License
6 | # for the Software may use this file according to the written
7 | # agreement between you and Cybernetica.
8 | #
9 | # GNU General Public License Usage
10 | # Alternatively, this file may be used under the terms of the GNU
11 | # General Public License version 3.0 as published by the Free Software
12 | # Foundation and appearing in the file LICENSE.GPL included in the
13 | # packaging of this file. Please review the following information to
14 | # ensure the GNU General Public License version 3.0 requirements will be
15 | # met: http://www.gnu.org/copyleft/gpl-3.0.html.
16 | #
17 | # For further information, please contact us at sharemind@cyber.ee.
18 | #
19 |
20 | #
21 | # To build on Debian Buster with this profile you need to "apt-get install" at
22 | # least the following dependencies:
23 | #
24 | # bison cmake doxygen flex g++ gcc git libboost-dev libboost-filesystem-dev
25 | # libboost-iostreams-dev libboost-program-options-dev libboost-system-dev
26 | # libcrypto++-dev libhdf5-dev libhiredis-dev libmpfr-dev m4 make
27 |
28 | INCLUDE("${CMAKE_CURRENT_SOURCE_DIR}/profiles/common.cmake" REQUIRED)
29 |
30 | LIST(REMOVE_ITEM Thing_SKIP exprtk)
31 |
--------------------------------------------------------------------------------
/profiles/DebianBullseye.cmake:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) Cybernetica
3 | #
4 | # Research/Commercial License Usage
5 | # Licensees holding a valid Research License or Commercial License
6 | # for the Software may use this file according to the written
7 | # agreement between you and Cybernetica.
8 | #
9 | # GNU General Public License Usage
10 | # Alternatively, this file may be used under the terms of the GNU
11 | # General Public License version 3.0 as published by the Free Software
12 | # Foundation and appearing in the file LICENSE.GPL included in the
13 | # packaging of this file. Please review the following information to
14 | # ensure the GNU General Public License version 3.0 requirements will be
15 | # met: http://www.gnu.org/copyleft/gpl-3.0.html.
16 | #
17 | # For further information, please contact us at sharemind@cyber.ee.
18 | #
19 |
20 | #
21 | # To build on Debian Buster with this profile you need to "apt-get install" at
22 | # least the following dependencies:
23 | #
24 | # bison cmake doxygen flex g++ gcc git libboost-dev libboost-filesystem-dev
25 | # libboost-iostreams-dev libboost-program-options-dev libboost-system-dev
26 | # libcrypto++-dev libhdf5-dev libhiredis-dev libmpfr-dev m4 make
27 |
28 | INCLUDE("${CMAKE_CURRENT_SOURCE_DIR}/profiles/common.cmake" REQUIRED)
29 |
30 | LIST(REMOVE_ITEM Thing_SKIP exprtk)
31 |
--------------------------------------------------------------------------------
/profiles/DebianBuster.cmake:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) Cybernetica
3 | #
4 | # Research/Commercial License Usage
5 | # Licensees holding a valid Research License or Commercial License
6 | # for the Software may use this file according to the written
7 | # agreement between you and Cybernetica.
8 | #
9 | # GNU General Public License Usage
10 | # Alternatively, this file may be used under the terms of the GNU
11 | # General Public License version 3.0 as published by the Free Software
12 | # Foundation and appearing in the file LICENSE.GPL included in the
13 | # packaging of this file. Please review the following information to
14 | # ensure the GNU General Public License version 3.0 requirements will be
15 | # met: http://www.gnu.org/copyleft/gpl-3.0.html.
16 | #
17 | # For further information, please contact us at sharemind@cyber.ee.
18 | #
19 |
20 | #
21 | # To build on Debian Buster with this profile you need to "apt-get install" at
22 | # least the following dependencies:
23 | #
24 | # bison cmake doxygen flex g++ gcc git libboost-dev libboost-filesystem-dev
25 | # libboost-iostreams-dev libboost-program-options-dev libboost-system-dev
26 | # libcrypto++-dev libhdf5-dev libhiredis-dev libmpfr-dev m4 make
27 |
28 | INCLUDE("${CMAKE_CURRENT_SOURCE_DIR}/profiles/common.cmake" REQUIRED)
29 |
30 | LIST(REMOVE_ITEM Thing_SKIP exprtk)
31 |
--------------------------------------------------------------------------------
/profiles/DebianJessie.cmake:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) Cybernetica
3 | #
4 | # Research/Commercial License Usage
5 | # Licensees holding a valid Research License or Commercial License
6 | # for the Software may use this file according to the written
7 | # agreement between you and Cybernetica.
8 | #
9 | # GNU General Public License Usage
10 | # Alternatively, this file may be used under the terms of the GNU
11 | # General Public License version 3.0 as published by the Free Software
12 | # Foundation and appearing in the file LICENSE.GPL included in the
13 | # packaging of this file. Please review the following information to
14 | # ensure the GNU General Public License version 3.0 requirements will be
15 | # met: http://www.gnu.org/copyleft/gpl-3.0.html.
16 | #
17 | # For further information, please contact us at sharemind@cyber.ee.
18 | #
19 |
20 | #
21 | # To build on Debian Jessie with this profile you need to "apt-get install" at
22 | # least the following dependencies:
23 | #
24 | # cmake git make gcc g++ libbz2-dev libmpfr-dev libcrypto++-dev libbison-dev
25 | # flex libhdf5-dev libboost-filesystem-dev libboost-iostreams-dev
26 | # libboost-program-options-dev libboost-system-dev libboost-thread-dev
27 | # help2man doxygen
28 | #
29 |
30 | INCLUDE("${CMAKE_CURRENT_SOURCE_DIR}/profiles/common.cmake" REQUIRED)
31 |
32 | LIST(REMOVE_ITEM Thing_SKIP exprtk libsortnetwork)
33 |
--------------------------------------------------------------------------------
/profiles/DebianStretch.cmake:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) Cybernetica
3 | #
4 | # Research/Commercial License Usage
5 | # Licensees holding a valid Research License or Commercial License
6 | # for the Software may use this file according to the written
7 | # agreement between you and Cybernetica.
8 | #
9 | # GNU General Public License Usage
10 | # Alternatively, this file may be used under the terms of the GNU
11 | # General Public License version 3.0 as published by the Free Software
12 | # Foundation and appearing in the file LICENSE.GPL included in the
13 | # packaging of this file. Please review the following information to
14 | # ensure the GNU General Public License version 3.0 requirements will be
15 | # met: http://www.gnu.org/copyleft/gpl-3.0.html.
16 | #
17 | # For further information, please contact us at sharemind@cyber.ee.
18 | #
19 |
20 | #
21 | # To build on Debian Stretch with this profile you need to "apt-get install" at
22 | # least the following dependencies:
23 | #
24 | # bison cmake doxygen flex g++ gcc git libboost-dev libboost-filesystem-dev
25 | # libboost-iostreams-dev libboost-program-options-dev libboost-system-dev
26 | # libcrypto++-dev libgmp-dev libgnutls28-dev libhdf5-dev libhiredis-dev
27 | # libmpfr-dev libssl-dev m4 make nettle-dev patch pkg-config xz-utils
28 |
29 | INCLUDE("${CMAKE_CURRENT_SOURCE_DIR}/profiles/common.cmake" REQUIRED)
30 |
31 | LIST(REMOVE_ITEM Thing_SKIP exprtk)
32 |
--------------------------------------------------------------------------------
/profiles/Gentoo.cmake:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) Cybernetica
3 | #
4 | # Research/Commercial License Usage
5 | # Licensees holding a valid Research License or Commercial License
6 | # for the Software may use this file according to the written
7 | # agreement between you and Cybernetica.
8 | #
9 | # GNU General Public License Usage
10 | # Alternatively, this file may be used under the terms of the GNU
11 | # General Public License version 3.0 as published by the Free Software
12 | # Foundation and appearing in the file LICENSE.GPL included in the
13 | # packaging of this file. Please review the following information to
14 | # ensure the GNU General Public License version 3.0 requirements will be
15 | # met: http://www.gnu.org/copyleft/gpl-3.0.html.
16 | #
17 | # For further information, please contact us at sharemind@cyber.ee.
18 | #
19 |
20 | #
21 | # All the above for "emerge" on one line (don't forget to add USE flags):
22 | #
23 | # dev-vcs/git sys-devel/make \>=dev-util/cmake-2.8.12 dev-libs/boost
24 | # sys-devel/gcc dev-libs/glib:2 dev-libs/crypto++ sys-devel/bison
25 | # sys-devel/flex dev-libs/mpfr app-doc/doxygen
26 | #
27 |
28 | INCLUDE("${CMAKE_CURRENT_SOURCE_DIR}/profiles/common.cmake" REQUIRED)
29 |
30 | LIST(REMOVE_ITEM Thing_SKIP exprtk hdf5 libsortnetwork)
31 |
--------------------------------------------------------------------------------
/profiles/common.cmake:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) Cybernetica
3 | #
4 | # Research/Commercial License Usage
5 | # Licensees holding a valid Research License or Commercial License
6 | # for the Software may use this file according to the written
7 | # agreement between you and Cybernetica.
8 | #
9 | # GNU General Public License Usage
10 | # Alternatively, this file may be used under the terms of the GNU
11 | # General Public License version 3.0 as published by the Free Software
12 | # Foundation and appearing in the file LICENSE.GPL included in the
13 | # packaging of this file. Please review the following information to
14 | # ensure the GNU General Public License version 3.0 requirements will be
15 | # met: http://www.gnu.org/copyleft/gpl-3.0.html.
16 | #
17 | # For further information, please contact us at sharemind@cyber.ee.
18 | #
19 |
20 | #
21 | # This common profile skips all non-Sharemind dependencies.
22 | #
23 |
24 | SET(Thing_SKIP)
25 | MACRO(SharemindAddExternalDependency name)
26 | LIST(APPEND Thing_SKIP "${name}")
27 | ENDMACRO()
28 | MACRO(SharemindAddRepository name)
29 | ENDMACRO()
30 |
31 | INCLUDE("${SHAREMIND_PROJECTFILE}")
32 |
--------------------------------------------------------------------------------