aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2016-07-19 22:50:04 -0700
committerAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2016-11-30 08:25:19 -0800
commita8c9e5d64d9a5a0382fccaa98220d22cbaf9b55f (patch)
treecfded8a49cfc5b7e52ab2615d24a74c5fa7b479e
parent9cb3984eb0e0829d4f05b6116f6ae572bc44d21b (diff)
downloadpaludis-a8c9e5d64d9a5a0382fccaa98220d22cbaf9b55f.tar.gz
paludis-a8c9e5d64d9a5a0382fccaa98220d22cbaf9b55f.tar.xz
build: introduce cmake based build system
-rw-r--r--CMakeLists.txt436
-rw-r--r--bash-completion/CMakeLists.txt1
-rw-r--r--cmake/config.h.in22
-rw-r--r--cmake/modules/FindJansson.cmake57
-rw-r--r--cmake/modules/FindLibMagic.cmake40
-rw-r--r--cmake/modules/FindPCRECPP.cmake42
-rw-r--r--cmake/modules/FindSQLite3.cmake55
-rw-r--r--cmake/modules/FindSphinx.cmake24
-rw-r--r--cmake/modules/PaludisAddLibrary.cmake91
-rw-r--r--cmake/modules/PaludisAddTest.cmake103
-rw-r--r--cmake/modules/PaludisCheckFunctionExists.cmake17
-rw-r--r--cmake/modules/PaludisCompileFlags.cmake78
-rw-r--r--cmake/modules/PaludisGeneratorUtils.cmake140
-rw-r--r--cmake/modules/PaludisList.cmake24
-rw-r--r--cmake/modules/PaludisPackage.cmake34
-rw-r--r--doc/CMakeLists.txt151
-rw-r--r--doc/api/CMakeLists.txt21
-rw-r--r--doc/api/cplusplus/CMakeLists.txt38
-rw-r--r--doc/api/cplusplus/examples/CMakeLists.txt46
-rw-r--r--doc/api/python/CMakeLists.txt38
-rw-r--r--doc/api/ruby/CMakeLists.txt36
-rw-r--r--doc/clients/CMakeLists.txt133
-rw-r--r--doc/configuration/CMakeLists.txt130
-rw-r--r--doc/configuration/repositories/CMakeLists.txt47
-rw-r--r--doc/faq/CMakeLists.txt44
-rw-r--r--doc/overview/CMakeLists.txt32
-rw-r--r--hooks/CMakeLists.txt36
-rw-r--r--hooks/cmake_install.cmake.in260
-rw-r--r--misc/CMakeLists.txt1
-rw-r--r--paludis/CMakeLists.txt423
-rw-r--r--paludis/args/CMakeLists.txt43
-rw-r--r--paludis/distributions/CMakeLists.txt10
-rw-r--r--paludis/distributions/exherbo/CMakeLists.txt9
-rw-r--r--paludis/distributions/gentoo/CMakeLists.txt9
-rw-r--r--paludis/environments/CMakeLists.txt8
-rw-r--r--paludis/environments/paludis/CMakeLists.txt29
-rw-r--r--paludis/environments/portage/CMakeLists.txt13
-rw-r--r--paludis/environments/test/CMakeLists.txt12
-rw-r--r--paludis/fetchers/CMakeLists.txt31
-rw-r--r--paludis/fetchers/demos/CMakeLists.txt6
-rw-r--r--paludis/repositories/CMakeLists.txt8
-rw-r--r--paludis/repositories/accounts/CMakeLists.txt17
-rw-r--r--paludis/repositories/e/CMakeLists.txt158
-rw-r--r--paludis/repositories/e/eapis/CMakeLists.txt23
-rw-r--r--paludis/repositories/e/ebuild/0/CMakeLists.txt39
-rw-r--r--paludis/repositories/e/ebuild/1/CMakeLists.txt7
-rw-r--r--paludis/repositories/e/ebuild/2/CMakeLists.txt14
-rw-r--r--paludis/repositories/e/ebuild/3/CMakeLists.txt6
-rw-r--r--paludis/repositories/e/ebuild/4/CMakeLists.txt10
-rw-r--r--paludis/repositories/e/ebuild/5/CMakeLists.txt9
-rw-r--r--paludis/repositories/e/ebuild/6/CMakeLists.txt11
-rw-r--r--paludis/repositories/e/ebuild/CMakeLists.txt35
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/CMakeLists.txt43
-rw-r--r--paludis/repositories/e/ebuild/paludis-1/CMakeLists.txt6
-rw-r--r--paludis/repositories/e/ebuild/pbin-1/CMakeLists.txt7
-rw-r--r--paludis/repositories/e/ebuild/utils/4/CMakeLists.txt17
-rw-r--r--paludis/repositories/e/ebuild/utils/5/CMakeLists.txt7
-rw-r--r--paludis/repositories/e/ebuild/utils/CMakeLists.txt97
-rw-r--r--paludis/repositories/e/ebuild/utils/exheres-0/CMakeLists.txt58
-rw-r--r--paludis/repositories/fake/CMakeLists.txt24
-rw-r--r--paludis/repositories/gemcutter/CMakeLists.txt25
-rw-r--r--paludis/repositories/repository/CMakeLists.txt8
-rw-r--r--paludis/repositories/unavailable/CMakeLists.txt14
-rw-r--r--paludis/repositories/unpackaged/CMakeLists.txt15
-rw-r--r--paludis/repositories/unwritten/CMakeLists.txt13
-rw-r--r--paludis/resolver/CMakeLists.txt126
-rw-r--r--paludis/selinux/CMakeLists.txt16
-rw-r--r--paludis/syncers/CMakeLists.txt100
-rw-r--r--paludis/util/CMakeLists.txt263
-rw-r--r--pkg-config/CMakeLists.txt14
-rw-r--r--pkg-config/paludis.pc.cmake11
-rw-r--r--python/CMakeLists.txt131
-rw-r--r--ruby/CMakeLists.txt85
-rw-r--r--ruby/demos/CMakeLists.txt18
-rw-r--r--src/CMakeLists.txt10
-rw-r--r--src/clients/CMakeLists.txt5
-rw-r--r--src/clients/cave/CMakeLists.txt304
-rw-r--r--src/output/CMakeLists.txt6
-rw-r--r--vim/CMakeLists.txt4
-rw-r--r--vim/ftdetect/CMakeLists.txt10
-rw-r--r--vim/syntax/CMakeLists.txt18
-rw-r--r--zsh-completion/CMakeLists.txt1
82 files changed, 4563 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..2be516e
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,436 @@
+# vim: set et fdm=marker fmr={{{,}}} sw=2 sts=2 ts=8:
+
+cmake_minimum_required(VERSION 3.3.0)
+cmake_policy(SET CMP0048 NEW)
+cmake_policy(SET CMP0051 NEW)
+cmake_policy(SET CMP0057 NEW)
+cmake_policy(SET CMP0058 NEW)
+
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
+
+include(CheckIncludeFile)
+include(CheckIncludeFileCXX)
+include(CheckCSourceCompiles)
+include(CheckCXXSourceCompiles)
+include(GNUInstallDirs)
+include(CMakeDependentOption)
+
+# TODO(compnerd) figure out if we want to just replace the HTMLDIR usage
+set(CMAKE_INSTALL_FULL_HTMLDIR "${CMAKE_INSTALL_FULL_DOCDIR}")
+
+set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+
+project(paludis VERSION 2.6.0)
+set(PALUDIS_PKG_CONFIG_SLOT ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR})
+
+option(BUILD_SHARED_LIBS "build shared libraries" ON)
+option(ENABLE_DOXYGEN "enable doxygen based documentation" OFF)
+option(ENABLE_DOXYGEN_TAGS "use 'wget' to fetch external doxygen tags" OFF)
+option(ENABLE_GTEST "enable GTest based tests" ON)
+option(ENABLE_PBINS "enable pbins (nonfunctional, for development only)" OFF)
+option(ENABLE_PYTHON "enable python interface (default: OFF)" OFF)
+cmake_dependent_option(ENABLE_PYTHON_DOCS "build the python documentation" ON
+ "ENABLE_PYTHON" OFF)
+option(ENABLE_RUBY "enable ruby interface (default: off)" OFF)
+cmake_dependent_option(ENABLE_RUBY_DOCS "build the ruby documentation" ON
+ "ENABLE_RUBY" OFF)
+option(ENABLE_SEARCH_INDEX "enable search index (requires sqlite3)" OFF)
+option(ENABLE_STRIPPER "build the stripper (requires libmagic)" ON)
+option(ENABLE_VIM "whether to install vim scripts" OFF)
+option(ENABLE_XML "enable xml support for metadata.xml and GLSA support" OFF)
+option(PALUDIS_COLOUR_PINK "use the pink colourscheme" OFF)
+if(CMAKE_CROSSCOMPILING)
+ option(USE_PREBUILT_DOCUMENTATION "use prebuilt documentation" ON)
+else()
+ option(USE_PREBUILT_DOCUMENTATION "use prebuilt documentation" OFF)
+endif()
+
+set(PALUDIS_VIM_INSTALL_DIR "${CMAKE_INSTALL_FULL_DATADIR}/vim/vimfiles" CACHE PATH
+ "vim installation directory")
+set(RUBY_VERSION "2.3" CACHE STRING "Ruby Version (2;1;2.2;2.3)")
+
+set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
+set(THREADS_PREFER_PTHREADS_FLAG TRUE)
+find_package(Threads REQUIRED)
+
+include(PaludisList)
+include(PaludisAddLibrary)
+include(PaludisAddTest)
+include(PaludisCheckFunctionExists)
+include(PaludisCompileFlags)
+
+# {{{ __cxa_demangle
+CHECK_INCLUDE_FILE_CXX(cxxabi.h HAVE_CXXABI_H)
+if(HAVE_CXXABI_H)
+ CHECK_CXX_SOURCE_COMPILES("
+ #include <typeinfo>
+ #include <cxxabi.h>
+ #include <stdlib.h>
+ int main(void) {
+ const char *name = typeid(name).name();
+ int status;
+ char *demangled = abi::__cxa_demangle(name, 0, 0, &status);
+ free(demangled);
+ return 0;
+ }
+ "
+ HAVE_CXA_DEMANGLE)
+endif()
+# }}}
+
+# {{{ miscellaneous functions
+paludis_check_function_exists(strerror HAVE_STRERROR REQUIRED)
+paludis_check_function_exists(signal HAVE_SIGNAL REQUIRED)
+paludis_check_function_exists(grantpt HAVE_GRANTPT REQUIRED)
+paludis_check_function_exists(unlockpt HAVE_UNLOCKPT REQUIRED)
+paludis_check_function_exists(pipe2 HAVE_PIPE2 REQUIRED)
+
+paludis_check_function_exists(ptsname_r HAVE_PTSNAME_R)
+paludis_check_function_exists(ptsname HAVE_PTSNAME)
+if(NOT HAVE_PTSNAME_R AND NOT HAVE_PTSNAME)
+ message(SEND_ERROR "required function `ptsname_r` or `ptsname` not found")
+endif()
+
+paludis_check_function_exists(lchflags HAVE_LCHFLAGS)
+paludis_check_function_exists(utimensat HAVE_UTIMENSAT)
+
+paludis_check_function_exists(canonicalize_file_name HAVE_CANONICALIZE_FILE_NAME)
+# }}}
+
+# {{{ f*xattr family
+CHECK_INCLUDE_FILE(sys/xattr.h HAVE_SYS_XATTR_H)
+if(HAVE_SYS_XATTR_H)
+ CHECK_C_SOURCE_COMPILES("
+ #include <sys/xattr.h>
+ int main(void) {
+ flistxattr(0, 0, 0);
+ fgetxattr(0, 0, 0, 0);
+ fsetxattr(0, 0, 0, 0, 0);
+ return 0;
+ }
+ "
+ HAVE_XATTRS)
+endif()
+# }}}
+
+# {{{ dirent.d_type
+CHECK_C_SOURCE_COMPILES("
+ #include <sys/types.h>
+ #include <dirent.h>
+ int main(void) {
+ struct dirent dent;
+ dent.d_type = DT_LINK;
+ return 0;
+ }
+"
+HAVE_DIRENT_DTYPE)
+# }}}
+
+# {{{ fallocate
+CHECK_C_SOURCE_COMPILES("
+ #include <fcntl.h>
+ #include <unistd.h>
+ #include <sys/types.h>
+ #include <linux/falloc.h>
+ int main(void) {
+ return fallocate(0, FALLOC_FL_KEEP_SIZE, 0, 100);
+ }
+"
+HAVE_FALLOCATE)
+# }}}
+
+# TODO(compnerd) find_library(RT_LIBRARY NAMES rt)
+
+# {{{ -O3/extern template failure
+CHECK_CXX_SOURCE_COMPILES("
+template <typename>
+struct F;
+
+template <typename T_>
+struct T {
+ void f();
+};
+
+template <typename T_>
+void T<T_>::f() { F<T_>::g(); }
+
+extern template class T<int>;
+
+int main(void) {
+ T<int> f;
+ f.f();
+ return 0;
+}
+"
+CXX_INLINES_EXTERN_TEMPLATE)
+if(CXX_INLINES_EXTERN_TEMPLATE)
+ message(SEND_ERROR "${CMAKE_CXX} inlines extern template (GCC bug 39242?); try -O2 or -fno-inline-functions")
+endif()
+# }}}
+
+# {{{ explicitly instantiate fully specialized templates
+CHECK_CXX_SOURCE_COMPILES("
+ template <typename T_>
+ struct S;
+
+ template <>
+ struct S<int> { };
+
+ template class S<int>;
+"
+CXX_NEEDS_EXPLICIT_INSTANTIATION)
+if(NOT CXX_NEEDS_EXPLICIT_INSTANTIATION)
+ add_definitions(-DPALUDIS_NO_EXPLICIT_FULLY_SPECIALISED=1)
+endif()
+# }}}
+
+# {{{ paludis repositories
+set(PALUDIS_ALL_REPOSITORIES
+ accounts;e;fake;gemcutter;repository;unavailable;unpackaged;unwritten)
+set(PALUDIS_DEFAULT_REPOSITORIES
+ e;fake;repository;unavailable;unpackaged;unwritten)
+set(PALUDIS_REPOSITORIES ${PALUDIS_DEFAULT_REPOSITORIES} CACHE STRING
+ "paludis repositories (all;default;${PALUDIS_ALL_REPOSITORIES})")
+
+list_replace(PALUDIS_REPOSITORIES default "${PALUDIS_DEFAULT_REPOSITORIES}")
+list_replace(PALUDIS_REPOSITORIES all "${PALUDIS_ALL_REPOSITORIES}")
+
+set(REPOSITORY_GROUPS_DECLS)
+foreach(repository ${PALUDIS_ALL_REPOSITORIES})
+ string(TOUPPER ${repository} repository_uppercase)
+ set(ENABLE_${repository_uppercase}_REPOSITORY FALSE)
+
+ if(${repository} IN_LIST PALUDIS_REPOSITORIES)
+ set(REPOSITORY_GROUP_IF_${repository} ${repository})
+ set(ENABLE_${repository_uppercase}_REPOSITORY TRUE)
+ endif()
+ set(REPOSITORY_GROUPS_DECLS "${REPOSITORY_GROUPS_DECLS} struct ${repository};")
+endforeach()
+set(REPOSITORY_GROUPS_DECLS "${REPOSITORY_GROUPS_DECLS} struct semicolon_goes_where { }")
+# }}}
+
+# {{{ paludis environments
+set(PALUDIS_ALL_ENVIRONMENTS
+ paludis;portage;test)
+set(PALUDIS_DEFAULT_ENVIRONMENTS
+ paludis;test)
+set(PALUDIS_ENVIRONMENTS "${PALUDIS_DEFAULT_ENVIRONMENTS}" CACHE STRING
+ "paludis environments (all;default;${PALUDIS_ALL_ENVIRONMENTS})")
+
+list_replace(PALUDIS_ENVIRONMENTS default "${PALUDIS_DEFAULT_ENVIRONMENTS}")
+list_replace(PALUDIS_ENVIRONMENTS all "${PALUDIS_ALL_ENVIRONMENTS}")
+
+set(ENVIRONMENT_GROUPS_DECLS)
+foreach(environment ${PALUDIS_ALL_ENVIRONMENTS})
+ if(${environment} IN_LIST PALUDIS_ENVIRONMENTS)
+ set(ENVIRONMENT_GROUP_IF_${environment} environment_groups::${environment})
+
+ string(TOUPPER ${environment} uc_environment)
+ set(ENABLE_${uc_environment}_ENVIRONMENT 1)
+ endif()
+ set(ENVIRONMENT_GROUPS_DECLS "${ENVIRONMENT_GROUPS_DECLS} struct ${environment};")
+endforeach()
+set(ENVIRONMENT_GROUPS_DECLS "${ENVIRONMENT_GROUPS_DECLS} struct semicolon_goes_where { }")
+# }}}
+
+# {{{ paludis distribution
+set(PALUDIS_DEFAULT_DISTRIBUTION gentoo CACHE STRING
+ "paludis distribution (gentoo;exherbo)")
+# }}}
+
+# {{{ paludis clients
+set(PALUDIS_ALL_CLIENTS
+ cave)
+set(PALUDIS_DEFAULT_CLIENTS
+ cave)
+set(PALUDIS_CLIENTS ${PALUDIS_DEFAULT_CLIENTS} CACHE STRING
+ "paludis clients (all;default;${PALUDIS_ALL_CLIENTS})")
+
+list_replace(PALUDIS_CLIENTS default ${PALUDIS_DEFAULT_CLIENTS})
+list_replace(PALUDIS_CLIENTS all ${PALUDIS_ALL_CLIENTS})
+# }}}
+
+# {{{ configuration framework
+set(CONFIG_FRAMEWORK auto CACHE STRING
+ "paludis environments (auto;eselect;eclectic)")
+if(${CONFIG_FRAMEWORK} STREQUAL "auto")
+ execute_process(COMMAND
+ which eclectic
+ OUTPUT_VARIABLE
+ eclectic_path
+ ERROR_QUIET
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ if(${eclectic_path} STREQUAL "")
+ set(CONFIG_FRAMEWORK eselect)
+ else()
+ set(CONFIG_FRAMEWORK eclectic)
+ endif()
+endif()
+execute_process(COMMAND
+ ${CONFIG_FRAMEWORK} version
+ RESULT_VARIABLE
+ exit_code
+ OUTPUT_QUIET
+ ERROR_QUIET)
+if(NOT ${exit_code} EQUAL 0)
+ message(SEND_ERROR "${CONFIG_FRAMEWORK} is required")
+endif()
+
+foreach(module env;news)
+ execute_process(COMMAND
+ ${CONFIG_FRAMEWORK} ${module}
+ RESULT_VARIABLE
+ exit_code
+ OUTPUT_QUIET
+ ERROR_QUIET)
+ if(NOT ${exit_code} EQUAL 0)
+ message(SEND_ERROR "${CONFIG_FRAMEWORK} is missing the `${module}` module")
+ endif()
+endforeach()
+# }}}
+
+if(ENABLE_DOXYGEN)
+ find_package(Doxygen REQUIRED)
+endif()
+
+if(ENABLE_GEMCUTTER_REPOSITORY)
+ find_package(Jansson REQUIRED)
+endif()
+
+if(ENABLE_PBINS)
+ find_package(LibArchive 3.0.4 REQUIRED)
+endif()
+
+if(ENABLE_PYTHON)
+ # TODO(compnerd) adjust for non-gcc compilers
+ if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.0.0)
+ message(SEND_ERROR "gcc >= 4.0.0 is required for python support")
+ endif()
+
+ find_package(PythonInterp)
+ if(NOT PYTHONINTERP_FOUND)
+ message(SEND_ERROR "python is required for python support")
+ endif()
+ execute_process(COMMAND
+ "${PYTHON_EXECUTABLE}" -c "from distutils import sysconfig; print sysconfig.get_python_lib(1)"
+ OUTPUT_VARIABLE
+ PALUDIS_PYEXECDIR
+ ERROR_QUIET
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+ find_package(PythonLibs)
+
+ find_package(Boost REQUIRED
+ COMPONENTS
+ python)
+endif()
+
+set(PALUDIS_PYTHON_INSTALL_DIR "${PALUDIS_PYEXECDIR}" CACHE PATH
+ "python installation dir")
+
+if(ENABLE_PYTHON_DOCS)
+ if(NOT ENABLE_PYTHON)
+ message(SEND_ERROR "python docs requires python to build")
+ endif()
+
+ find_package(Sphinx REQUIRED)
+endif()
+
+if(ENABLE_RUBY)
+ if(NOT "${RUBY_VERSION}" STREQUAL "2.1" AND
+ NOT "${RUBY_VERSION}" STREQUAL "2.2" AND
+ NOT "${RUBY_VERSION}" STREQUAL "2.3")
+ message(SEND_ERROR "invalid ruby version specified (${RUBY_VERSION})")
+ endif()
+
+ find_package(Ruby ${RUBY_VERSION} REQUIRED)
+endif()
+
+set(PALUDIS_RUBY_INSTALL_DIR "${RUBY_SITEARCH_DIR}" CACHE PATH
+ "ruby installation directory")
+
+if(ENABLE_RUBY_DOCS)
+ if(NOT ENABLE_RUBY)
+ message(SEND_ERROR "ruby docs requires ruby to build")
+ endif()
+
+ execute_process(COMMAND
+ "${RUBY_EXECUTABLE}" -rubygems -e "require 'syntax/convertors/html'"
+ OUTPUT_VARIABLE
+ ruby_gem_syntax_available
+ OUTPUT_QUIET
+ ERROR_QUIET)
+ if(NOT ${ruby_gem_syntax_available} EQUAL 0)
+ message(SEND_ERROR "syntax (http://syntax.rubyforge.org) is needed to build ruby documentation")
+ endif()
+endif()
+
+if(ENABLE_SEARCH_INDEX)
+ find_package(SQLite3 REQUIRED)
+endif()
+
+if(ENABLE_STRIPPER)
+ find_package(LibMagic REQUIRED)
+endif()
+
+if(ENABLE_XML)
+ find_package(LibXml2 2.6 REQUIRED)
+endif()
+
+if(NOT USE_PREBUILT_DOCUMENTATION)
+ find_program(ASCIIDOC_EXECUTABLE asciidoc)
+ if(NOT ASCIIDOC_EXECUTABLE)
+ message(SEND_ERROR "asciidoc is required for documentation")
+ endif()
+
+ find_program(XMLTO_EXECUTABLE xmlto)
+ if(NOT XMLTO_EXECUTABLE)
+ message(SEND_ERROR "xmlto is required for documentation")
+ endif()
+
+ find_program(TIDY_EXECUTABLE tidy)
+ if(NOT TIDY_EXECUTABLE)
+ message(SEND_ERROR "tidy is required for documentation")
+ endif()
+endif()
+
+if(cave IN_LIST PALUDIS_CLIENTS)
+ find_package(PCRECPP 7.8 REQUIRED)
+endif()
+
+enable_testing()
+if(ENABLE_GTEST)
+ find_package(GTest REQUIRED)
+endif()
+
+find_program(BASH_EXECUTABLE bash)
+find_program(CAT_EXECUTABLE cat)
+find_program(GIT_EXECUTABLE git)
+find_program(SED_EXECUTABLE sed gsed)
+
+configure_file("${PROJECT_SOURCE_DIR}/cmake/config.h.in"
+ "${CMAKE_BINARY_DIR}/config.h")
+
+add_definitions(-DSYSCONFDIR="${CMAKE_INSTALL_FULL_SYSCONFDIR}"
+ -DLIBEXECDIR="${CMAKE_INSTALL_FULL_LIBEXECDIR}"
+ -DDATADIR="${CMAKE_INSTALL_FULL_DATADIR}"
+ -DLIBDIR="${CMAKE_INSTALL_FULL_LIBDIR}")
+
+include_directories("${CMAKE_BINARY_DIR}")
+include_directories("${PROJECT_SOURCE_DIR}")
+
+add_subdirectory(misc)
+add_subdirectory(paludis)
+add_subdirectory(python)
+add_subdirectory(ruby)
+add_subdirectory(src)
+add_subdirectory(doc)
+add_subdirectory(hooks)
+add_subdirectory(vim)
+add_subdirectory(bash-completion)
+add_subdirectory(zsh-completion)
+add_subdirectory(pkg-config)
+
+include(PaludisPackage)
+
diff --git a/bash-completion/CMakeLists.txt b/bash-completion/CMakeLists.txt
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/bash-completion/CMakeLists.txt
@@ -0,0 +1 @@
+
diff --git a/cmake/config.h.in b/cmake/config.h.in
new file mode 100644
index 0000000..93e0878
--- /dev/null
+++ b/cmake/config.h.in
@@ -0,0 +1,22 @@
+
+#define HAVE_CXA_DEMANGLE @HAVE_CXA_DEMANGLE@
+
+#define REPOSITORY_GROUPS_DECLS @REPOSITORY_GROUPS_DECLS@
+#define REPOSITORY_GROUP_IF_accounts @REPOSITORY_GROUP_IF_accounts@
+#define REPOSITORY_GROUP_IF_e @REPOSITORY_GROUP_IF_e@
+#define REPOSITORY_GROUP_IF_fake @REPOSITORY_GROUP_IF_fake@
+#define REPOSITORY_GROUP_IF_gemcutter @REPOSITORY_GROUP_IF_gemcutter@
+#define REPOSITORY_GROUP_IF_repository @REPOSITORY_GROUP_IF_repository@
+#define REPOSITORY_GROUP_IF_unavailable @REPOSITORY_GROUP_IF_unavailable@
+#define REPOSITORY_GROUP_IF_unpackaged @REPOSITORY_GROUP_IF_unpackaged@
+#define REPOSITORY_GROUP_IF_unwritten @REPOSITORY_GROUP_IF_unwritten@
+#define REPOSITORY_GROUP_IF_dummy
+
+#define ENVIRONMENT_GROUPS_DECLS @ENVIRONMENT_GROUPS_DECLS@
+#define ENVIRONMENT_GROUP_IF_paludis @ENVIRONMENT_GROUP_IF_paludis@
+#define ENVIRONMENT_GROUP_IF_portage @ENVIRONMENT_GROUP_IF_portage@
+#define ENVIRONMENT_GROUP_IF_test @ENVIRONMENT_GROUP_IF_test@
+#define ENVIRONMENT_GROUP_IF_dummy
+
+#define DEFAULT_DISTRIBUTION "@PALUDIS_DEFAULT_DISTRIBUTION@"
+
diff --git a/cmake/modules/FindJansson.cmake b/cmake/modules/FindJansson.cmake
new file mode 100644
index 0000000..ea98f12
--- /dev/null
+++ b/cmake/modules/FindJansson.cmake
@@ -0,0 +1,57 @@
+# .rst
+# FindJansson
+# -----------
+#
+# Find Jansson library and headers
+#
+# The module defines the following variables:
+#
+# ::
+#
+# Jansson_FOUND - true if Jansson was found
+# Jansson_INCLUDE_DIR - include search path
+# Jansson_LIBRARIES - libraries to link
+# Jansson_VERSION - libmagic 3-component version number
+
+if(Jansson_INCLUDE_DIRS AND Jansson_LIBRARIES)
+ set(Jansson_FOUND TRUE)
+else()
+ find_package(PkgConfig QUIET)
+ pkg_check_modules(PC_JANSSON QUIET jansson)
+
+ find_path(Jansson_INCLUDE_DIR
+ NAMES
+ jansson.h
+ HINTS
+ ${PC_JANSSON_INCLUDEDIR}
+ ${PC_JANSSON_INCLUDE_DIRS}
+ ${CMAKE_INSTALL_FULL_INCLUDEDIR})
+ find_library(Jansson_LIBRARIES
+ NAMES
+ jansson
+ libjansson
+ HINTS
+ ${PC_JANSSON_LIBDIR}
+ ${PC_JANSSON_LIBRARY_DIRS}
+ ${CMAKE_INSTALL_FULL_LIBDIR})
+
+ if(Jansson_INCLUDE_DIR AND EXISTS "${Jansson_INCLUDE_DIR}/jansson.h")
+ file(STRINGS "${Jansson_INCLUDE_DIR}/jansson.h"
+ REGEX "^#[ ]*define[ ]+JANSSON_VERSION[ ]+\".*\""
+ jansson_version_str)
+ string(REGEX
+ REPLACE "^[ ]*define[ ]+JANSSON_VERSION[ ]+\"([^\"]*)\".*" "\\1"
+ Jansson_VERSION_STRING "${jansson_version_str}")
+ unset(jansson_version_str)
+ endif()
+
+ include(FindPackageHandleStandardArgs)
+ find_package_handle_standard_args(Jansson
+ REQUIRED_VARS
+ Jansson_INCLUDE_DIRS
+ Jansson_LIBRARIES
+ VERSION_VAR
+ Jansson_VERSION_STRING)
+ mark_as_advanced(Jansson_INCLUDE_DIR Jansson_LIBRARIES)
+endif()
+
diff --git a/cmake/modules/FindLibMagic.cmake b/cmake/modules/FindLibMagic.cmake
new file mode 100644
index 0000000..9c56a07
--- /dev/null
+++ b/cmake/modules/FindLibMagic.cmake
@@ -0,0 +1,40 @@
+#.rst:
+# FindLibMagic
+# ------------
+#
+# Find libmagic library and headers
+#
+# The module defines the following variables:
+#
+# ::
+#
+# LibMagic_FOUND - true if libmagic was found
+# LibMagic_INCLUDE_DIR - include search path
+# LibMagic_LIBRARIES - libraries to link
+
+if(UNIX)
+ find_path(LibMagic_INCLUDE_DIR
+ NAMES
+ magic.h)
+
+ if(APPLE)
+ set(LibMagic_NAMES libmagic.a magic)
+ else()
+ set(LibMagic_NAMES magic)
+ endif()
+
+ find_library(LibMagic_LIBRARIES
+ NAMES
+ ${LibMagic_NAMES}
+ HINTS
+ ${LIBMAGIC_ROOT_DIR}
+ ${CMAKE_INSTALL_PREFIX})
+
+ include(FindPackageHandleStandardArgs)
+ find_package_handle_standard_args(LibMagic
+ REQUIRED_VARS
+ LibMagic_LIBRARIES
+ LibMagic_INCLUDE_DIR)
+ mark_as_advanced(LibMagic_LIBRARIES LibMagic_INCLUDE_DIR)
+endif()
+
diff --git a/cmake/modules/FindPCRECPP.cmake b/cmake/modules/FindPCRECPP.cmake
new file mode 100644
index 0000000..3075f59
--- /dev/null
+++ b/cmake/modules/FindPCRECPP.cmake
@@ -0,0 +1,42 @@
+#.rst:
+# FindPCRECPP
+# ------------
+#
+# Find libpcrecpp library and headers
+#
+# The module defines the following variables:
+#
+# ::
+#
+# PCRECPP_FOUND - true if libmagic was found
+# PCRECPP_INCLUDE_DIR - include search path
+# PCRECPP_LIBRARIES - libraries to link
+
+find_path(PCRECPP_INCLUDE_DIR
+ NAMES
+ pcrecpp.h)
+
+find_library(PCRECPP_LIBRARY
+ NAMES
+ pcrecpp
+ HINTS
+ ${PCRECPP_ROOT_DIR}
+ ${CMAKE_INSTALL_PREFIX})
+find_library(PCRE_LIBRARY
+ NAMES
+ pcre
+ HINTS
+ ${PCRECPP_ROOT_DIR}
+ ${CMAKE_INSTALL_PREFIX})
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(PCRECPP
+ REQUIRED_VARS
+ PCRECPP_LIBRARY
+ PCRE_LIBRARY
+ PCRECPP_INCLUDE_DIR)
+if(PCRECPP_FOUND)
+ set(PCRECPP_LIBRARIES ${PCRECPP_LIBRARY} ${PCRE_LIBRARY})
+endif()
+mark_as_advanced(PCRECPP_INCLUDE_DIR PCRE_LIBRARY PCRECPP_LIBRARY PCRECPP_LIBRARIES)
+
diff --git a/cmake/modules/FindSQLite3.cmake b/cmake/modules/FindSQLite3.cmake
new file mode 100644
index 0000000..306fd9f
--- /dev/null
+++ b/cmake/modules/FindSQLite3.cmake
@@ -0,0 +1,55 @@
+#.rst:
+# FindSQLite3
+# ------------
+#
+# Find SQLite3 library and headers
+#
+# The module defines the following variables:
+#
+# ::
+#
+# SQLite3_FOUND - true if SQLite3 was found
+# SQLite3_INCLUDE_DIR - include search path
+# SQLite3_LIBRARIES - libraries to link
+# SQLite3_VERSION - libmagic 3-component version number
+
+if(SQLite3_INCLUDE_DIRS AND SQLite3_LIBRARIES)
+ set(SQLite3_FOUND TRUE)
+else()
+ find_package(PkgConfig QUIET)
+ pkg_check_modules(PC_SQLITE3 QUIET sqlite3)
+
+ find_path(SQLite3_INCLUDE_DIR
+ NAMES
+ sqlite3.h
+ HINTS
+ ${PC_SQLITE3_INCLUDEDIR}
+ ${PC_SQLITE3_INCLUDE_DIRS}
+ ${CMAKE_INSTALL_FULL_INCLUDEDIR})
+ find_library(SQLite3_LIBRARIES
+ NAMES
+ sqlite3 libsqlite3
+ HINTS
+ ${PC_SQLITE3_LIBDIR}
+ ${PC_SQLITE3_LIBRARY_DIRS}
+ ${CMAKE_INSTALL_FULL_LIBDIR})
+
+ if(SQLite3_INCLUDE_DIR AND EXISTS "${SQLite3_INCLUDE_DIR}/sqlite3.h")
+ file(STRINGS "${SQLite3_INCLUDE_DIR}/sqlite3.h"
+ sqlite3_version_str
+ REGEX "^#define SQLITE_VERSION[ ]+\".*\"")
+ string(REGEX REPLACE "^#define SQLITE_VERSION[ ]+\"([^\"]*)\".*" "\\1"
+ SQLite3_VERSION_STRING "${sqlite3_version_str}")
+ unset(sqlite3_version_str)
+ endif()
+
+ include(FindPackageHandleStandardArgs)
+ find_package_handle_standard_args(SQLite3
+ REQUIRED_VARS
+ SQLite3_LIBRARIES
+ SQLite3_INCLUDE_DIR
+ VERSION_VAR
+ SQLite3_VERSION_STRING)
+ mark_as_advanced(SQLite3_INCLUDE_DIR SQLite3_LIBRARIES)
+endif()
+
diff --git a/cmake/modules/FindSphinx.cmake b/cmake/modules/FindSphinx.cmake
new file mode 100644
index 0000000..8e18e2c
--- /dev/null
+++ b/cmake/modules/FindSphinx.cmake
@@ -0,0 +1,24 @@
+#.rst:
+# FindSphinx
+# ------------
+#
+# Find sphinx documentation generator
+#
+# The module defines the following variables:
+#
+# ::
+#
+# SPHINX_FOUND - true if sphinx was found
+# SPHINX_EXECUTABLE - sphinx binary
+
+find_program(SPHINX_EXECUTABLE
+ NAMES
+ sphinx-build
+ HINTS
+ ${SPHINX_ROOT_DIR}
+ ${CMAKE_INSTALL_PREFIX})
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Sphinx DEFAULT_MSG SPHINX_EXECUTABLE)
+mark_as_advanced(SPHINX_EXECUTABLE)
+
diff --git a/cmake/modules/PaludisAddLibrary.cmake b/cmake/modules/PaludisAddLibrary.cmake
new file mode 100644
index 0000000..d57666c
--- /dev/null
+++ b/cmake/modules/PaludisAddLibrary.cmake
@@ -0,0 +1,91 @@
+
+include(CMakeParseArguments)
+include(PaludisGeneratorUtils)
+
+function(paludis_add_library library_name)
+ set(options SHARED_LIBRARY STATIC_LIBRARY OBJECT_LIBRARY UNVERSIONED)
+ set(single_value_args)
+ set(multiple_value_args NN_SOURCES SE_SOURCES INCORPORATE_OBJECT_LIBRARIES)
+
+ cmake_parse_arguments(PAL "${options}" "${single_value_args}" "${multiple_value_args}" ${ARGN})
+
+ if(PAL_STATIC_LIBRARY AND PAL_OBJECT_LIBRARY)
+ message(SEND_ERROR "paludis_add_library(${library_name}) called with STATIC_LIBRARY and OBJECT_LIBRARY")
+ endif()
+
+ if(PAL_STATIC_LIBRARY)
+ set(libkind STATIC)
+ elseif(PAL_OBJECT_LIBRARY)
+ set(libkind OBJECT)
+ elseif(PAL_SHARED_LIBRARY)
+ set(libkibd SHARED)
+ else()
+ set(libkind)
+ endif()
+
+ set(nnsources)
+ set(nndependencies)
+ foreach(nn_source ${PAL_NN_SOURCES})
+ get_filename_component(nnname ${nn_source} NAME_WE)
+ paludis_nnprocess(${nn_source}
+ HEADER_TARGET
+ ${nnname}_HEADER_TARGET
+ SOURCE_TARGET
+ ${nnname}_SOURCE_TARGET
+ SOURCE_FILE
+ ${nnname}_SOURCE_FILE)
+ list(APPEND nnsources ${${nnname}_SOURCE_FILE})
+ list(APPEND nndependencies ${${nnname}_HEADER_TARGET};${${nnname}_SOURCE_TARGET})
+ endforeach()
+ add_custom_target(${library_name}_NN
+ DEPENDS
+ ${nndependencies})
+
+ set(sedependencies)
+ foreach(se_source ${PAL_SE_SOURCES})
+ paludis_seprocess(${se_source}
+ HEADER_TARGET
+ ${se_source}_HEADER_TARGET
+ SOURCE_TARGET
+ ${se_source}_SOURCE_TARGET)
+ list(APPEND sedependencies ${${se_source}_HEADER_TARGET};${${se_source}_SOURCE_TARGET})
+ endforeach()
+ add_custom_target(${library_name}_SE
+ DEPENDS
+ ${sedependencies})
+
+ set(object_libraries_expressions)
+ foreach(library ${PAL_INCORPORATE_OBJECT_LIBRARIES})
+ list(APPEND object_libraries_expressions $<TARGET_OBJECTS:${library}>)
+ endforeach()
+
+ add_library(${library_name}
+ ${libkind}
+ ${PAL_UNPARSED_ARGUMENTS}
+ ${object_libraries_expressions}
+ ${nnsources})
+ if(nndependencies)
+ add_dependencies(${library_name} ${nndependencies})
+ endif()
+ if(sedependencies)
+ add_dependencies(${library_name} ${sedependencies})
+ endif()
+
+ if(NOT PAL_OBJECT_LIBRARY)
+ get_target_property(libkind ${library_name} TYPE)
+ string(REGEX REPLACE "^lib" "" output_name ${library_name})
+ set(output_name ${output_name}_${PALUDIS_PKG_CONFIG_SLOT})
+ set_target_properties(${library_name} PROPERTIES OUTPUT_NAME ${output_name})
+ endif()
+
+ if("${libkind}" STREQUAL "SHARED_LIBRARY" AND NOT PAL_UNVERSIONED)
+ math(EXPR version_major "${PROJECT_VERSION_MAJOR} * 100 + ${PROJECT_VERSION_MINOR}")
+ set_target_properties(${library_name}
+ PROPERTIES
+ VERSION
+ "${version_major}.${PROJECT_VERSION_PATCH}.0"
+ SOVERSION
+ "${version_major}")
+ endif()
+endfunction()
+
diff --git a/cmake/modules/PaludisAddTest.cmake b/cmake/modules/PaludisAddTest.cmake
new file mode 100644
index 0000000..cde8efb
--- /dev/null
+++ b/cmake/modules/PaludisAddTest.cmake
@@ -0,0 +1,103 @@
+
+include(CMakeParseArguments)
+
+function(paludis_add_test test_name)
+ set(options BASH GTEST PYTHON RUBY)
+ set(single_value_args EBUILD_MODULE_SUFFIXES TEST_RUNNER)
+ set(multiple_value_args LINK_LIBRARIES)
+
+ cmake_parse_arguments(PAT "${options}" "${single_value_args}" "${multiple_value_args}" ${ARGN})
+
+ string(REGEX MATCH "_TEST" has_TEST ${test_name})
+ if(NOT has_TEST)
+ set(test_name ${test_name}_TEST)
+ endif()
+
+ if(PAT_GTEST AND NOT ENABLE_GTEST)
+ return()
+ endif()
+
+ if(NOT PAT_BASH AND NOT PAT_PYTHON AND NOT PAT_RUBY)
+ add_executable(${test_name}
+ "${CMAKE_CURRENT_SOURCE_DIR}/${test_name}.cc")
+ endif()
+ if(PAT_GTEST)
+ target_include_directories(${test_name}
+ PRIVATE
+ ${GTEST_INCLUDE_DIRS})
+ target_link_libraries(${test_name}
+ PRIVATE
+ libpaludis
+ libpaludisutil
+ ${GTEST_BOTH_LIBRARIES}
+ ${PAT_LINK_LIBRARIES})
+ endif()
+
+ set(pat_test_runner "${PROJECT_SOURCE_DIR}/paludis/util/run_test.sh")
+ if(PAT_TEST_RUNNER)
+ set(pat_test_runner "${PAT_TEST_RUNNER}")
+ endif()
+
+ set(pat_environment_variables)
+ if(NOT "${PAT_EBUILD_MODULE_SUFFIXES}" STREQUAL "")
+ set(pat_environment_variables PALUDIS_EBUILD_MODULE_SUFFIXES=${PAT_EBUILD_MODULE_SUFFIXES})
+ endif()
+
+ string(REGEX REPLACE "_TEST" "" pat_display_name ${test_name})
+
+ set(pat_test_extension "")
+ if(PAT_PYTHON)
+ set(pat_test_extension ".py")
+ elseif(PAT_RUBY)
+ set(pat_test_extension ".rb")
+ endif()
+
+ if(PAT_BASH OR PAT_PYTHON OR PAT_RUBY)
+ set(pat_test_binary_parent_directory "${CMAKE_CURRENT_SOURCE_DIR}")
+ else()
+ set(pat_test_binary_parent_directory "${CMAKE_CURRENT_BINARY_DIR}")
+ endif()
+
+ set(pat_test_binary
+ "${pat_test_binary_parent_directory}/${test_name}${pat_test_extension}")
+
+ math(EXPR version_major "${PROJECT_VERSION_MAJOR} * 100 + ${PROJECT_VERSION_MINOR}")
+
+ # NOTE(compnerd) the trailing slash on the TEST_SCRIPT_DIR is important as
+ # the harness will not add that for us
+ add_test(NAME
+ ${pat_display_name}
+ COMMAND
+ env -i HOME=${CMAKE_CURRENT_BINARY_DIR}
+ LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/paludis
+ PALUDIS_BYPASS_USERPRIV_CHECKS=YES
+ PALUDIS_DEFAULT_OUTPUT_CONF=${PROJECT_SOURCE_DIR}/paludis/environments/paludis/tests_output.conf
+ PALUDIS_DISTRIBUTION=gentoo
+ PALUDIS_DISTRIBUTIONS_DIR=${PROJECT_SOURCE_DIR}/paludis/distributions
+ PALUDIS_EAPIS_DIR=${PROJECT_SOURCE_DIR}/paludis/repositories/e/eapis
+ PALUDIS_EBUILD_DIR=${PROJECT_SOURCE_DIR}/paludis/repositories/e/ebuild
+ PALUDIS_EBUILD_DIR_FALLBACK=${CMAKE_BINARY_DIR}/paludis/repositories/e/ebuild
+ PALUDIS_ECHO_FUNCTIONS_DIR=${CMAKE_BINARY_DIR}/paludis/util
+ PALUDIS_EXTRA_EBUILD_MODULES_DIRS=${CMAKE_BINARY_DIR}/paludis/util
+ PALUDIS_FETCHERS_DIR=${PROJECT_SOURCE_DIR}/paludis/fetchers
+ PALUDIS_HOOKER_DIR=${PROJECT_SOURCE_DIR}/paludis
+ PALUDIS_NO_CHOWN=YES
+ PALUDIS_NO_GLOBAL_HOOKS=YES
+ PALUDIS_NO_GLOBAL_SETS=YES
+ PALUDIS_NO_XTERM_TITLES=YES
+ PALUDIS_PC_SLOT=${PALUDIS_PKG_CONFIG_SLOT}
+ PALUDIS_PYTHON_DIR=${PROJECT_SOURCE_DIR}/python
+ PALUDIS_SUFFIXES_FILE=${PROJECT_SOURCE_DIR}/paludis/repositories/e/ebuild_entries_suffixes.conf
+ PALUDIS_TMPDIR=${CMAKE_CURRENT_BINARY_DIR}
+ PYTHON=${PYTHON_EXECUTABLE}
+ PYTHONPATH=${CMAKE_BINARY_DIR}/python
+ RUBY=${RUBY_EXECUTABLE}
+ RUBYLIB=${CMAKE_BINARY_DIR}/ruby
+ SO_SUFFIX=${version_major}
+ SYSCONFDIR=${CMAKE_INSTALL_FULL_SYSCONFDIR}
+ TEST_SCRIPT_DIR=${CMAKE_CURRENT_SOURCE_DIR}/
+ TOP_BUILDDIR=${CMAKE_BINARY_DIR}
+ ${pat_environment_variables}
+ "${BASH_EXECUTABLE}" ${pat_test_runner} "${pat_test_binary}")
+endfunction()
+
diff --git a/cmake/modules/PaludisCheckFunctionExists.cmake b/cmake/modules/PaludisCheckFunctionExists.cmake
new file mode 100644
index 0000000..4f036e0
--- /dev/null
+++ b/cmake/modules/PaludisCheckFunctionExists.cmake
@@ -0,0 +1,17 @@
+
+include(CheckFunctionExists)
+include(CMakeParseArguments)
+
+macro(paludis_check_function_exists function variable)
+ set(pcfe_options REQUIRED)
+ set(pcfe_single_value_args)
+ set(pcfe_multiple_value_args)
+
+ cmake_parse_arguments(PCFE "${pcfe_options}" "${pcfe_single_value_args}" "${pcfe_multiple_value_args}" ${ARGN})
+
+ check_function_exists(${function} ${variable})
+ if(PCFE_REQUIRED AND NOT ${variable})
+ message(SEND_ERROR "required function `${function}` not found")
+ endif()
+endmacro()
+
diff --git a/cmake/modules/PaludisCompileFlags.cmake b/cmake/modules/PaludisCompileFlags.cmake
new file mode 100644
index 0000000..7db849f
--- /dev/null
+++ b/cmake/modules/PaludisCompileFlags.cmake
@@ -0,0 +1,78 @@
+
+include(CheckCXXCompilerFlag)
+
+function(append_if condition value)
+ if (${condition})
+ foreach(variable ${ARGN})
+ set(${variable} "${${variable}} ${value}" PARENT_SCOPE)
+ endforeach(variable)
+ endif()
+endfunction()
+
+if(NOT $ENV{LET_ME_RICE})
+ set(flags ${CMAKE_C_FLAGS};${CMAKE_CXX_FLAGS};${CMAKE_EXE_LINKER_FLAGS};${CMAKE_SHARED_LINKER_FLAGS})
+ foreach(flag enforce-eh;fast-math;rtti;visibility;znow;std=;align-functions=;prefetch-loop-arrays;Ofast)
+ list(FIND flags ${flag} have_flag)
+ if(have_flag)
+ message(SEND_ERROR "unsupported flag `${flag}` found")
+ endif()
+ endforeach()
+endif()
+
+check_cxx_compiler_flag("-Werror -Wall" CXX_SUPPORTS_WALL)
+append_if(CXX_SUPPORTS_WALL "-Wall" CMAKE_CXX_FLAGS)
+
+check_cxx_compiler_flag("-Werror -Wextra" CXX_SUPPORTS_WEXTRA)
+append_if(CXX_SUPPORTS_WEXTRA "-Wextra" CMAKE_CXX_FLAGS)
+
+check_cxx_compiler_flag("-Werror -Wold-style-cast" CXX_SUPPORTS_WOLD_STYLE_CAST)
+append_if(CXX_SUPPORTS_WOLD_STYLE_CAST "-Wold-style-cast" CMAKE_CXX_FLAGS)
+
+check_cxx_compiler_flag("-Werror -Wredundant-decls" CXX_SUPPORTS_WREDUNDANT_DECLS)
+append_if(CXX_SUPPORTS_WREDUNDANT_DECLS "-Wredundant-decls" CMAKE_CXX_FLAGS)
+
+check_cxx_compiler_flag("-Werror -Wstrict-null-sentinel" CXX_SUPPORTS_WSTRICT_NULL_SENTINEL)
+append_if(CXX_SUPPORTS_WSTRICT_NULL_SENTINEL "-Wstrict-null-sentinel" CMAKE_CXX_FLAGS)
+
+check_cxx_compiler_flag("-Werror -Wmissing-noreturn" CXX_SUPPORTS_WMISSING_NORETURN)
+append_if(CXX_SUPPORTS_WMISSING_NORETURN "-Wmissing-noreturn" CMAKE_CXX_FLAGS)
+
+check_cxx_compiler_flag("-Werror -Woverloaded-virtual" CXX_SUPPORTS_WOVERLOADED_VIRTUAL)
+append_if(CXX_SUPPORTS_WOVERLOADED_VIRTUAL "-Woverloaded-virtual" CMAKE_CXX_FLAGS)
+
+check_cxx_compiler_flag("-Werror -Winit-self" CXX_SUPPORTS_WINIT_SELF)
+append_if(CXX_SUPPORTS_WINIT_SELF "-Winit-self" CMAKE_CXX_FLAGS)
+
+check_cxx_compiler_flag("-Werror -Wunreachable-code" CXX_SUPPORTS_WUNREACHABLE_CODE)
+append_if(CXX_SUPPORTS_WUNREACHABLE_CODE "-Wunreachable-code" CMAKE_CXX_FLAGS)
+
+check_cxx_compiler_flag("-Werror -Wunused" CXX_SUPPORTS_WUNUSED)
+append_if(CXX_SUPPORTS_WUNUSED "-Wunused" CMAKE_CXX_FLAGS)
+
+check_cxx_compiler_flag("-Werror -Wshadow" CXX_SUPPORTS_WSHADOW)
+append_if(CXX_SUPPORTS_WSHADOW "-Wshadow" CMAKE_CXX_FLAGS)
+
+check_cxx_compiler_flag("-Werror -Wwrite-strings" CXX_SUPPORTS_WWRITE_STRINGS)
+append_if(CXX_SUPPORTS_WWRITE_STRINGS "-Wwrite-strings" CMAKE_CXX_FLAGS)
+
+check_cxx_compiler_flag("-Werror -Wsignature-shadow" CXX_SUPPORTS_WSIGNATURE_SHADOW)
+append_if(CXX_SUPPORTS_WSIGNATURE_SHADOW "-Wsignature-shadow" CMAKE_CXX_FLAGS)
+
+check_cxx_compiler_flag("-Werror -Wfloat-equal" CXX_SUPPORTS_WFLOAT_EQUAL)
+append_if(CXX_SUPPORTS_WFLOAT_EQUAL "-Wfloat-equal" CMAKE_CXX_FLAGS)
+
+check_cxx_compiler_flag("-Werror -Wno-ignored-qualifiers" CXX_SUPPORTS_WNO_IGNORED_QUALIFIERS)
+append_if(CXX_SUPPORTS_WNO_IGNORED_QUALIFIERS "-Wno-ignored-qualifiers" CMAKE_CXX_FLAGS)
+
+check_cxx_compiler_flag("-Werror -Wno-non-virtrual-dtor" CXX_SUPPORTS_WNO_NON_VIRTUAL_DTOR)
+append_if(CXX_SUPPORTS_WNO_NON_VIRTUAL_DTOR "-Wno-non-virtual-dtor" CMAKE_CXX_FLAGS)
+
+check_cxx_compiler_flag("-Werror -fvisibility=hidden" CXX_SUPPORTS_FVISIBILITY_HIDDEN)
+append_if(CXX_SUPPORTS_FVISIBILITY_HIDDEN "-fvisibility=hidden" CMAKE_CXX_FLAGS)
+
+check_cxx_compiler_flag("-Werror -fvisibility-inlines-hidden" CXX_SUPPORTS_FVISIBILITY_INLINES_HIDDEN)
+append_if(CXX_SUPPORTS_FVISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden" CMAKE_CXX_FLAGS)
+
+check_cxx_compiler_flag("-Werror -fno-strict-aliasing" CXX_SUPPORTS_FNO_STRICT_ALIASING)
+check_cxx_compiler_flag("-Werror -g0" CXX_SUPPORTS_G0)
+
diff --git a/cmake/modules/PaludisGeneratorUtils.cmake b/cmake/modules/PaludisGeneratorUtils.cmake
new file mode 100644
index 0000000..f9edcef
--- /dev/null
+++ b/cmake/modules/PaludisGeneratorUtils.cmake
@@ -0,0 +1,140 @@
+
+include(CMakeParseArguments)
+
+find_program(M4_EXECUTABLE NAMES m4 gm4 DOC "m4 macro processor")
+if(NOT M4_EXECUTABLE)
+ message(FATAL_ERROR "m4 not found")
+endif()
+
+function(paludis_m4process input_file target)
+ set(options)
+ set(single_value_args OUTPUT)
+ set(multiple_value_args)
+
+ cmake_parse_arguments(PM4P "${options}" "${single_value_args}" "${multiple_value_args}" ${ARGN})
+
+ get_filename_component(input_file_basename "${input_file}" NAME)
+ if(PM4P_OUTPUT)
+ set(output_file "${PM4P_OUTPUT}")
+ else()
+ set(output_file "${CMAKE_CURRENT_BINARY_DIR}/${input_file_basename}")
+ string(REGEX REPLACE "\\.[^.]*$" "" output_file "${output_file}")
+ endif()
+
+ string(MD5 md5 "paludis-m4process-${output_file}")
+ set(target_name paludis-m4process-${md5}-${input_file_basename})
+
+ add_custom_command(OUTPUT
+ ${output_file}
+ COMMAND
+ ${M4_EXECUTABLE} -I ${PROJECT_SOURCE_DIR} -E ${input_file} > ${output_file}
+ DEPENDS
+ ${input_file})
+ add_custom_target(${target_name} DEPENDS ${output_file} COMMENT ${output_file})
+
+ set(${target} ${target_name} PARENT_SCOPE)
+endfunction()
+
+# TODO(compnerd) convert misc/make_se.bash into a cmake script
+function(paludis_seprocess input_file)
+ set(single_value_args HEADER_TARGET SOURCE_TARGET)
+ set(multiple_value_args)
+
+ cmake_parse_arguments(PSEP "${options}" "${single_value_args}" "${multiple_value_args}" ${ARGN})
+
+ if(NOT PSEP_HEADER_TARGET)
+ message(SEND_ERROR "paludis_seprocess(${input_file}) invoked without HEADER_TARGET option")
+ endif()
+ if(NOT PSEP_SOURCE_TARGET)
+ message(SEND_ERROR "paludis_seprocess(${input_file}) invoked without SOURCE_TARGET option")
+ endif()
+
+ get_filename_component(input_file_basename "${input_file}" NAME)
+ get_filename_component(input_file_basename_we "${input_file}" NAME_WE)
+
+ set(output_header_file "${CMAKE_CURRENT_BINARY_DIR}/${input_file_basename_we}-se.hh")
+ string(MD5 md5 "paludis-seprocess-${output_header_file}")
+ set(header_target_name paludis-seprocess-${md5}-${input_file_basename_we}-se.hh)
+ set(${PSEP_HEADER_TARGET} ${header_target_name} PARENT_SCOPE)
+
+ add_custom_command(OUTPUT
+ ${output_header_file}
+ COMMAND
+ "${PROJECT_SOURCE_DIR}/misc/make_se.bash" --header ${input_file} > ${output_header_file}
+ DEPENDS
+ "${PROJECT_SOURCE_DIR}/misc/make_se.bash"
+ ${input_file})
+ add_custom_target(${header_target_name} DEPENDS ${output_header_file} COMMENT ${output_header_file})
+
+
+ set(output_source_file "${CMAKE_CURRENT_BINARY_DIR}/${input_file_basename_we}-se.cc")
+ string(MD5 md5 "paludis-seprocess-${output_source_file}")
+ set(source_target_name paludis-seprocess-${md5}-${input_file_basename_we}-se.cc)
+ set(${PSEP_SOURCE_TARGET} ${source_target_name} PARENT_SCOPE)
+
+ add_custom_command(OUTPUT
+ ${output_source_file}
+ COMMAND
+ "${PROJECT_SOURCE_DIR}/misc/make_se.bash" --source ${input_file} > ${output_source_file}
+ DEPENDS
+ "${PROJECT_SOURCE_DIR}/misc/make_se.bash"
+ ${input_file})
+ add_custom_target(${source_target_name} DEPENDS ${output_source_file} COMMENT ${output_source_file})
+endfunction()
+
+# TODO(compnerd) convert make_nn.bash into a cmake script
+function(paludis_nnprocess input_file)
+ set(options)
+ set(single_value_args HEADER_TARGET HEADER_FILE SOURCE_TARGET SOURCE_FILE)
+ set(multiple_value_args)
+
+ cmake_parse_arguments(PNNP "${options}" "${single_value_args}" "${multiple_value_args}" ${ARGN})
+
+ if(NOT PNNP_HEADER_TARGET)
+ message(SEND_ERROR "paludis_nnprocess(${input_file}) invoked without HEADER_TARGET option")
+ endif()
+ if(NOT PNNP_SOURCE_TARGET)
+ message(SEND_ERROR "paludis_nnprocess(${input_file}) invoked without SOURCE_TARGET option")
+ endif()
+
+ get_filename_component(input_file_basename "${input_file}" NAME)
+ get_filename_component(input_file_basename_we "${input_file}" NAME_WE)
+
+ set(output_header_file "${CMAKE_CURRENT_BINARY_DIR}/${input_file_basename_we}-nn.hh")
+ string(MD5 md5 "paludis-nnprocess-${output_header_file}")
+ set(header_target_name paludis-nnprocess-${md5}-${input_file_basename_we}-nn.hh)
+
+ add_custom_command(OUTPUT
+ ${output_header_file}
+ COMMAND
+ "${PROJECT_SOURCE_DIR}/misc/make_nn.bash" --header ${input_file} > ${output_header_file}
+ DEPENDS
+ "${PROJECT_SOURCE_DIR}/misc/make_nn.bash"
+ ${input_file})
+ add_custom_target(${header_target_name} DEPENDS ${output_header_file} COMMENT ${output_header_file})
+
+
+ set(output_source_file "${CMAKE_CURRENT_BINARY_DIR}/${input_file_basename_we}-nn.cc")
+ string(MD5 md5 "paludis-nnprocess-${output_source_file}")
+ set(source_target_name paludis-nnprocess-${md5}-${input_file_basename_we}-nn.cc)
+
+ add_custom_command(OUTPUT
+ ${output_source_file}
+ COMMAND
+ "${PROJECT_SOURCE_DIR}/misc/make_nn.bash" --source ${input_file} > ${output_source_file}
+ DEPENDS
+ "${PROJECT_SOURCE_DIR}/misc/make_nn.bash"
+ ${input_file})
+ add_custom_target(${source_target_name} DEPENDS ${output_source_file} COMMENT ${output_source_file})
+
+ set(${PNNP_HEADER_TARGET} ${header_target_name} PARENT_SCOPE)
+ if(PNNP_HEADER_FILE)
+ set(${PNNP_HEADER_FILE} ${output_header_file} PARENT_SCOPE)
+ endif()
+
+ set(${PNNP_SOURCE_TARGET} ${source_target_name} PARENT_SCOPE)
+ if(PNNP_SOURCE_FILE)
+ set(${PNNP_SOURCE_FILE} ${output_source_file} PARENT_SCOPE)
+ endif()
+endfunction()
+
diff --git a/cmake/modules/PaludisList.cmake b/cmake/modules/PaludisList.cmake
new file mode 100644
index 0000000..567ebeb
--- /dev/null
+++ b/cmake/modules/PaludisList.cmake
@@ -0,0 +1,24 @@
+
+function(list_replace input_list old new)
+ set(replaced_list)
+ foreach(item ${${input_list}})
+ if(${item} STREQUAL ${old})
+ list(APPEND replaced_list ${new})
+ else()
+ list(APPEND replaced_list ${item})
+ endif()
+ endforeach()
+ set("${input_list}" "${replaced_list}" PARENT_SCOPE)
+endfunction()
+
+function(list_union lhs rhs result_var_name)
+ set(result)
+ foreach(item IN LISTS lhs rhs)
+ list(FIND result "${item}" index)
+ if(${index} EQUAL -1)
+ list(APPEND result "${item}")
+ endif()
+ endforeach()
+ set("${result_var_name}" "${result}" PARENT_SCOPE)
+endfunction()
+
diff --git a/cmake/modules/PaludisPackage.cmake b/cmake/modules/PaludisPackage.cmake
new file mode 100644
index 0000000..ecbd54e
--- /dev/null
+++ b/cmake/modules/PaludisPackage.cmake
@@ -0,0 +1,34 @@
+
+set(CPACK_SET_DESTDIR TRUE)
+set(CPACK_SOURCE_GENERATOR "TBZ2")
+set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
+set(CPACK_PACKAGE_VERISON_MAJOR ${PROJECT_VERSION_MAJOR})
+set(CPACK_PACKAGE_VERISON_MINOR ${PROJECT_VERSION_MINOR})
+set(CPACK_PACKAGE_VERISON_PATCH ${PROJECT_VERSION_PATCH})
+set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${PROJECT_VERSION}")
+set(CPACK_SOURCE_IGNORE_FILES
+ "/build/"
+ "/.git/"
+ "\\\\.sw[opn]$"
+ ".*~"
+ "cscope.*"
+ # TODO(compnerd) remove this set when the autotools build system is removed
+ "/.gitignore"
+ "/.gitreview"
+ "/aclocal.m4"
+ "/autogen.bash"
+ "/autom4te.cache/"
+ "/autotools_prepare.bash"
+ "/config.h.in"
+ "/configure.ac"
+ "Makefile.am"
+ "Makefile.am.m4"
+ "Makefile.in"
+ "/misc/common-makefile.am"
+ "files.m4"
+ "${CPACK_SOURCE_IGNORE_FILES}")
+
+include(CPack)
+
+add_custom_target(dist COMMAND "${CMAKE_MAKE_PROGRAM}" package_source)
+
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
new file mode 100644
index 0000000..1d794d3
--- /dev/null
+++ b/doc/CMakeLists.txt
@@ -0,0 +1,151 @@
+
+include(CMakeParseArguments)
+
+function(paludis_cat destination)
+ set(options)
+ set(single_value_args)
+ set(multiple_value_args DEPENDS)
+
+ cmake_parse_arguments(PC "${options}" "${single_value_args}" "${multiple_value_args}" ${ARGN})
+
+ add_custom_command(OUTPUT
+ "${destination}"
+ COMMAND
+ "${CAT_EXECUTABLE}" ${PC_UNPARSED_ARGUMENTS} > ${destination}
+ DEPENDS
+ ${PC_UNPARSED_ARGUMENTS}
+ ${PC_DEPENDS})
+endfunction()
+
+function(paludis_sed)
+ set(options)
+ set(single_value_args INPUT OUTPUT)
+ set(multiple_value_args DEPENDS EXPRESSIONS)
+
+ cmake_parse_arguments(PS "${options}" "${single_value_args}" "${multiple_value_args}" ${ARGN})
+
+ set(sed_command ${SED_EXECUTABLE})
+ foreach(expression ${PS_EXPRESSIONS})
+ list(APPEND sed_command -e;"${expression}")
+ endforeach()
+
+ add_custom_command(OUTPUT
+ "${PS_OUTPUT}"
+ COMMAND
+ ${sed_command} < "${PS_INPUT}" > "${PS_OUTPUT}"
+ DEPENDS
+ ${PS_INPUT}
+ ${PS_DEPENDS})
+endfunction()
+
+function(paludis_generate_toplinks relative)
+ paludis_sed(INPUT
+ "${CMAKE_CURRENT_SOURCE_DIR}/${relative}/toplinks.html.part.in"
+ OUTPUT
+ "${CMAKE_CURRENT_BINARY_DIR}/toplinks.html.part"
+ EXPRESSIONS
+ "s,###TOPURI###,${relative}/,g")
+endfunction()
+function(paludis_generate_header relative)
+ paludis_sed(INPUT
+ "${CMAKE_CURRENT_SOURCE_DIR}/${relative}/header.html.part.in"
+ OUTPUT
+ "${CMAKE_CURRENT_BINARY_DIR}/header.html.part"
+ DEPENDS
+ "${CMAKE_CURRENT_BINARY_DIR}/toplinks.html.part"
+ EXPRESSIONS
+ "s,###TOPURI###,${relative}/,g"
+ "/###TOPLINKS###/r ${CMAKE_CURRENT_SOURCE_DIR}/toplinks.html.part"
+ "s,###TOPLINKS###,,g")
+endfunction()
+function(paludis_generate_footer relative)
+ paludis_sed(INPUT
+ "${CMAKE_CURRENT_SOURCE_DIR}/${relative}/footer.html.part.in"
+ OUTPUT
+ "${CMAKE_CURRENT_BINARY_DIR}/footer.html.part"
+ DEPENDS
+ "${CMAKE_CURRENT_BINARY_DIR}/toplinks.html.part"
+ EXPRESSIONS
+ "s,###TOPURI###,${relative}/,g")
+endfunction()
+function(paludis_generate_page page location)
+ paludis_cat("${CMAKE_CURRENT_BINARY_DIR}/${page}.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/header.html.part"
+ "${location}/${page}.html.part"
+ "${CMAKE_CURRENT_BINARY_DIR}/footer.html.part")
+endfunction()
+
+paludis_generate_toplinks(".")
+paludis_generate_header(".")
+paludis_generate_footer(".")
+
+paludis_sed(INPUT
+ "${CMAKE_CURRENT_SOURCE_DIR}/index.html.part.in"
+ OUTPUT
+ "${CMAKE_CURRENT_BINARY_DIR}/index.html.part"
+ EXPRESSIONS
+ "s,###PALUDIS_VERSION###,${PROJECT_VERSION},g")
+paludis_generate_page(index "${CMAKE_CURRENT_BINARY_DIR}")
+paludis_sed(INPUT
+ "${PROJECT_SOURCE_DIR}/NEWS"
+ OUTPUT
+ "${CMAKE_CURRENT_BINARY_DIR}/news.subst"
+ EXPRESSIONS
+ "s,&,\&amp\\\\\\;,g"
+ "s,<,\&lt\\\\\\;,g"
+ "s,>,\&gt\\\\\\;,g")
+paludis_sed(INPUT
+ "${CMAKE_CURRENT_SOURCE_DIR}/news.html.part.in"
+ OUTPUT
+ "${CMAKE_CURRENT_BINARY_DIR}/news.html.part"
+ DEPENDS
+ "${CMAKE_CURRENT_BINARY_DIR}/news.subst"
+ EXPRESSIONS
+ "/###NEWS###/r ${CMAKE_CURRENT_BINARY_DIR}/news.subst"
+ "s,###NEWS###,,")
+paludis_generate_page(news "${CMAKE_CURRENT_BINARY_DIR}")
+execute_process(COMMAND
+ "${GIT_EXECUTABLE}" --git-dir="${PROJECT_SOURCE_DIR}/.git" log
+ COMMAND
+ "${SED_EXECUTABLE}" -e "'s,&,\&amp;,g'"
+ -e "'s,<,\&lt;,g'"
+ -e "'s,>,\&gt;,g'"
+ -e "'s,\\([[:blank:][:punct:]]\\)\\?\\([0-9a-f]\\{40\\}\\)\\([[:blank:][:punct:]]\)\\?,\\1<a href=\"http://git.exherbo.org/paludis/paludis.git/commit/?id=\\2\">\\2</a>,g'"
+ -e "'s,ticket:\\([0-9]\\+\\),<a href=\"http://paludis.exherbo.org/trac/ticket/\\1\">ticket:\\1</a>,g'"
+ OUTPUT_FILE
+ "${CMAKE_CURRENT_BINARY_DIR}/changelog.subst"
+ ERROR_QUIET
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+paludis_sed(INPUT
+ "${CMAKE_CURRENT_SOURCE_DIR}/changelog.html.part.in"
+ OUTPUT
+ "${CMAKE_CURRENT_BINARY_DIR}/changelog.html.part"
+ DEPENDS
+ "${CMAKE_CURRENT_BINARY_DIR}/changelog.subst"
+ EXPRESSIONS
+ "/###CHANGELOG###/r ${CMAKE_CURRENT_BINARY_DIR}/changelog.subst"
+ "s,###CHANGELOG###,,")
+paludis_generate_page(changelog "${CMAKE_CURRENT_BINARY_DIR}")
+
+add_custom_target(html-docs
+ ALL
+ DEPENDS
+ "${CMAKE_CURRENT_BINARY_DIR}/index.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/news.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/changelog.html")
+
+add_subdirectory(api)
+add_subdirectory(clients)
+add_subdirectory(configuration)
+add_subdirectory(faq)
+add_subdirectory(overview)
+
+install(FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/index.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/news.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/changelog.html"
+ "${CMAKE_CURRENT_SOURCE_DIR}/paludis.css"
+ "${CMAKE_CURRENT_SOURCE_DIR}/paludis_270.png"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_HTMLDIR}")
+
diff --git a/doc/api/CMakeLists.txt b/doc/api/CMakeLists.txt
new file mode 100644
index 0000000..56486ca
--- /dev/null
+++ b/doc/api/CMakeLists.txt
@@ -0,0 +1,21 @@
+
+add_subdirectory(cplusplus)
+add_subdirectory(python)
+add_subdirectory(ruby)
+
+paludis_generate_toplinks("..")
+paludis_generate_header("..")
+paludis_generate_footer("..")
+
+paludis_generate_page(index "${CMAKE_CURRENT_SOURCE_DIR}")
+
+add_custom_target(api-html-docs
+ ALL
+ DEPENDS
+ "${CMAKE_CURRENT_BINARY_DIR}/index.html")
+
+install(FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/index.html"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_HTMLDIR}/api")
+
diff --git a/doc/api/cplusplus/CMakeLists.txt b/doc/api/cplusplus/CMakeLists.txt
new file mode 100644
index 0000000..c3df73e
--- /dev/null
+++ b/doc/api/cplusplus/CMakeLists.txt
@@ -0,0 +1,38 @@
+
+add_subdirectory(examples)
+
+set(DOXYGEN_TAG_FILE)
+if(ENABLE_DOXYGEN_TAGS)
+ set(DOXYGEN_TAG_FILE "${CMAKE_CURRENT_BINARY_DIR}/libstdc++.tag")
+ file(DOWNLOAD
+ "http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/libstdc++.tag"
+ "${DOXYGEN_TAG_FILE}")
+endif()
+
+if(ENABLE_DOXYGEN)
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/doxygen.conf.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/doxygen.conf"
+ @ONLY)
+
+ add_custom_command(COMMAND
+ "${DOXYGEN_EXECUTABLE}" "${CMAKE_CURRENT_BINARY_DIR}/doxygen.conf"
+ DEPENDS
+ "${CMAKE_CURRENT_BINARY_DIR}/doxygen.conf"
+ "${CMAKE_CURRENT_SOURCE_DIR}/groups.doxygen"
+ "${CMAKE_CURRENT_SOURCE_DIR}/main_page.doxygen"
+ "${CMAKE_CURRENT_SOURCE_DIR}/namespaces.doxygen"
+ "${CMAKE_CURRENT_SOURCE_DIR}/references.doxygen"
+ "${DOXYGEN_TAG_FILE}"
+ OUTPUT
+ "${CMAKE_CURRENT_BINARY_DIR}/cplusplus")
+ add_custom_target(c++-api-docs
+ ALL
+ DEPENDS
+ "${CMAKE_CURRENT_BINARY_DIR}/cplusplus")
+
+ install(DIRECTORY
+ "${CMAKE_CURRENT_BINARY_DIR}/cplusplus"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_HTMLDIR}/api")
+endif()
+
diff --git a/doc/api/cplusplus/examples/CMakeLists.txt b/doc/api/cplusplus/examples/CMakeLists.txt
new file mode 100644
index 0000000..11bbb34
--- /dev/null
+++ b/doc/api/cplusplus/examples/CMakeLists.txt
@@ -0,0 +1,46 @@
+
+# TODO(compnerd) populate PROJECT_VERSION_TWEAK and PALUDIS_GIT_HEAD
+add_definitions(-DPALUDIS_PACKAGE="${PROJECT_NAME}"
+ -DPALUDIS_VERSION_MAJOR=${PROJECT_VERSION_MAJOR}
+ -DPALUDIS_VERSION_MINOR=${PROJECT_VERSION_MINOR}
+ -DPALUDIS_VERSION_MICRO=${PROJECT_VERSION_PATCH}
+ -DPALUDIS_VERSION_SUFFIX=""
+ -DPALUDIS_GIT_HEAD="")
+
+paludis_add_library(libpaludisexamples
+ STATIC_LIBRARY
+ "${CMAKE_CURRENT_SOURCE_DIR}/example_command_line.cc")
+target_link_libraries(libpaludisexamples
+ INTERFACE
+ libpaludisargs)
+
+function(add_example example)
+ add_executable(example_${example}
+ "${CMAKE_CURRENT_SOURCE_DIR}/example_${example}.cc")
+ target_link_libraries(example_${example}
+ PRIVATE
+ libpaludisexamples
+ libpaludis
+ libpaludisutil)
+endfunction()
+
+foreach(example
+ about
+ action
+ contents
+ dep_label
+ dep_spec
+ dep_spec_flattener
+ environment
+ package_id
+ mask
+ metadata_key
+ repository
+ match_package
+ selection
+ version_operator
+ version_spec
+ name)
+ add_example(${example})
+endforeach()
+
diff --git a/doc/api/python/CMakeLists.txt b/doc/api/python/CMakeLists.txt
new file mode 100644
index 0000000..ea127ff
--- /dev/null
+++ b/doc/api/python/CMakeLists.txt
@@ -0,0 +1,38 @@
+
+if(ENABLE_PYTHON_DOCS)
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/conf.py"
+ @ONLY)
+
+ set(PYTHON_EXAMPLES
+ "${CMAKE_CURRENT_SOURCE_DIR}/example_about.py"
+ "${CMAKE_CURRENT_SOURCE_DIR}/example_command_line.py"
+ "${CMAKE_CURRENT_SOURCE_DIR}/example_version_spec.py")
+
+ set(RST_DOCS
+ "${CMAKE_CURRENT_SOURCE_DIR}/example_about.rst"
+ "${CMAKE_CURRENT_SOURCE_DIR}/example_command_line.rst"
+ "${CMAKE_CURRENT_SOURCE_DIR}/example_version_spec.rst"
+ "${CMAKE_CURRENT_SOURCE_DIR}/index.rst"
+ "${CMAKE_CURRENT_SOURCE_DIR}/paludis.rst")
+
+ add_custom_command(COMMAND
+ env PYTHONPATH="${CMAKE_BINARY_DIR}/python" "${SPHINX_EXECUTABLE}" -c "${CMAKE_CURRENT_BINARY_DIR}" -b html -d "${CMAKE_CURRENT_BINARY_DIR}/doctrees" "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/python"
+ OUTPUT
+ "${CMAKE_CURRENT_BINARY_DIR}/python"
+ DEPENDS
+ "${CMAKE_CURRENT_BINARY_DIR}/conf.py"
+ paludis
+ ${PYTHON_EXAMPLES}
+ ${RST_DOCS})
+ add_custom_target(python-api-docs
+ ALL
+ DEPENDS
+ "${CMAKE_CURRENT_BINARY_DIR}/python")
+
+ install(DIRECTORY
+ "${CMAKE_CURRENT_BINARY_DIR}/python"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_HTMLDIR}/api")
+endif()
+
diff --git a/doc/api/ruby/CMakeLists.txt b/doc/api/ruby/CMakeLists.txt
new file mode 100644
index 0000000..0d06a7a
--- /dev/null
+++ b/doc/api/ruby/CMakeLists.txt
@@ -0,0 +1,36 @@
+
+if(ENABLE_RUBY_DOCS)
+ set(RUBY_EXAMPLES
+ example_about.rb
+ example_action.rb
+ example_command_line.rb
+ example_contents.rb
+ example_dep_tree.rb
+ example_environment.rb
+ example_package_id.rb
+ example_mask.rb
+ example_match_package.rb
+ example_repository.rb
+ example_selection.rb
+ example_version_operator.rb
+ example_version_spec.rb)
+
+ add_custom_command(COMMAND
+ env TOP_SRCDIR="${CMAKE_SOURCE_DIR}" "${RUBY_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/create_ruby_doc.rb" -t "Paludis Ruby API" -m Paludis --op "${CMAKE_CURRENT_BINARY_DIR}/ruby" "${CMAKE_SOURCE_DIR}/ruby/*.cc"
+ COMMAND
+ "${RUBY_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/create_ruby_examples.rb" "${CMAKE_CURRENT_SOURCE_DIR}" ${RUBY_EXAMPLES}
+ COMMAND
+ "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/ruby_syntax.css" "${CMAKE_CURRENT_BINARY_DIR}/ruby"
+ OUTPUT
+ "${CMAKE_CURRENT_BINARY_DIR}/ruby")
+ add_custom_target(ruby-docs
+ ALL
+ DEPENDS
+ "${CMAKE_CURRENT_BINARY_DIR}/ruby")
+
+ install(DIRECTORY
+ "${CMAKE_CURRENT_BINARY_DIR}/ruby"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_HTMLDIR}/api")
+endif()
+
diff --git a/doc/clients/CMakeLists.txt b/doc/clients/CMakeLists.txt
new file mode 100644
index 0000000..29cf938
--- /dev/null
+++ b/doc/clients/CMakeLists.txt
@@ -0,0 +1,133 @@
+
+paludis_generate_toplinks("..")
+paludis_generate_header("..")
+paludis_generate_footer("..")
+
+if(cave IN_LIST PALUDIS_CLIENTS)
+ set(ENABLE_CAVE_CLIENT FALSE)
+else()
+ set(ENABLE_CAVE_CLIENT TRUE)
+endif()
+
+function(paludis_generate_cave_command_html_doc subcommand)
+ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/cave-${subcommand}.html.part"
+ "<h1>${subcommand}</h1>\n")
+ if(NOT ENABLE_CAVE_CLIENT)
+ file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/cave-${subcommand}.html.part"
+ "<p>Sorry, documentation was generated without support for the cave client.</p>\n")
+ endif()
+ paludis_cat("${CMAKE_CURRENT_BINARY_DIR}/cave-${subcommand}.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/header.html.part"
+ "${CMAKE_CURRENT_BINARY_DIR}/cave-${subcommand}.html.part"
+ "${CMAKE_BINARY_DIR}/src/clients/cave/cave-${subcommand}.html-man-fragment"
+ "${CMAKE_CURRENT_BINARY_DIR}/footer.html.part")
+endfunction()
+
+paludis_generate_page(index "${CMAKE_CURRENT_SOURCE_DIR}")
+
+set(CAVE_SUBCOMMANDS
+ config
+ contents
+ digest
+ display-resolution
+ dump-cave-formats-conf
+ executables
+ execute-resolution
+ find-candidates
+ fix-cache
+ fix-linkage
+ generate-metadata
+ graph-jobs
+ has-version
+ help
+ import
+ info
+ manage-search-index
+ match
+ mirror
+ owner
+ perform
+ print-best-version
+ print-categories
+ print-checksum
+ print-checksum-algorithms
+ print-commands
+ print-dependent-ids
+ print-environment-metadata
+ print-id-actions
+ print-id-contents
+ print-id-environment-variable
+ print-id-executables
+ print-id-masks
+ print-id-metadata
+ print-id-size
+ print-ids
+ print-owners
+ print-packages
+ print-repositories
+ print-repository-formats
+ print-repository-metadata
+ print-resolution-required-confirmations
+ print-set
+ print-sets
+ print-spec
+ print-sync-protocols
+ print-unmanaged-files
+ print-unused-distfiles
+ purge
+ report
+ resolve
+ resume
+ search
+ show
+ size
+ sync
+ sync-protocol-options
+ uninstall
+ update-world
+ verify)
+
+set(cave_documentation)
+
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/cave.html.head" "<h1>cave</h1>\n")
+if(NOT ENABLE_CAVE_CLIENT)
+ file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/cave.html.head"
+ "<p>Sorry, documentation was generated without support for the cave client.</p>\n")
+endif()
+paludis_cat("${CMAKE_CURRENT_BINARY_DIR}/cave.html.part.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/cave.html.head"
+ "${CMAKE_BINARY_DIR}/src/clients/cave/cave.html-man-fragment"
+ DEPENDS
+ cave-html-man-fragments)
+paludis_sed(INPUT
+ "${CMAKE_CURRENT_BINARY_DIR}/cave.html.part.in"
+ OUTPUT
+ "${CMAKE_CURRENT_BINARY_DIR}/cave.html.part"
+ EXPRESSIONS
+ "/<h2>SEE ALSO<.h2>/,/<.div>/s#<span class=\"strong\"><strong>\\(.*\\)</strong></span>(1)#<a href=\"\\1.html\">\\1</a>#"
+ "/<h2>CORE COMMANDS<.h2>/,/<h2>ENVIRONMENT<.h2>/s,^\\([a-z-]\\+\\)$$,<a href=\"cave-\\1.html\">\\1</a>,")
+paludis_cat("${CMAKE_CURRENT_BINARY_DIR}/cave.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/header.html.part"
+ "${CMAKE_CURRENT_BINARY_DIR}/cave.html.part"
+ "${CMAKE_CURRENT_BINARY_DIR}/footer.html.part")
+list(APPEND cave_documentation "${CMAKE_CURRENT_BINARY_DIR}/cave.html")
+foreach(subcommand ${CAVE_SUBCOMMANDS})
+ paludis_generate_cave_command_html_doc(${subcommand})
+ list(APPEND cave_documentation "${CMAKE_CURRENT_BINARY_DIR}/cave-${subcommand}.html")
+endforeach()
+
+add_custom_target(client-html-docs
+ ALL
+ DEPENDS
+ "${CMAKE_CURRENT_BINARY_DIR}/index.html"
+ ${cave_documentation})
+if(ENABLE_CAVE_CLIENT)
+ add_dependencies(client-html-docs cave-html-man-fragments)
+endif()
+
+install(FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/index.html"
+ ${cave_documentation}
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_HTMLDIR}/clients")
+
diff --git a/doc/configuration/CMakeLists.txt b/doc/configuration/CMakeLists.txt
new file mode 100644
index 0000000..b6d140f
--- /dev/null
+++ b/doc/configuration/CMakeLists.txt
@@ -0,0 +1,130 @@
+
+add_subdirectory(repositories)
+
+file(GLOB syncers
+ LIST_DIRECTORIES FALSE
+ "${CMAKE_SOURCE_DIR}/paludis/syncers/do*"
+ "${CMAKE_BINARY_DIR}/paludis/syncers/do*")
+list(SORT syncers)
+foreach(syncer ${syncers})
+ get_filename_component(syncer ${syncer} NAME)
+ if(NOT ${syncer} MATCHES ".in")
+ string(REPLACE "do" "" syncer ${syncer})
+ file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/synclist" "<strong>${syncer}</strong>\n")
+ endif()
+endforeach()
+
+file(GLOB fetchers
+ LIST_DIRECTORIES FALSE
+ "${CMAKE_SOURCE_DIR}/paludis/fetchers/do*"
+ "${CMAKE_BINARY_DIR}/paludis/fetchers/do*")
+list(SORT fetchers)
+foreach(fetcher ${fetchers})
+ get_filename_component(fetcher ${fetcher} NAME)
+ if(NOT ${fetcher} MATCHES ".in")
+ string(REPLACE "do" "" fetcher ${fetcher})
+ file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/fetchlist" "<li>${fetcher}</li>\n")
+ endif()
+endforeach()
+
+paludis_generate_toplinks("..")
+paludis_generate_header("..")
+paludis_generate_footer("..")
+
+paludis_sed(INPUT
+ "${CMAKE_CURRENT_SOURCE_DIR}/fetchers.html.part.in"
+ OUTPUT
+ "${CMAKE_CURRENT_BINARY_DIR}/fetchers.html.part"
+ DEPENDS
+ "${CMAKE_CURRENT_BINARY_DIR}/fetchlist"
+ EXPRESSIONS
+ "/###FETCHERS###/r ${CMAKE_CURRENT_BINARY_DIR}/fetchlist")
+paludis_generate_page(fetchers "${CMAKE_CURRENT_BINARY_DIR}")
+
+paludis_sed(INPUT
+ "${CMAKE_CURRENT_SOURCE_DIR}/syncers.html.part.in"
+ OUTPUT
+ "${CMAKE_CURRENT_BINARY_DIR}/syncers.html.part"
+ DEPENDS
+ "${CMAKE_CURRENT_BINARY_DIR}/synclist"
+ EXPRESSIONS
+ "/###SYNCERS###/r ${CMAKE_CURRENT_BINARY_DIR}/synclist")
+paludis_generate_page(syncers "${CMAKE_CURRENT_BINARY_DIR}")
+
+foreach(page
+ bashrc
+ general
+ keywords
+ licenses
+ mirrors
+ output
+ packagemask
+ sets
+ specpath
+ suggestions
+ use)
+ paludis_sed(INPUT
+ "${CMAKE_CURRENT_SOURCE_DIR}/${page}.html.part.in"
+ OUTPUT
+ "${CMAKE_CURRENT_BINARY_DIR}/${page}.html.part"
+ DEPENDS
+ "${CMAKE_CURRENT_SOURCE_DIR}/paludisenvironmentonly.html.part"
+ EXPRESSIONS
+ "/###PALUDISENVIRONMENTONLY###/r ${CMAKE_CURRENT_SOURCE_DIR}/paludisenvironmentonly.html.part"
+ "s,###PALUDISENVIRONMENTONLY####,,g")
+ paludis_generate_page(${page} "${CMAKE_CURRENT_BINARY_DIR}")
+endforeach()
+
+foreach(page
+ configfiles
+ envvars
+ hooks
+ index
+ specs)
+ paludis_generate_page(${page} "${CMAKE_CURRENT_SOURCE_DIR}")
+endforeach()
+
+add_custom_target(configuration-html-docs
+ ALL
+ DEPENDS
+ "${CMAKE_CURRENT_BINARY_DIR}/bashrc.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/configfiles.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/envvars.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/fetchers.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/general.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/hooks.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/index.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/keywords.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/licenses.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/mirrors.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/output.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/packagemask.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/sets.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/specpath.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/specs.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/suggestions.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/syncers.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/use.html")
+
+install(FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/bashrc.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/configfiles.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/envvars.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/fetchers.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/general.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/hooks.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/index.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/keywords.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/licenses.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/mirrors.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/output.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/packagemask.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/sets.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/specpath.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/specs.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/suggestions.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/syncers.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/use.html"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_HTMLDIR}/configuration")
+
diff --git a/doc/configuration/repositories/CMakeLists.txt b/doc/configuration/repositories/CMakeLists.txt
new file mode 100644
index 0000000..eb513a4
--- /dev/null
+++ b/doc/configuration/repositories/CMakeLists.txt
@@ -0,0 +1,47 @@
+
+paludis_generate_toplinks("../..")
+paludis_generate_header("../..")
+paludis_generate_footer("../..")
+
+foreach(page
+ accounts
+ e
+ exndbam
+ index
+ installed_accounts
+ installed_unpackaged
+ repository
+ unavailable
+ unwritten
+ vdb)
+ paludis_generate_page(${page} "${CMAKE_CURRENT_SOURCE_DIR}")
+endforeach()
+
+add_custom_target(configuration-repositories-html-docs
+ ALL
+ DEPENDS
+ "${CMAKE_CURRENT_BINARY_DIR}/accounts.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/e.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/exndbam.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/index.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/installed_accounts.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/installed_unpackaged.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/repository.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/unavailable.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/unwritten.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/vdb.html")
+
+install(FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/accounts.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/e.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/exndbam.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/index.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/installed_accounts.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/installed_unpackaged.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/repository.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/unavailable.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/unwritten.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/vdb.html"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_HTMLDIR}/configuration/repositories")
+
diff --git a/doc/faq/CMakeLists.txt b/doc/faq/CMakeLists.txt
new file mode 100644
index 0000000..846bebd
--- /dev/null
+++ b/doc/faq/CMakeLists.txt
@@ -0,0 +1,44 @@
+
+paludis_generate_toplinks("..")
+paludis_generate_header("..")
+paludis_generate_footer("..")
+
+foreach(page
+ different
+ general
+ index
+ howdoi
+ misfunctionality
+ operation
+ repositories
+ stricter
+ upgrades)
+ paludis_generate_page(${page} "${CMAKE_CURRENT_SOURCE_DIR}")
+endforeach()
+
+add_custom_target(faq-html-docs
+ ALL
+ DEPENDS
+ "${CMAKE_CURRENT_BINARY_DIR}/different.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/general.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/index.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/howdoi.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/misfunctionality.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/operation.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/repositories.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/stricter.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/upgrades.html")
+
+install(FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/different.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/general.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/index.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/howdoi.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/misfunctionality.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/operation.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/repositories.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/stricter.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/upgrades.html"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_HTMLDIR}/faq")
+
diff --git a/doc/overview/CMakeLists.txt b/doc/overview/CMakeLists.txt
new file mode 100644
index 0000000..41f4cf3
--- /dev/null
+++ b/doc/overview/CMakeLists.txt
@@ -0,0 +1,32 @@
+
+paludis_generate_toplinks("..")
+paludis_generate_header("..")
+paludis_generate_footer("..")
+
+foreach(page
+ contact
+ features
+ gettingstarted
+ index
+ pbins)
+ paludis_generate_page(${page} "${CMAKE_CURRENT_SOURCE_DIR}")
+endforeach()
+
+add_custom_target(overview-html-docs
+ ALL
+ DEPENDS
+ "${CMAKE_CURRENT_BINARY_DIR}/contact.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/features.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/gettingstarted.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/index.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/pbins.html")
+
+install(FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/contact.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/features.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/gettingstarted.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/index.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/pbins.html"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_HTMLDIR}/overview")
+
diff --git a/hooks/CMakeLists.txt b/hooks/CMakeLists.txt
new file mode 100644
index 0000000..8879a5a
--- /dev/null
+++ b/hooks/CMakeLists.txt
@@ -0,0 +1,36 @@
+
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/eselect_env_update.bash.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/eselect_env_update.bash"
+ @ONLY)
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/news.hook.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/news.hook"
+ @ONLY)
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake_install.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_install-hooks.cmake"
+ @ONLY)
+
+#paludis_add_test(eselect_env_update BASH
+# TEST_RUNNER "${CMAKE_CURRENT_SOURCE_DIR}/run_test.bash")
+#paludis_add_test(news BASH
+# TEST_RUNNER "${CMAKE_CURRENT_SOURCE_DIR}/run_test.bash")
+
+install(FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/gnu_info_index.bash"
+ "${CMAKE_CURRENT_BINARY_DIR}/eselect_env_update.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/log.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/installable_cache_regen.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/installed_cache_regen.bash"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/common")
+install(FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/news.hook"
+ "${CMAKE_CURRENT_SOURCE_DIR}/find_config_updates.hook"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/auto")
+install(FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/update_config_protect_list.bash"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/install_post")
+
+install(SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/cmake_install-hooks.cmake")
+
diff --git a/hooks/cmake_install.cmake.in b/hooks/cmake_install.cmake.in
new file mode 100644
index 0000000..2c392bf
--- /dev/null
+++ b/hooks/cmake_install.cmake.in
@@ -0,0 +1,260 @@
+
+include(GNUInstallDirs)
+
+foreach(hook
+ auto
+ install_pre
+ install_fail
+ install_post
+ install_all_pre
+ install_all_post
+ install_pretend_pre
+ install_pretend_post
+ install_pretend_display_item_pre
+ install_pretend_display_item_post
+ install_task_execute_pre
+ install_task_execute_post
+ clean_all_post
+ clean_all_pre
+ clean_fail
+ clean_post
+ clean_pre
+ uninstall_pre
+ uninstall_fail
+ uninstall_post
+ uninstall_all_pre
+ uninstall_all_post
+ sync_pre
+ sync_fail
+ sync_post
+ syn_all_pre
+ sync_all_post
+ fetch_pre
+ fetch_post
+ fetch_all_pre
+ fetch_all_post)
+ execute_process(COMMAND
+ "${CMAKE_COMMAND}" -E touch "$ENV{DESTDIR}${CMAKE_INSTALL_FULL_DATADIR}/paludis/hooks/${hook}/.keep")
+ execute_process(COMMAND
+ "${CMAKE_COMMAND}" -E touch "$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBDIR}/paludis/hooks/${hook}/.keep")
+endforeach()
+foreach(phase
+ ebuild_metadata_pre
+ ebuild_metadata_fail
+ ebuild_metadata_post
+ ebuild_variable_pre
+ ebuild_variable_fail
+ ebuild_variable_post
+ ebuild_init_pre
+ ebuild_init_fail
+ ebuild_init_post
+ ebuild_initmisc_pre
+ ebuild_initmisc_fail
+ ebuild_initmisc_post
+ ebuild_fetch_extra_pre
+ ebuild_fetch_extra_fail
+ ebuild_fetch_extra_post
+ ebuild_tidyup_pre
+ ebuild_tidyup_fail
+ ebuild_tidyup_post
+ ebuild_unpack_pre
+ ebuild_unpack_fail
+ ebuild_unpack_post
+ ebuild_prepare_pre
+ ebuild_prepare_fail
+ ebuild_prepare_post
+ ebuild_configure_pre
+ ebuild_configure_fail
+ ebuild_configure_post
+ ebuild_compile_pre
+ ebuild_compile_fail
+ ebuild_compile_post
+ ebuild_install_pre
+ ebuild_install_fail
+ ebuild_install_post
+ ebuild_test_pre
+ ebuild_test_fail
+ ebuild_test_post
+ ebuild_test_expensive_pre
+ ebuild_test_expensive_fail
+ ebuild_test_expensive_post
+ ebuild_pretend_pre
+ ebuild_pretend_fail
+ ebuild_pretend_post
+ ebuild_bad_options_pre
+ ebuild_bad_options_fail
+ ebuild_bad_options_post
+ ebuild_bad_required_use_pre
+ ebuild_bad_required_use_fail
+ ebuild_bad_required_use_post
+ ebuild_setup_pre
+ ebuild_setup_fail
+ ebuild_setup_post
+ ebuild_config_pre
+ ebuild_config_fail
+ ebuild_config_post
+ ebuild_nofetch_pre
+ ebuild_nofetch_fail
+ ebuild_nofetch_post
+ ebuild_preinst_pre
+ ebuild_preinst_fail
+ ebuild_preinst_post
+ ebuild_postinst_pre
+ ebuild_postinst_fail
+ ebuild_postinst_post
+ ebuild_prerm_pre
+ ebuild_prerm_fail
+ ebuild_prerm_post
+ ebuild_postrm_pre
+ ebuild_postrm_fail
+ ebuild_postrm_post
+ ebuild_info_pre
+ ebuild_info_fail
+ ebuild_info_post
+ ebuild_infovars_pre
+ ebuild_infovars_fail
+ ebuild_infovars_post
+ ebuild_pivotbin_pre
+ ebuild_pivotbin_fail
+ ebuild_pivotbin_post
+ ebuild_installbin_pre
+ ebuild_installbin_fail
+ ebuild_installbin_post
+ ebuild_saveenv_pre
+ ebuild_saveenv_fail
+ ebuild_saveenv_post
+ ebuild_loadenv_pre
+ ebuild_loadenv_fail
+ ebuild_loadenv_post
+ ebuild_killold_pre
+ ebuild_killold_fail
+ ebuild_killold_post)
+ execute_process(COMMAND
+ "${CMAKE_COMMAND}" -E touch "$ENV{DESTDIR}${CMAKE_INSTALL_FULL_DATADIR}/paludis/hooks/${hook}/.keep")
+ execute_process(COMMAND
+ "${CMAKE_COMMAND}" -E touch "$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBDIR}/paludis/hooks/${hook}/.keep")
+endforeach()
+foreach(level einfo;ewarn;eerror;elog)
+ execute_process(COMMAND
+ "${CMAKE_COMMAND}" -E touch "$ENV{DESTDIR}${CMAKE_INSTALL_FULL_DATADIR}/paludis/hooks/${level}/.keep")
+ execute_process(COMMAND
+ "${CMAKE_COMMAND}" -E touch "$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBDIR}/paludis/hooks/${level}/.keep")
+endforeach()
+foreach(phase
+ auto
+ install_pre
+ install_post
+ install_all_pre
+ install_all_post
+ install_pretend_pre
+ install_pretend_post
+ uninstall_pre
+ uninstall_post
+ uninstall_all_pre
+ uninstall_all_post
+ sync_pre
+ sync_post
+ sync_all_pre
+ sync_all_post
+ fetch_all_pre
+ fetch_all_post
+ fetch_all_all_pre
+ fetch_all_all_post)
+ execute_process(COMMAND
+ "${CMAKE_COMMAND}" -E touch "$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/${phase}/.keep")
+endforeach()
+foreach(phase
+ merger_unlink_file_pre
+ merger_unlink_file_post
+ merger_unlink_dir_pre
+ merger_unlink_dir_post
+ merger_unlink_sym_pre
+ merger_unlink_sym_post
+ merger_unlink_misc_pre
+ merger_unlink_misc_post
+ merger_install_pre
+ merger_install_post
+ merger_install_file_pre
+ merger_install_file_post
+ merger_install_sym_pre
+ merger_install_sym_post
+ merger_install_dir_pre
+ merger_install_dir_post
+ merger_check_pre
+ merger_check_post
+ merger_check_file_pre
+ merger_check_file_post
+ merger_check_sym_pre
+ merger_check_sym_post
+ merger_check_dir_pre
+ merger_check_dir_post
+ unmerger_unlink_pre
+ unmerger_unlink_post
+ unmerger_unlink_file_pre
+ unmerger_unlink_file_post
+ unmerger_unlink_dir_pre
+ unmerger_unlink_dir_post
+ unmerger_unlink_sym_pre
+ unmerger_unlink_sym_post
+ unmerger_unlink_misc_pre
+ unmerger_unlink_misc_post)
+ execute_process(COMMAND
+ "${CMAKE_COMMAND}" -E touch "$ENV{DESTDIR}${CMAKE_INSTALL_FULL_DATADIR}/paludis/hooks/${phase}/.keep")
+ execute_process(COMMAND
+ "${CMAKE_COMMAND}" -E touch "$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBDIR}/paludis/hooks/${phase}/.keep")
+endforeach()
+execute_process(COMMAND
+ "${CMAKE_COMMAND}" -E touch "$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/gentoo/news/.keep")
+foreach(directory
+ clean_all_pre
+ clean_all_post
+ clean_pre
+ clean_post
+ uninstall_all_pre
+ uninstall_all_post
+ uninstall_pre
+ uninstall_post
+ install_pre
+ install_post
+ install_all_pre
+ install_all_post
+ install_pretend_pre
+ install_pretend_post
+ sync_pre
+ sync_post
+ sync_all_pre
+ sync_all_post
+ fetch_all_pre
+ fetch_all_post
+ fetch_pre
+ fetch_post)
+ execute_process(COMMAND
+ "${CMAKE_COMMAND}" -E make_directory "$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/${directory}")
+endforeach()
+execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/common/eselect_env_update.bash" "$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/install_all_post/eselect_env_update.bash")
+execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/common/eselect_env_update.bash" "$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/uninstall_all_post/eselect_env_update.bash")
+execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/common/gnu_info_index.bash" "$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/install_all_post/gnu_info_index.bash")
+execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/common/gnu_info_index.bash" "$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/uninstall_all_post/gnu_info_index.bash")
+execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/common/log.bash" "$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/install_all_pre/log.bash")
+execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/common/log.bash" "$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/install_all_post/log.bash")
+execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/common/log.bash" "$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/install_pre/log.bash")
+execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/common/log.bash" "$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/install_post/log.bash")
+execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/common/log.bash" "$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/fetch_all_pre/log.bash")
+execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/common/log.bash" "$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/fetch_all_post/log.bash")
+execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/common/log.bash" "$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/fetch_pre/log.bash")
+execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/common/log.bash" "$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/fetch_post/log.bash")
+execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/common/log.bash" "$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/clean_all_pre/log.bash")
+execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/common/log.bash" "$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/clean_all_post/log.bash")
+execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/common/log.bash" "$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/clean_pre/log.bash")
+execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/common/log.bash" "$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/clean_post/log.bash")
+execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/common/log.bash" "$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/uninstall_all_pre/log.bash")
+execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/common/log.bash" "$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/uninstall_all_post/log.bash")
+execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/common/log.bash" "$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/uninstall_pre/log.bash")
+execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/common/log.bash" "$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/uninstall_post/log.bash")
+execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/common/log.bash" "$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/sync_pre/log.bash")
+execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/common/log.bash" "$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/sync_post/log.bash")
+execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/common/installable_cache_regen.bash" "$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/sync_all_post/installable_cache_regen.bash")
+execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/common/installed_cache_regen.bash" "$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/install_post/installed_cache_regen.bash")
+execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/common/installed_cache_regen.bash" "$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/uninstall_post/installed_cache_regen.bash")
+execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/common/installed_cache_regen.bash" "$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/hooks/clean_post/installed_cache_regen.bash")
+
diff --git a/misc/CMakeLists.txt b/misc/CMakeLists.txt
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/misc/CMakeLists.txt
@@ -0,0 +1 @@
+
diff --git a/paludis/CMakeLists.txt b/paludis/CMakeLists.txt
new file mode 100644
index 0000000..132cb8c
--- /dev/null
+++ b/paludis/CMakeLists.txt
@@ -0,0 +1,423 @@
+
+if(ENABLE_PBINS)
+ add_definitions(-DENABLE_PBINS)
+endif()
+if(ENABLE_PYTHON)
+ add_definitions(-DENABLE_PYTHON_HOOKS)
+endif()
+if(ENABLE_STRIPPER)
+ add_definitions(-DENABLE_STRIPPER)
+endif()
+
+# TODO(compnerd) remove these when we adjust hooker.cc
+add_definitions(-DPALUDIS_VERSION_MAJOR=${PROJECT_VERSION_MAJOR}
+ -DPALUDIS_VERSION_MINOR=${PROJECT_VERSION_MINOR})
+
+add_subdirectory(distributions)
+add_subdirectory(fetchers)
+add_subdirectory(syncers)
+add_subdirectory(util)
+add_subdirectory(selinux)
+add_subdirectory(repositories)
+add_subdirectory(environments)
+
+# TODO(compnerd) remove these when we no longer need to support the autotools
+# build and can change about.hh.in to use the variable names that are used in
+# CMake
+set(VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
+set(VERSION_MINOR ${PROJECT_VERSION_MINOR})
+set(VERSION_MICRO ${PROJECT_VERSION_PATCH})
+set(PALUDIS_PC_SLOT ${PALUDIS_PKG_CONFIG_SLOT})
+# TODO(compnerd) VERSION_SUFFIX
+# TODO(compnerd) GIT_HEAD
+set(PACKAGE ${PROJECT_NAME})
+set(CXXFLAGS ${CMAKE_CXX_FLAGS})
+list_union("${CMAKE_EXE_LINKER_FLAGS}" "${CMAKE_SHARED_LINKER_FLAGS}" LDFLAGS)
+string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
+set(CXX ${CMAKE_CXX_COMPILER})
+execute_process(COMMAND
+ whoami
+ OUTPUT_VARIABLE
+ BUILDUSER
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+execute_process(COMMAND
+ hostname
+ OUTPUT_VARIABLE
+ BUILDHOST
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+execute_process(COMMAND
+ date +%&-%m-%dT%H:%M:%S%z
+ OUTPUT_VARIABLE
+ BUILDDATE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/about.hh.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/about.hh"
+ @ONLY)
+
+paludis_m4process(${CMAKE_CURRENT_SOURCE_DIR}/paludis.hh.m4
+ paludis_hh_TARGET)
+paludis_m4process(${CMAKE_CURRENT_SOURCE_DIR}/comparision_policy.hh.m4
+ comparision_policy_hh_TARGET)
+
+set(environment_object_libraries)
+foreach(environment ${PALUDIS_ALL_ENVIRONMENTS})
+ string(TOUPPER ${environment} uc_environment)
+ if(ENABLE_${uc_environment}_ENVIRONMENT)
+ list(APPEND environment_object_libraries libpaludis${environment}environment)
+ endif()
+endforeach()
+
+set(repository_object_libraries)
+foreach(repository ${PALUDIS_ALL_REPOSITORIES})
+ string(TOUPPER ${repository} repository_uppercase)
+ if(ENABLE_${repository_uppercase}_REPOSITORY)
+ list(APPEND repository_object_libraries libpaludis${repository}repository)
+ endif()
+endforeach()
+
+paludis_add_library(libpaludis
+ "${CMAKE_CURRENT_SOURCE_DIR}/about_metadata.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/action.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/action_names.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/additional_package_dep_spec_requirement.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/always_enabled_dependency_label.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/broken_linkage_configuration.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/broken_linkage_finder.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/buffer_output_manager.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/call_pretty_printer.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/changed_choices.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/choice.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/comma_separated_dep_parser.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/comma_separated_dep_pretty_printer.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/command_output_manager.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/common_sets.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/contents.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/create_output_manager_info.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/dep_label.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/dep_spec.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/dep_spec_annotations.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/dep_spec_data.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/dep_spec_flattener.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/distribution.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/elf_linkage_checker.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/elike_blocker.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/elike_choices.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/elike_dep_parser.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/elike_conditional_dep_spec.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/elike_package_dep_spec.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/elike_slot_requirement.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/elike_use_requirement.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/environment.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/environment_factory.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/environment_implementation.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/file_output_manager.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/filter.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/filter_handler.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/filtered_generator.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/format_messages_output_manager.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/formatted_pretty_printer.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/forward_at_finish_output_manager.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/fs_merger.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/fuzzy_finder.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/generator.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/generator_handler.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/hook.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/hooker.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/ipc_output_manager.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/libtool_linkage_checker.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/linkage_checker.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/literal_metadata_key.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/maintainer.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/mask.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/mask_utils.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/match_package.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/merger.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/merger_entry_type.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/metadata_key.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/metadata_key_holder.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/name.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/ndbam.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/ndbam_merger.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/ndbam_unmerger.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/notifier_callback.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/output_manager.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/output_manager_factory.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/output_manager_from_environment.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/package_dep_spec_collection.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/package_dep_spec_properties.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/package_id.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/paludislike_options_conf.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/partially_made_package_dep_spec.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/partitioning.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/permitted_choice_value_parameter_values.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pretty_print_options.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pretty_printer.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/repository.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/repository_factory.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/repository_name_cache.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/selection.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/selection_handler.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/serialise.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/set_file.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/slot.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/slot_requirement.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/spec_tree.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/standard_output_manager.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/stripper.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/syncer.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/tar_merger.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/tee_output_manager.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/unchoices_key.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/unformatted_pretty_printer.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/unmerger.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/user_dep_spec.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/version_operator.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/version_requirements.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/version_spec.cc"
+ INCORPORATE_OBJECT_LIBRARIES
+ ${repository_object_libraries}
+ ${environment_object_libraries}
+ SE_SOURCES
+ "${CMAKE_CURRENT_SOURCE_DIR}/action.se"
+ "${CMAKE_CURRENT_SOURCE_DIR}/choice.se"
+ "${CMAKE_CURRENT_SOURCE_DIR}/create_output_manager_info.se"
+ "${CMAKE_CURRENT_SOURCE_DIR}/dep_spec_annotations.se"
+ "${CMAKE_CURRENT_SOURCE_DIR}/elike_blocker.se"
+ "${CMAKE_CURRENT_SOURCE_DIR}/elike_choices.se"
+ "${CMAKE_CURRENT_SOURCE_DIR}/elike_dep_parser.se"
+ "${CMAKE_CURRENT_SOURCE_DIR}/elike_package_dep_spec.se"
+ "${CMAKE_CURRENT_SOURCE_DIR}/elike_use_requirement.se"
+ "${CMAKE_CURRENT_SOURCE_DIR}/fs_merger.se"
+ "${CMAKE_CURRENT_SOURCE_DIR}/hook.se"
+ "${CMAKE_CURRENT_SOURCE_DIR}/mask.se"
+ "${CMAKE_CURRENT_SOURCE_DIR}/match_package.se"
+ "${CMAKE_CURRENT_SOURCE_DIR}/merger.se"
+ "${CMAKE_CURRENT_SOURCE_DIR}/merger_entry_type.se"
+ "${CMAKE_CURRENT_SOURCE_DIR}/metadata_key.se"
+ "${CMAKE_CURRENT_SOURCE_DIR}/output_manager.se"
+ "${CMAKE_CURRENT_SOURCE_DIR}/package_id.se"
+ "${CMAKE_CURRENT_SOURCE_DIR}/partially_made_package_dep_spec.se"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pretty_print_options.se"
+ "${CMAKE_CURRENT_SOURCE_DIR}/repository.se"
+ "${CMAKE_CURRENT_SOURCE_DIR}/set_file.se"
+ "${CMAKE_CURRENT_SOURCE_DIR}/tar_merger.se"
+ "${CMAKE_CURRENT_SOURCE_DIR}/user_dep_spec.se"
+ "${CMAKE_CURRENT_SOURCE_DIR}/version_operator.se"
+ "${CMAKE_CURRENT_SOURCE_DIR}/version_spec.se")
+target_link_libraries(libpaludis
+ PRIVATE
+ libpaludisselinux
+ libpaludisutil
+ ${CMAKE_DL_LIBS}
+ ${CMAKE_THREAD_LIBS_INIT})
+add_dependencies(libpaludis ${paludis_hh_TARGET} ${paludis_util_hh_TARGET})
+
+if(ENABLE_PYTHON)
+ paludis_add_library(libpaludispythonhooks
+ "${CMAKE_CURRENT_SOURCE_DIR}/python_hooks.cc")
+ if(CXX_SUPPORTS_FNO_STRICT_ALIASING)
+ target_compile_options(libpaludispythonhooks PRIVATE -fno-strict-aliasing)
+ endif()
+ target_compile_definitions(libpaludispythonhooks
+ PRIVATE
+ -DPYTHONINSTALLDIR="${PALUDIS_PYTHON_INSTALL_DIR}")
+ target_include_directories(libpaludispythonhooks
+ PRIVATE
+ ${PYTHON_INCLUDE_DIRS})
+ target_link_libraries(libpaludispythonhooks
+ PRIVATE
+ libpaludis
+ ${Boost_PYTHON_LIBRARY}
+ ${PYTHON_LIBRARY})
+endif()
+
+if(ENABLE_PBINS)
+ paludis_add_library(libpaludistarextras
+ "${CMAKE_CURRENT_SOURCE_DIR}/tar_extras.cc")
+ add_dependencies(libpaludistarextras libpaludis_SE)
+ target_link_libraries(libpaludistarextras
+ PRIVATE
+ ${LibArchive_LIBRARIES})
+endif()
+
+if(ENABLE_STRIPPER)
+ paludis_add_library(libpaludisstripperextras
+ "${CMAKE_CURRENT_SOURCE_DIR}/stripper_extras.cc")
+ add_dependencies(libpaludisstripperextras libpaludis_SE)
+ target_link_libraries(libpaludisstripperextras
+ PRIVATE
+ ${LibMagic_LIBRARIES})
+endif()
+
+paludis_add_library(libpaludissohooks_TEST
+ SHARED_LIBRARY
+ "${CMAKE_CURRENT_SOURCE_DIR}/sohooks_TEST.cc")
+add_dependencies(libpaludissohooks_TEST libpaludis_SE)
+
+foreach(test
+ about
+ broken_linkage_configuration
+ comma_separated_dep_parser
+ dep_spec
+ elike_dep_parser
+ elike_use_requirement
+ environment_implementation
+ filter
+ filtered_generator
+ fs_merger
+ fuzzy_finder
+ generator
+ hooker
+ name
+ partitioning
+ repository_name_cache
+ selection
+ set_file
+ tar_merger
+ user_dep_spec
+ version_operator
+ version_spec)
+ paludis_add_test(${test} GTEST)
+endforeach()
+
+if(ENABLE_GTEST)
+ paludis_add_test(stripper GTEST)
+ add_executable(stripper_TEST_binary
+ "${CMAKE_CURRENT_SOURCE_DIR}/stripper_TEST_binary.cc")
+ add_dependencies(stripper_TEST stripper_TEST_binary)
+endif()
+
+add_subdirectory(args)
+add_subdirectory(resolver)
+
+install(TARGETS
+ libpaludis
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBDIR}")
+install(FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/about.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/about_metadata.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/action.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/action_names.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/additional_package_dep_spec_requirement.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/always_enabled_dependency_label.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/broken_linkage_configuration.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/broken_linkage_finder.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/buffer_output_manager.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/call_pretty_printer.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/changed_choices.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/choice.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/comma_separated_dep_parser.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/comma_separated_dep_pretty_printer.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/command_output_manager.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/common_sets.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/contents.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/create_output_manager_info.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/dep_label.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/dep_spec.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/dep_spec_annotations.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/dep_spec_data.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/dep_spec_flattener.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/distribution.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/elf_linkage_checker.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/elike_blocker.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/elike_choices.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/elike_dep_parser.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/elike_conditional_dep_spec.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/elike_package_dep_spec.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/elike_slot_requirement.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/elike_use_requirement.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/environment.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/environment_factory.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/environment_implementation.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/file_output_manager.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/filter.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/filter_handler.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/filtered_generator.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/format_messages_output_manager.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/formatted_pretty_printer.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/forward_at_finish_output_manager.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/fs_merger.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/fuzzy_finder.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/generator.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/generator_handler.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/hook.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/hooker.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/ipc_output_manager.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/libtool_linkage_checker.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/linkage_checker.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/literal_metadata_key.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/maintainer.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/mask.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/mask_utils.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/match_package.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/merger.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/merger_entry_type.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/metadata_key.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/metadata_key_holder.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/name.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/ndbam.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/ndbam_merger.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/ndbam_unmerger.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/notifier_callback.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/output_manager.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/output_manager_factory.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/output_manager_from_environment.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/package_dep_spec_collection.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/package_dep_spec_properties.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/package_id.hh"
+ "${CMAKE_CURRENT_BINARY_DIR}/paludis.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/paludislike_options_conf.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/partially_made_package_dep_spec.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/partitioning.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/permitted_choice_value_parameter_values.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pretty_print_options.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pretty_printer.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/repository.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/repository_factory.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/repository_name_cache.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/selection.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/selection_handler.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/serialise.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/set_file.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/slot.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/slot_requirement.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/spec_tree.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/standard_output_manager.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/stripper.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/syncer.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/tar_merger.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/tee_output_manager.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/unchoices_key.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/unformatted_pretty_printer.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/unmerger.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/user_dep_spec.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/version_operator.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/version_requirements.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/version_spec.hh"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_INCLUDEDIR}/paludis-${PALUDIS_PKG_CONFIG_SLOT}/paludis")
+install(FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/hooker.bash"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis")
+
+if(ENABLE_PYTHON)
+ install(TARGETS
+ libpaludispythonhooks
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBDIR}")
+endif()
+if(ENABLE_PBINS)
+ install(TARGETS
+ libpaludistarextras
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBDIR}")
+endif()
+if(ENABLE_STRIPPER)
+ install(TARGETS
+ libpaludisstripperextras
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBDIR}")
+endif()
+
diff --git a/paludis/args/CMakeLists.txt b/paludis/args/CMakeLists.txt
new file mode 100644
index 0000000..e294728
--- /dev/null
+++ b/paludis/args/CMakeLists.txt
@@ -0,0 +1,43 @@
+
+paludis_add_library(libpaludisargs
+ "${CMAKE_CURRENT_SOURCE_DIR}/args.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/args_error.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/args_group.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/args_handler.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/args_option.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/args_section.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/bad_argument.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/args_visitor.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/args_dumper.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/escape.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/log_level_arg.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/man.cc"
+ SE_SOURCES
+ "${CMAKE_CURRENT_SOURCE_DIR}/args_handler.se")
+
+paludis_add_test(args_TEST GTEST
+ LINK_LIBRARIES
+ libpaludisargs)
+
+install(TARGETS
+ libpaludisargs
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBDIR}")
+install(FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/args_dumper.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/args_error.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/args_group.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/args_handler.hh"
+ "${CMAKE_CURRENT_BINARY_DIR}/args_handler-se.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/args.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/args_option.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/args_section.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/args_visitor.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/bad_argument.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/do_help.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/escape.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/log_level_arg.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/man.hh"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_INCLUDEDIR}/paludis-${PALUDIS_PKG_CONFIG_SLOT}/paludis/args")
+
diff --git a/paludis/distributions/CMakeLists.txt b/paludis/distributions/CMakeLists.txt
new file mode 100644
index 0000000..a048fd6
--- /dev/null
+++ b/paludis/distributions/CMakeLists.txt
@@ -0,0 +1,10 @@
+
+add_subdirectory(exherbo)
+add_subdirectory(gentoo)
+
+install(FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/exherbo.conf"
+ "${CMAKE_CURRENT_SOURCE_DIR}/gentoo.conf"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_DATADIR}/paludis/distributions")
+
diff --git a/paludis/distributions/exherbo/CMakeLists.txt b/paludis/distributions/exherbo/CMakeLists.txt
new file mode 100644
index 0000000..ca647d5
--- /dev/null
+++ b/paludis/distributions/exherbo/CMakeLists.txt
@@ -0,0 +1,9 @@
+
+install(FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/e.conf"
+ "${CMAKE_CURRENT_SOURCE_DIR}/gems.conf"
+ "${CMAKE_CURRENT_SOURCE_DIR}/paludis.conf"
+ "${CMAKE_CURRENT_SOURCE_DIR}/repository_blacklist.conf"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_DATADIR}/paludis/distributions/exherbo")
+
diff --git a/paludis/distributions/gentoo/CMakeLists.txt b/paludis/distributions/gentoo/CMakeLists.txt
new file mode 100644
index 0000000..99bce73
--- /dev/null
+++ b/paludis/distributions/gentoo/CMakeLists.txt
@@ -0,0 +1,9 @@
+
+install(FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/e.conf"
+ "${CMAKE_CURRENT_SOURCE_DIR}/gems.conf"
+ "${CMAKE_CURRENT_SOURCE_DIR}/paludis.conf"
+ "${CMAKE_CURRENT_SOURCE_DIR}/repository_blacklist.conf"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_DATADIR}/paludis/distributions/gentoo")
+
diff --git a/paludis/environments/CMakeLists.txt b/paludis/environments/CMakeLists.txt
new file mode 100644
index 0000000..58ec959
--- /dev/null
+++ b/paludis/environments/CMakeLists.txt
@@ -0,0 +1,8 @@
+
+foreach(environment ${PALUDIS_ALL_ENVIRONMENTS})
+ string(TOUPPER ${environment} uc_environment)
+ if(ENABLE_${uc_environment}_ENVIRONMENT)
+ add_subdirectory(${environment})
+ endif()
+endforeach()
+
diff --git a/paludis/environments/paludis/CMakeLists.txt b/paludis/environments/paludis/CMakeLists.txt
new file mode 100644
index 0000000..b56bacd
--- /dev/null
+++ b/paludis/environments/paludis/CMakeLists.txt
@@ -0,0 +1,29 @@
+
+paludis_add_library(libpaludispaludisenvironment
+ OBJECT_LIBRARY
+ "${CMAKE_CURRENT_SOURCE_DIR}/bashable_conf.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/extra_distribution_data.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/keywords_conf.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/licenses_conf.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/mirrors_conf.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/output_conf.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/package_mask_conf.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/paludis_config.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/paludis_environment.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/suggestions_conf.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/use_conf.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/world.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/registration.cc")
+target_compile_definitions(libpaludispaludisenvironment
+ PRIVATE
+ -DSHAREDIR="${CMAKE_INSTALL_FULL_DATAROOTDIR}")
+add_dependencies(libpaludispaludisenvironment libpaludisutil_SE)
+
+paludis_add_test(paludis_environment GTEST)
+paludis_add_test(world GTEST)
+
+install(FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/default_output.conf"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_DATAROOTDIR}/paludis/environments/paludis")
+
diff --git a/paludis/environments/portage/CMakeLists.txt b/paludis/environments/portage/CMakeLists.txt
new file mode 100644
index 0000000..179426b
--- /dev/null
+++ b/paludis/environments/portage/CMakeLists.txt
@@ -0,0 +1,13 @@
+
+paludis_add_library(libpaludisportageenvironment
+ OBJECT_LIBRARY
+ "${CMAKE_CURRENT_SOURCE_DIR}/portage_environment.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/registration.cc")
+
+paludis_add_test(portage_environment GTEST)
+
+install(FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/bashrc"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/environments/portage")
+
diff --git a/paludis/environments/test/CMakeLists.txt b/paludis/environments/test/CMakeLists.txt
new file mode 100644
index 0000000..07db29b
--- /dev/null
+++ b/paludis/environments/test/CMakeLists.txt
@@ -0,0 +1,12 @@
+
+paludis_add_library(libpaludistestenvironment
+ OBJECT_LIBRARY
+ "${CMAKE_CURRENT_SOURCE_DIR}/test_environment.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/registration.cc")
+add_dependencies(libpaludistestenvironment libpaludis_SE libpaludisutil_SE)
+
+install(FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/test_environment.hh
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_INCLUDEDIR}/paludis-${PALUDIS_PKG_CONFIG_SLOT}/paludis/environments/test")
+
diff --git a/paludis/fetchers/CMakeLists.txt b/paludis/fetchers/CMakeLists.txt
new file mode 100644
index 0000000..ec35b40
--- /dev/null
+++ b/paludis/fetchers/CMakeLists.txt
@@ -0,0 +1,31 @@
+
+foreach(scheme http;https;ftp)
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/dowget.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/do${scheme}"
+ @ONLY)
+endforeach()
+
+add_custom_command(OUTPUT
+ "${CMAKE_CURRENT_BINARY_DIR}/.keep"
+ COMMAND
+ "${CMAKE_COMMAND}" -E touch "${CMAKE_CURRENT_BINARY_DIR}/.keep")
+# FIXME(compnerd) auto-generate the target
+add_custom_target(fetchers-keep
+ ALL
+ DEPENDS
+ "${CMAKE_CURRENT_BINARY_DIR}/.keep")
+
+add_subdirectory(demos)
+
+install(FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/dohttp"
+ "${CMAKE_CURRENT_BINARY_DIR}/dohttps"
+ "${CMAKE_CURRENT_BINARY_DIR}/doftp"
+ "${CMAKE_CURRENT_SOURCE_DIR}/dofile"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/fetchers")
+install(FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/.keep"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_DATADIR}/paludis/fetchers")
+
diff --git a/paludis/fetchers/demos/CMakeLists.txt b/paludis/fetchers/demos/CMakeLists.txt
new file mode 100644
index 0000000..c1749f7
--- /dev/null
+++ b/paludis/fetchers/demos/CMakeLists.txt
@@ -0,0 +1,6 @@
+
+install(FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/docurl"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_DATADIR}/paludis/fetchers/demos")
+
diff --git a/paludis/repositories/CMakeLists.txt b/paludis/repositories/CMakeLists.txt
new file mode 100644
index 0000000..1198e34
--- /dev/null
+++ b/paludis/repositories/CMakeLists.txt
@@ -0,0 +1,8 @@
+
+foreach(repository ${PALUDIS_ALL_REPOSITORIES})
+ string(TOUPPER ${repository} repository_uppercase)
+ if(ENABLE_${repository_uppercase}_REPOSITORY)
+ add_subdirectory(${repository})
+ endif()
+endforeach()
+
diff --git a/paludis/repositories/accounts/CMakeLists.txt b/paludis/repositories/accounts/CMakeLists.txt
new file mode 100644
index 0000000..0f38ccf
--- /dev/null
+++ b/paludis/repositories/accounts/CMakeLists.txt
@@ -0,0 +1,17 @@
+
+paludis_add_library(libpaludisaccountsrepository
+ OBJECT_LIBRARY
+ "${CMAKE_CURRENT_SOURCE_DIR}/accounts_exceptions.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/accounts_handler.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/accounts_repository.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/accounts_repository_store.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/accounts_id.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/accounts_dep_key.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/accounts_installed_mask.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/installed_accounts_id.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/dummy_accounts_handler.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/passwd_accounts_handler.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/registration.cc")
+
+paludis_add_test(accounts_repository GTEST)
+
diff --git a/paludis/repositories/e/CMakeLists.txt b/paludis/repositories/e/CMakeLists.txt
new file mode 100644
index 0000000..65a3d44
--- /dev/null
+++ b/paludis/repositories/e/CMakeLists.txt
@@ -0,0 +1,158 @@
+
+add_subdirectory(eapis)
+add_subdirectory(ebuild)
+
+if(ENABLE_XML)
+ add_definitions(-DENABLE_XML)
+
+ paludis_add_library(libpaludiserepositoryxmlthings
+ "${CMAKE_CURRENT_SOURCE_DIR}/xml_things.cc")
+ target_include_directories(libpaludiserepositoryxmlthings
+ PRIVATE
+ ${LIBXML2_INCLUDE_DIR})
+ target_link_libraries(libpaludiserepositoryxmlthings
+ PRIVATE
+ ${LIBXML2_LIBRARIES})
+endif()
+
+paludis_add_library(libpaludiserepository
+ OBJECT_LIBRARY
+ "${CMAKE_CURRENT_SOURCE_DIR}/a_finder.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/aa_visitor.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/can_skip_phase.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/check_fetched_files_visitor.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/check_userpriv.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/dep_parser.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/do_fetch_action.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/do_info_action.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/do_install_action.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/do_pretend_action.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/do_pretend_fetch_action.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/e_choice_value.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/e_installed_repository.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/e_installed_repository_id.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/e_choices_key.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/e_key.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/e_keywords_key.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/e_mask.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/e_repository.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/e_repository_exceptions.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/e_repository_id.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/e_repository_news.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/e_repository_params.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/e_repository_sets.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/e_slot_key.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/e_string_set_key.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/e_stripper.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/eapi.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/eapi_phase.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/ebuild.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/ebuild_flat_metadata_cache.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/ebuild_id.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/eclass_mtimes.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/exndbam_id.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/exndbam_repository.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/exheres_layout.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/exheres_mask_store.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/exheres_profile.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/extra_distribution_data.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/fetch_visitor.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/file_suffixes.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/info_metadata_key.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/iuse.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pretend_fetch_visitor.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/fix_locked_dependencies.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/glsa.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/layout.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/licence_groups.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/make_archive_strings.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/make_use.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/manifest2_reader.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/mask_info.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/memoised_hashes.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/metadata_xml.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/myoption.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/myoptions_requirements_verifier.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/parse_annotations.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/parse_dependency_label.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/parse_plain_text_label.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/parse_uri_label.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pbin_merger.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/permitted_directories.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pipe_command_handler.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/profile.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/registration.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/required_use_verifier.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/source_uri_finder.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/spec_tree_pretty_printer.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/traditional_layout.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/traditional_mask_file.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/traditional_mask_store.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/traditional_profile.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/traditional_profile_file.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/use_desc.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/xml_things_handle.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/vdb_id.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/vdb_merger.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/vdb_repository.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/vdb_unmerger.cc"
+ SE_SOURCES
+ "${CMAKE_CURRENT_SOURCE_DIR}/dep_parser.se"
+ "${CMAKE_CURRENT_SOURCE_DIR}/iuse.se"
+ "${CMAKE_CURRENT_SOURCE_DIR}/e_repository_params.se")
+
+foreach(test
+ aa_visitor
+ dep_parser
+ fix_locked_dependencies
+ source_uri_finder)
+ paludis_add_test(${test} GTEST)
+endforeach()
+foreach(test
+ vdb_repository
+ vdb_repository_TEST_eapis
+ vdb_repository_TEST_cache
+ e_repository
+ e_repository_TEST_0
+ e_repository_TEST_1
+ e_repository_TEST_2
+ e_repository_TEST_3
+ e_repository_TEST_4
+ e_repository_TEST_5
+ e_repository_TEST_6
+ e_repository_TEST_ever
+ e_repository_TEST_exheres_0
+ e_repository_TEST_exlibs
+ e_repository_TEST_phases
+ e_repository_TEST_replacing
+ e_repository_TEST_symlink_rewriting
+ exndbam_repository
+ depend_rdepend
+ e_repository_sets
+ ebuild_flat_metadata_cache
+ fetch_visitor
+ vdb_merger
+ vdb_unmerger)
+ paludis_add_test(${test} GTEST)
+endforeach()
+
+if(ENABLE_XML)
+ paludis_add_test(xml_things GTEST)
+endif()
+
+if(ENABLE_PBINS)
+ paludis_add_test(e_repository_TEST_pbin GTEST)
+endif()
+
+install(FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/traditional.exclude"
+ "${CMAKE_CURRENT_SOURCE_DIR}/ebuild_entries_suffixes.conf"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_DATADIR}/paludis")
+if(ENABLE_XML)
+ install(TARGETS
+ libpaludiserepositoryxmlthings
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBDIR}")
+endif()
+
diff --git a/paludis/repositories/e/eapis/CMakeLists.txt b/paludis/repositories/e/eapis/CMakeLists.txt
new file mode 100644
index 0000000..2b818d6
--- /dev/null
+++ b/paludis/repositories/e/eapis/CMakeLists.txt
@@ -0,0 +1,23 @@
+
+install(FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/0.conf"
+ "${CMAKE_CURRENT_SOURCE_DIR}/1.conf"
+ "${CMAKE_CURRENT_SOURCE_DIR}/2.conf"
+ "${CMAKE_CURRENT_SOURCE_DIR}/3.conf"
+ "${CMAKE_CURRENT_SOURCE_DIR}/4.conf"
+ "${CMAKE_CURRENT_SOURCE_DIR}/5.conf"
+ "${CMAKE_CURRENT_SOURCE_DIR}/6.conf"
+ "${CMAKE_CURRENT_SOURCE_DIR}/exheres-0.conf"
+ "${CMAKE_CURRENT_SOURCE_DIR}/paludis-1.conf"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pbin-1+0.conf"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pbin-1+1.conf"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pbin-1+2.conf"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pbin-1+3.conf"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pbin-1+4.conf"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pbin-1+5.conf"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pbin-1+6.conf"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pbin-1+exheres-0.conf"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pbin-1+paludis-1.conf"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_DATADIR}/paludis/eapis")
+
diff --git a/paludis/repositories/e/ebuild/0/CMakeLists.txt b/paludis/repositories/e/ebuild/0/CMakeLists.txt
new file mode 100644
index 0000000..dba97c2
--- /dev/null
+++ b/paludis/repositories/e/ebuild/0/CMakeLists.txt
@@ -0,0 +1,39 @@
+
+paludis_add_test(conditional_functions BASH EBUILD_MODULE_SUFFIXES 0)
+paludis_add_test(list_functions BASH EBUILD_MODULE_SUFFIXES 0)
+
+install(FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/build_functions.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/builtin_infovars.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/builtin_init.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/builtin_initrm.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/builtin_initmisc.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/builtin_loadenv.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/builtin_metadata.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/builtin_killold.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/builtin_killoldrm.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/builtin_saveenv.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/builtin_tidyup.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/builtin_tidyuprm.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/builtin_variable.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/conditional_functions.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/eclass_functions.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/list_functions.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/output_functions.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pkg_config.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pkg_info.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pkg_nofetch.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pkg_postinst.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pkg_postrm.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pkg_preinst.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pkg_prerm.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pkg_pretend.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pkg_setup.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/portage_stubs.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/src_compile.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/src_install.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/src_test.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/src_unpack.bash"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/0")
+
diff --git a/paludis/repositories/e/ebuild/1/CMakeLists.txt b/paludis/repositories/e/ebuild/1/CMakeLists.txt
new file mode 100644
index 0000000..124992b
--- /dev/null
+++ b/paludis/repositories/e/ebuild/1/CMakeLists.txt
@@ -0,0 +1,7 @@
+
+install(FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/src_compile.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/output_functions.bash"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/1")
+
diff --git a/paludis/repositories/e/ebuild/2/CMakeLists.txt b/paludis/repositories/e/ebuild/2/CMakeLists.txt
new file mode 100644
index 0000000..4e2987b
--- /dev/null
+++ b/paludis/repositories/e/ebuild/2/CMakeLists.txt
@@ -0,0 +1,14 @@
+
+install(FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/eclass_functions.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pkg_nofetch.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/src_compile.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/src_configure.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/src_install.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/src_prepare.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/src_test.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/src_unpack.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/output_functions.bash"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/2")
+
diff --git a/paludis/repositories/e/ebuild/3/CMakeLists.txt b/paludis/repositories/e/ebuild/3/CMakeLists.txt
new file mode 100644
index 0000000..0cf81f5
--- /dev/null
+++ b/paludis/repositories/e/ebuild/3/CMakeLists.txt
@@ -0,0 +1,6 @@
+
+install(FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/output_functions.bash"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/3")
+
diff --git a/paludis/repositories/e/ebuild/4/CMakeLists.txt b/paludis/repositories/e/ebuild/4/CMakeLists.txt
new file mode 100644
index 0000000..1523c46
--- /dev/null
+++ b/paludis/repositories/e/ebuild/4/CMakeLists.txt
@@ -0,0 +1,10 @@
+
+install(FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/builtin_bad_required_use.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pkg_pretend.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/src_install.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/die_functions.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/output_functions.bash"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/4")
+
diff --git a/paludis/repositories/e/ebuild/5/CMakeLists.txt b/paludis/repositories/e/ebuild/5/CMakeLists.txt
new file mode 100644
index 0000000..767dc4e
--- /dev/null
+++ b/paludis/repositories/e/ebuild/5/CMakeLists.txt
@@ -0,0 +1,9 @@
+
+install(FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/src_test.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/usex.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/list_functions.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/output_functions.bash"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/5")
+
diff --git a/paludis/repositories/e/ebuild/6/CMakeLists.txt b/paludis/repositories/e/ebuild/6/CMakeLists.txt
new file mode 100644
index 0000000..8693c86
--- /dev/null
+++ b/paludis/repositories/e/ebuild/6/CMakeLists.txt
@@ -0,0 +1,11 @@
+
+install(FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/build_functions.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/list_functions.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/multilib_functions.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/output_functions.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/src_install.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/src_prepare.bash"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/6")
+
diff --git a/paludis/repositories/e/ebuild/CMakeLists.txt b/paludis/repositories/e/ebuild/CMakeLists.txt
new file mode 100644
index 0000000..f305334
--- /dev/null
+++ b/paludis/repositories/e/ebuild/CMakeLists.txt
@@ -0,0 +1,35 @@
+
+add_subdirectory(0)
+add_subdirectory(1)
+add_subdirectory(2)
+add_subdirectory(3)
+add_subdirectory(4)
+add_subdirectory(5)
+add_subdirectory(6)
+add_subdirectory(exheres-0)
+add_subdirectory(paludis-1)
+add_subdirectory(pbin-1)
+add_subdirectory(utils)
+
+paludis_add_test(kernel_functions BASH
+ EBUILD_MODULE_SUFFIXES 0
+ TEST_RUNNER "${CMAKE_CURRENT_SOURCE_DIR}/run_test.bash")
+
+install(FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/binary_functions.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/die_functions.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/ebuild.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/kernel_functions.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/install_functions.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/multilib_functions.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/output_functions.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pipe_functions.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/sandbox.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/sydbox.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/source_functions.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/usage_error.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/write_vdb_entry.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/write_binary_ebuild.bash"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis")
+
diff --git a/paludis/repositories/e/ebuild/exheres-0/CMakeLists.txt b/paludis/repositories/e/ebuild/exheres-0/CMakeLists.txt
new file mode 100644
index 0000000..4d114d4
--- /dev/null
+++ b/paludis/repositories/e/ebuild/exheres-0/CMakeLists.txt
@@ -0,0 +1,43 @@
+
+paludis_add_test(conditional_functions BASH EBUILD_MODULE_SUFFIXES exheres-0)
+
+install(FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/build_functions.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/builtin_infovars.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/builtin_init.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/builtin_initrm.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/builtin_initmisc.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/builtin_loadenv.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/builtin_metadata.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/builtin_killold.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/builtin_killoldrm.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/builtin_saveenv.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/builtin_tidyup.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/builtin_variable.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/conditional_functions.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/ever_functions.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/exlib_functions.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/list_functions.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/output_functions.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pkg_bad_options.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pkg_config.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pkg_info.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pkg_nofetch.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pkg_postinst.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pkg_postrm.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pkg_preinst.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pkg_prerm.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pkg_pretend.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pkg_setup.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/portage_stubs.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/src_compile.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/src_configure.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/src_fetch_extra.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/src_install.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/src_test.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/src_test_expensive.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/src_prepare.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/src_unpack.bash"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/exheres-0")
+
diff --git a/paludis/repositories/e/ebuild/paludis-1/CMakeLists.txt b/paludis/repositories/e/ebuild/paludis-1/CMakeLists.txt
new file mode 100644
index 0000000..101a0b5
--- /dev/null
+++ b/paludis/repositories/e/ebuild/paludis-1/CMakeLists.txt
@@ -0,0 +1,6 @@
+
+install(FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/output_functions.bash"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/paludis-1")
+
diff --git a/paludis/repositories/e/ebuild/pbin-1/CMakeLists.txt b/paludis/repositories/e/ebuild/pbin-1/CMakeLists.txt
new file mode 100644
index 0000000..4d4dc44
--- /dev/null
+++ b/paludis/repositories/e/ebuild/pbin-1/CMakeLists.txt
@@ -0,0 +1,7 @@
+
+install(FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/builtin_installbin.bash"
+ "${CMAKE_CURRENT_SOURCE_DIR}/builtin_pivotbin.bash"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/pbin-1")
+
diff --git a/paludis/repositories/e/ebuild/utils/4/CMakeLists.txt b/paludis/repositories/e/ebuild/utils/4/CMakeLists.txt
new file mode 100644
index 0000000..9fedda7
--- /dev/null
+++ b/paludis/repositories/e/ebuild/utils/4/CMakeLists.txt
@@ -0,0 +1,17 @@
+
+foreach(bannedscript
+ dohard
+ dosed)
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/banned_in_eapi_4"
+ "${CMAKE_CURRENT_BINARY_DIR}/${bannedscript}"
+ @ONLY)
+endforeach()
+
+install(PROGRAMS
+ "${CMAKE_CURRENT_SOURCE_DIR}/docompress"
+ "${CMAKE_CURRENT_BINARY_DIR}/dohard"
+ "${CMAKE_CURRENT_BINARY_DIR}/dosed"
+ "${CMAKE_CURRENT_SOURCE_DIR}/banned_in_eapi_4"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/utils/4")
+
diff --git a/paludis/repositories/e/ebuild/utils/5/CMakeLists.txt b/paludis/repositories/e/ebuild/utils/5/CMakeLists.txt
new file mode 100644
index 0000000..29a19c7
--- /dev/null
+++ b/paludis/repositories/e/ebuild/utils/5/CMakeLists.txt
@@ -0,0 +1,7 @@
+
+install(FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/doheader"
+ "${CMAKE_CURRENT_SOURCE_DIR}/newheader"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/utils/5")
+
diff --git a/paludis/repositories/e/ebuild/utils/CMakeLists.txt b/paludis/repositories/e/ebuild/utils/CMakeLists.txt
new file mode 100644
index 0000000..9b34bed
--- /dev/null
+++ b/paludis/repositories/e/ebuild/utils/CMakeLists.txt
@@ -0,0 +1,97 @@
+
+add_subdirectory(4)
+add_subdirectory(5)
+add_subdirectory(exheres-0)
+
+foreach(prep all;allstrip;allman;allinfo;strip;man;info;docs;alldocs)
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/prep.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/prep${prep}"
+ @ONLY)
+endforeach()
+
+if(ENABLE_PBINS)
+ add_executable(unpaxinate
+ "${CMAKE_CURRENT_SOURCE_DIR}/unpaxinate.cc")
+ target_link_libraries(unpaxinate
+ PRIVATE
+ ${LibArchive_LIBRARIES})
+endif()
+
+add_executable(print_exports
+ "${CMAKE_CURRENT_SOURCE_DIR}/print_exports.cc")
+add_executable(locked_pipe_command
+ "${CMAKE_CURRENT_SOURCE_DIR}/locked_pipe_command.cc")
+add_executable(strip_tar_corruption
+ "${CMAKE_CURRENT_SOURCE_DIR}/strip_tar_corruption.cc")
+
+paludis_add_test(wrapped_getfsize BASH
+ EBUILD_MODULE_SUFFIXES 0
+ TEST_RUNNER "${CMAKE_CURRENT_SOURCE_DIR}/run_test.bash")
+
+install(FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/canonicalise"
+ "${CMAKE_CURRENT_SOURCE_DIR}/dobin"
+ "${CMAKE_CURRENT_SOURCE_DIR}/doconfd"
+ "${CMAKE_CURRENT_SOURCE_DIR}/dodir"
+ "${CMAKE_CURRENT_SOURCE_DIR}/dodoc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/doenvd"
+ "${CMAKE_CURRENT_SOURCE_DIR}/doexe"
+ "${CMAKE_CURRENT_SOURCE_DIR}/dohard"
+ "${CMAKE_CURRENT_SOURCE_DIR}/dohtml"
+ "${CMAKE_CURRENT_SOURCE_DIR}/doinfo"
+ "${CMAKE_CURRENT_SOURCE_DIR}/doinitd"
+ "${CMAKE_CURRENT_SOURCE_DIR}/doins"
+ "${CMAKE_CURRENT_SOURCE_DIR}/dolib"
+ "${CMAKE_CURRENT_SOURCE_DIR}/dolib.a"
+ "${CMAKE_CURRENT_SOURCE_DIR}/dolib.so"
+ "${CMAKE_CURRENT_SOURCE_DIR}/doman"
+ "${CMAKE_CURRENT_SOURCE_DIR}/domo"
+ "${CMAKE_CURRENT_SOURCE_DIR}/donewins"
+ "${CMAKE_CURRENT_SOURCE_DIR}/dosbin"
+ "${CMAKE_CURRENT_SOURCE_DIR}/dosed"
+ "${CMAKE_CURRENT_SOURCE_DIR}/dosym"
+ "${CMAKE_CURRENT_SOURCE_DIR}/ecompress"
+ "${CMAKE_CURRENT_SOURCE_DIR}/ecompressdir"
+ "${CMAKE_CURRENT_SOURCE_DIR}/emake"
+ "${CMAKE_CURRENT_SOURCE_DIR}/fowners"
+ "${CMAKE_CURRENT_SOURCE_DIR}/fperms"
+ "${CMAKE_CURRENT_SOURCE_DIR}/keepdir"
+ "${CMAKE_CURRENT_SOURCE_DIR}/newbin"
+ "${CMAKE_CURRENT_SOURCE_DIR}/newconfd"
+ "${CMAKE_CURRENT_SOURCE_DIR}/newdoc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/newenvd"
+ "${CMAKE_CURRENT_SOURCE_DIR}/newexe"
+ "${CMAKE_CURRENT_SOURCE_DIR}/newinitd"
+ "${CMAKE_CURRENT_SOURCE_DIR}/newins"
+ "${CMAKE_CURRENT_SOURCE_DIR}/newlib.a"
+ "${CMAKE_CURRENT_SOURCE_DIR}/newlib.so"
+ "${CMAKE_CURRENT_SOURCE_DIR}/newman"
+ "${CMAKE_CURRENT_SOURCE_DIR}/newsbin"
+ "${CMAKE_CURRENT_BINARY_DIR}/prepall"
+ "${CMAKE_CURRENT_BINARY_DIR}/prepallstrip"
+ "${CMAKE_CURRENT_BINARY_DIR}/prepstrip"
+ "${CMAKE_CURRENT_BINARY_DIR}/prepallman"
+ "${CMAKE_CURRENT_BINARY_DIR}/prepman"
+ "${CMAKE_CURRENT_BINARY_DIR}/prepallinfo"
+ "${CMAKE_CURRENT_BINARY_DIR}/prepinfo"
+ "${CMAKE_CURRENT_BINARY_DIR}/prepdocs"
+ "${CMAKE_CURRENT_BINARY_DIR}/prepalldocs"
+ "${CMAKE_CURRENT_SOURCE_DIR}/unpack"
+ "${CMAKE_CURRENT_SOURCE_DIR}/wrapped_ldconfig"
+ "${CMAKE_CURRENT_SOURCE_DIR}/wrapped_getfsize"
+ "${CMAKE_CURRENT_SOURCE_DIR}/wrapped_getmtime"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/utils")
+install(TARGETS
+ print_exports
+ locked_pipe_command
+ strip_tar_corruption
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/utils")
+if(ENABLE_PBINS)
+ install(TARGETS
+ unpaxinate
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/utils")
+endif()
+
diff --git a/paludis/repositories/e/ebuild/utils/exheres-0/CMakeLists.txt b/paludis/repositories/e/ebuild/utils/exheres-0/CMakeLists.txt
new file mode 100644
index 0000000..ca219ec
--- /dev/null
+++ b/paludis/repositories/e/ebuild/utils/exheres-0/CMakeLists.txt
@@ -0,0 +1,58 @@
+
+foreach(bannedscript
+ prepall
+ prepallstrip
+ prepstrip
+ prepallman
+ prepman
+ prepallinfo
+ prepinfo
+ prepdocs
+ prepalldocs
+ dohard
+ donewins
+ dosed
+ dohtml
+ ecompress
+ ecompressdir
+ fperms
+ fowners)
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/banned_in_eapi_exheres-0"
+ "${CMAKE_CURRENT_BINARY_DIR}/${bannedscript}"
+ @ONLY)
+endforeach()
+
+install(PROGRAMS
+ "${CMAKE_CURRENT_BINARY_DIR}/dohard"
+ "${CMAKE_CURRENT_BINARY_DIR}/dohtml"
+ "${CMAKE_CURRENT_SOURCE_DIR}/dolib"
+ "${CMAKE_CURRENT_SOURCE_DIR}/dosbin"
+ "${CMAKE_CURRENT_BINARY_DIR}/dosed"
+ "${CMAKE_CURRENT_BINARY_DIR}/donewins"
+ "${CMAKE_CURRENT_SOURCE_DIR}/emake"
+ "${CMAKE_CURRENT_BINARY_DIR}/fperms"
+ "${CMAKE_CURRENT_BINARY_DIR}/fowners"
+ "${CMAKE_CURRENT_SOURCE_DIR}/herebin"
+ "${CMAKE_CURRENT_SOURCE_DIR}/hereconfd"
+ "${CMAKE_CURRENT_SOURCE_DIR}/hereenvd"
+ "${CMAKE_CURRENT_SOURCE_DIR}/hereinitd"
+ "${CMAKE_CURRENT_SOURCE_DIR}/hereins"
+ "${CMAKE_CURRENT_SOURCE_DIR}/heresbin"
+ "${CMAKE_CURRENT_SOURCE_DIR}/newsbin"
+ "${CMAKE_CURRENT_SOURCE_DIR}/nonfatal"
+ "${CMAKE_CURRENT_BINARY_DIR}/prepall"
+ "${CMAKE_CURRENT_BINARY_DIR}/prepallstrip"
+ "${CMAKE_CURRENT_BINARY_DIR}/prepstrip"
+ "${CMAKE_CURRENT_BINARY_DIR}/prepallman"
+ "${CMAKE_CURRENT_BINARY_DIR}/prepman"
+ "${CMAKE_CURRENT_BINARY_DIR}/prepallinfo"
+ "${CMAKE_CURRENT_BINARY_DIR}/prepinfo"
+ "${CMAKE_CURRENT_BINARY_DIR}/prepdocs"
+ "${CMAKE_CURRENT_BINARY_DIR}/prepalldocs"
+ "${CMAKE_CURRENT_BINARY_DIR}/ecompress"
+ "${CMAKE_CURRENT_BINARY_DIR}/ecompressdir"
+ "${CMAKE_CURRENT_SOURCE_DIR}/strip"
+ "${CMAKE_CURRENT_SOURCE_DIR}/banned_in_eapi_exheres-0"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/utils/exheres-0")
+
diff --git a/paludis/repositories/fake/CMakeLists.txt b/paludis/repositories/fake/CMakeLists.txt
new file mode 100644
index 0000000..2dfbc9f
--- /dev/null
+++ b/paludis/repositories/fake/CMakeLists.txt
@@ -0,0 +1,24 @@
+
+paludis_add_library(libpaludisfakerepository
+ OBJECT_LIBRARY
+ "${CMAKE_CURRENT_SOURCE_DIR}/dep_parser.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/fake_repository_base.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/fake_repository.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/fake_installed_repository.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/fake_package_id.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/registration.cc")
+add_dependencies(libpaludisfakerepository libpaludisutil_SE)
+
+paludis_add_test(fake_repository GTEST)
+paludis_add_test(fake_installed_repository GTEST)
+# paludis_add_test(dep_parser)
+
+install(FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/dep_parser.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/fake_repository.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/fake_repository_base.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/fake_installed_repository.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/fake_package_id.hh"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_INCLUDEDIR}/paludis-${PALUDIS_PKG_CONFIG_SLOT}/paludis/repositories/fake")
+
diff --git a/paludis/repositories/gemcutter/CMakeLists.txt b/paludis/repositories/gemcutter/CMakeLists.txt
new file mode 100644
index 0000000..cca527b
--- /dev/null
+++ b/paludis/repositories/gemcutter/CMakeLists.txt
@@ -0,0 +1,25 @@
+
+paludis_add_library(libpaludisgemcutterrepository
+ OBJECT_LIBRARY
+ "${CMAKE_CURRENT_SOURCE_DIR}/gemcutter_dependencies_key.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/gemcutter_id.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/gemcutter_uri_key.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/gemcutter_repository.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/gemcutter_repository_store.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/json_common.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/json_things_handle.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/registration.cc")
+
+paludis_add_library(libpaludisgemcutterrepositoryjsonthings
+ json_things.cc)
+target_include_directories(libpaludisgemcutterrepositoryjsonthings
+ PRIVATE
+ ${Jansson_INCLUDE_DIRS})
+target_link_libraries(libpaludisgemcutterrepositoryjsonthings
+ PRIVATE
+ ${Jansson_LIBRARIES})
+
+install(TARGETS
+ libpaludisgemcutterrepositoryjsonthings
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBDIR}")
diff --git a/paludis/repositories/repository/CMakeLists.txt b/paludis/repositories/repository/CMakeLists.txt
new file mode 100644
index 0000000..b8cff91
--- /dev/null
+++ b/paludis/repositories/repository/CMakeLists.txt
@@ -0,0 +1,8 @@
+
+paludis_add_library(libpaludisrepositoryrepository
+ OBJECT_LIBRARY
+ "${CMAKE_CURRENT_SOURCE_DIR}/repository_id.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/repository_repository.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/repository_repository_store.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/registration.cc")
+
diff --git a/paludis/repositories/unavailable/CMakeLists.txt b/paludis/repositories/unavailable/CMakeLists.txt
new file mode 100644
index 0000000..6fad5cc
--- /dev/null
+++ b/paludis/repositories/unavailable/CMakeLists.txt
@@ -0,0 +1,14 @@
+
+paludis_add_library(libpaludisunavailablerepository
+ OBJECT_LIBRARY
+ "${CMAKE_CURRENT_SOURCE_DIR}/unavailable_repository.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/unavailable_package_id.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/unavailable_repository_id.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/unavailable_repository_dependencies_key.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/unavailable_mask.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/unavailable_repository_store.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/unavailable_repository_file.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/registration.cc")
+
+paludis_add_test(unavailable_repository GTEST)
+
diff --git a/paludis/repositories/unpackaged/CMakeLists.txt b/paludis/repositories/unpackaged/CMakeLists.txt
new file mode 100644
index 0000000..e2361f4
--- /dev/null
+++ b/paludis/repositories/unpackaged/CMakeLists.txt
@@ -0,0 +1,15 @@
+
+paludis_add_library(libpaludisunpackagedrepository
+ OBJECT_LIBRARY
+ "${CMAKE_CURRENT_SOURCE_DIR}/exceptions.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/unpackaged_id.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/unpackaged_repository.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/unpackaged_key.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/unpackaged_stripper.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/installed_repository.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/installed_id.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/registration.cc")
+
+paludis_add_test(unpackaged_repository GTEST)
+paludis_add_test(installed_repository GTEST)
+
diff --git a/paludis/repositories/unwritten/CMakeLists.txt b/paludis/repositories/unwritten/CMakeLists.txt
new file mode 100644
index 0000000..61d223a
--- /dev/null
+++ b/paludis/repositories/unwritten/CMakeLists.txt
@@ -0,0 +1,13 @@
+
+paludis_add_library(libpaludisunwrittenrepository
+ OBJECT_LIBRARY
+ "${CMAKE_CURRENT_SOURCE_DIR}/unwritten_repository.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/unwritten_id.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/unwritten_mask.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/unwritten_repository_store.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/unwritten_repository_file.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/registration.cc")
+add_dependencies(libpaludisunwrittenrepository libpaludisutil_SE)
+
+paludis_add_test(unwritten_repository GTEST)
+
diff --git a/paludis/resolver/CMakeLists.txt b/paludis/resolver/CMakeLists.txt
new file mode 100644
index 0000000..c798025
--- /dev/null
+++ b/paludis/resolver/CMakeLists.txt
@@ -0,0 +1,126 @@
+
+paludis_add_library(libpaludisresolver
+ STATIC_LIBRARY
+ "${CMAKE_CURRENT_SOURCE_DIR}/accumulate_deps.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/allow_choice_changes_helper.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/allowed_to_remove_helper.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/allowed_to_restart_helper.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/always_via_binary_helper.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/any_child_score.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/can_use_helper.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/change_by_resolvent.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/change_type.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/collect_depped_upon.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/collect_installed.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/collect_purges.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/collect_world.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/confirm_helper.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/constraint.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/decider.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/decision.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/decision_utils.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/decisions.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/destination.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/destination_types.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/destination_utils.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/find_replacing_helper.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/find_repository_for_helper.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/get_constraints_for_dependent_helper.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/get_constraints_for_purge_helper.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/get_constraints_for_via_binary_helper.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/get_destination_types_for_blocker_helper.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/get_destination_types_for_error_helper.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/get_initial_constraints_for_helper.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/get_resolvents_for_helper.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/get_sameness.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/get_use_existing_nothing_helper.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/has_behaviour.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/interest_in_spec_helper.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/job.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/job_list.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/job_lists.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/job_requirements.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/job_state.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/labels_classifier.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/make_destination_filtered_generator_helper.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/make_origin_filtered_generator_helper.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/make_uninstall_blocker.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/make_unmaskable_filter_helper.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/match_qpns.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/nag.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/order_early_helper.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/orderer.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/orderer_notes.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/package_id_comparator_with_promotion.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/package_or_block_dep_spec.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/prefer_or_avoid_helper.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/promote_binaries.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/promote_binaries_helper.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/reason.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/reason_utils.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/remove_hidden_helper.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/remove_if_dependent_helper.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/required_confirmations.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/resolution.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/resolutions_by_resolvent.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/resolved.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/resolvent.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/resolver.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/resolver_functions.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/same_slot.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/sanitised_dependencies.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/selection_with_promotion.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/slot_name_or_null.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/strongly_connected_component.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/suggest_restart.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/unsuitable_candidates.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/use_existing.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/why_changed_choices.cc"
+ SE_SOURCES
+ "${CMAKE_CURRENT_SOURCE_DIR}/any_child_score.se"
+ "${CMAKE_CURRENT_SOURCE_DIR}/change_type.se"
+ "${CMAKE_CURRENT_SOURCE_DIR}/decision.se"
+ "${CMAKE_CURRENT_SOURCE_DIR}/destination_types.se"
+ "${CMAKE_CURRENT_SOURCE_DIR}/job_requirements.se"
+ "${CMAKE_CURRENT_SOURCE_DIR}/nag.se"
+ "${CMAKE_CURRENT_SOURCE_DIR}/promote_binaries.se"
+ "${CMAKE_CURRENT_SOURCE_DIR}/resolver_functions.se"
+ "${CMAKE_CURRENT_SOURCE_DIR}/use_existing.se")
+target_link_libraries(libpaludisresolver
+ INTERFACE
+ ${CMAKE_THREAD_LIBS_INIT})
+
+paludis_add_library(libpaludisresolvertest
+ STATIC
+ "${CMAKE_CURRENT_SOURCE_DIR}/resolver_test.cc")
+# TODO(compnerd) create an object library for the SE_SOURCES that we can depend
+# on instead
+add_dependencies(libpaludisresolvertest libpaludisresolver_SE)
+
+foreach(test
+ any
+ binaries
+ continue_on_failure
+ errors
+ fetches
+ purges
+ blockers
+ cycles
+ serialisation
+ simple
+ subslots
+ suggestions
+ uninstalls)
+ paludis_add_test(resolver_TEST_${test} GTEST
+ LINK_LIBRARIES
+ libpaludisresolvertest
+ libpaludisresolver)
+endforeach()
+if(ENABLE_PBINS)
+ paludis_add_test(resolver_TEST_promote_binaries GTEST)
+ target_link_libraries(resolver_TEST_promote_binaries
+ PRIVATE
+ libpaludisresolvertest
+ libpaludisresolver)
+endif()
+
diff --git a/paludis/selinux/CMakeLists.txt b/paludis/selinux/CMakeLists.txt
new file mode 100644
index 0000000..64fc993
--- /dev/null
+++ b/paludis/selinux/CMakeLists.txt
@@ -0,0 +1,16 @@
+
+paludis_add_library(libpaludisselinux
+ "${CMAKE_CURRENT_SOURCE_DIR}/security_context.cc")
+target_link_libraries(libpaludisselinux
+ PRIVATE
+ ${CMAKE_DL_LIBS})
+
+install(FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/security_context.hh"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_INCLUDEDIR}/paludis-${PALUDIS_PKG_CONFIG_SLOT}/paludis/selinux")
+install(TARGETS
+ libpaludisselinux
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBDIR}")
+
diff --git a/paludis/syncers/CMakeLists.txt b/paludis/syncers/CMakeLists.txt
new file mode 100644
index 0000000..e13cc67
--- /dev/null
+++ b/paludis/syncers/CMakeLists.txt
@@ -0,0 +1,100 @@
+
+foreach(scheme bzr;bzr+aftp;bzr+file;bzr+ftp;bzr+http;bzr+https;bzr+lp;bzr+sftp;bzr+ssh)
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/dobzr.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/do${scheme}"
+ @ONLY)
+endforeach()
+foreach(scheme cvs+ext;cvs+pserver;cvs+ssh)
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/docvs.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/do${scheme}"
+ @ONLY)
+endforeach()
+foreach(scheme darcs+file;darcs+http;darcs+https;darcs+ssh)
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/dodarcs.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/do${scheme}"
+ @ONLY)
+endforeach()
+foreach(scheme git;git+file;git+http;git+https;git+rsync;git+ssh)
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/dogit.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/do${scheme}"
+ @ONLY)
+endforeach()
+foreach(scheme hg+file;hg+http;hg+https;hg+ssh;hg+static-http)
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/dohg.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/do${scheme}"
+ @ONLY)
+endforeach()
+foreach(scheme file;rsync;rsync+ssh)
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/dorsync.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/do${scheme}"
+ @ONLY)
+endforeach()
+foreach(scheme svn;svn+file;svn+http;svn+https;svn+ssh)
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/dosvn.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/do${scheme}"
+ @ONLY)
+endforeach()
+foreach(scheme tar+file;tar+ftp;tar+http;tar+https)
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/dotar.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/do${scheme}"
+ @ONLY)
+endforeach()
+
+add_custom_command(OUTPUT
+ "${CMAKE_CURRENT_BINARY_DIR}/.keep"
+ COMMAND
+ "${CMAKE_COMMAND}" -E touch "${CMAKE_CURRENT_BINARY_DIR}/.keep")
+# FIXME(compnerd) auto-generate the target
+add_custom_target(syncers-keep
+ ALL
+ DEPENDS
+ "${CMAKE_CURRENT_BINARY_DIR}/.keep")
+
+install(FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/dobzr"
+ "${CMAKE_CURRENT_BINARY_DIR}/dobzr+aftp"
+ "${CMAKE_CURRENT_BINARY_DIR}/dobzr+file"
+ "${CMAKE_CURRENT_BINARY_DIR}/dobzr+ftp"
+ "${CMAKE_CURRENT_BINARY_DIR}/dobzr+http"
+ "${CMAKE_CURRENT_BINARY_DIR}/dobzr+https"
+ "${CMAKE_CURRENT_BINARY_DIR}/dobzr+lp"
+ "${CMAKE_CURRENT_BINARY_DIR}/dobzr+sftp"
+ "${CMAKE_CURRENT_BINARY_DIR}/dobzr+ssh"
+ "${CMAKE_CURRENT_BINARY_DIR}/docvs+ext"
+ "${CMAKE_CURRENT_BINARY_DIR}/docvs+pserver"
+ "${CMAKE_CURRENT_BINARY_DIR}/docvs+ssh"
+ "${CMAKE_CURRENT_BINARY_DIR}/dodarcs+file"
+ "${CMAKE_CURRENT_BINARY_DIR}/dodarcs+http"
+ "${CMAKE_CURRENT_BINARY_DIR}/dodarcs+https"
+ "${CMAKE_CURRENT_BINARY_DIR}/dodarcs+ssh"
+ "${CMAKE_CURRENT_BINARY_DIR}/dofile"
+ "${CMAKE_CURRENT_BINARY_DIR}/dogit"
+ "${CMAKE_CURRENT_BINARY_DIR}/dogit+file"
+ "${CMAKE_CURRENT_BINARY_DIR}/dogit+http"
+ "${CMAKE_CURRENT_BINARY_DIR}/dogit+https"
+ "${CMAKE_CURRENT_BINARY_DIR}/dogit+rsync"
+ "${CMAKE_CURRENT_BINARY_DIR}/dogit+ssh"
+ "${CMAKE_CURRENT_BINARY_DIR}/dohg+file"
+ "${CMAKE_CURRENT_BINARY_DIR}/dohg+http"
+ "${CMAKE_CURRENT_BINARY_DIR}/dohg+https"
+ "${CMAKE_CURRENT_BINARY_DIR}/dohg+ssh"
+ "${CMAKE_CURRENT_BINARY_DIR}/dohg+static-http"
+ "${CMAKE_CURRENT_BINARY_DIR}/dorsync"
+ "${CMAKE_CURRENT_BINARY_DIR}/dorsync+ssh"
+ "${CMAKE_CURRENT_BINARY_DIR}/dosvn"
+ "${CMAKE_CURRENT_BINARY_DIR}/dosvn+file"
+ "${CMAKE_CURRENT_BINARY_DIR}/dosvn+http"
+ "${CMAKE_CURRENT_BINARY_DIR}/dosvn+https"
+ "${CMAKE_CURRENT_BINARY_DIR}/dosvn+ssh"
+ "${CMAKE_CURRENT_BINARY_DIR}/dotar+file"
+ "${CMAKE_CURRENT_BINARY_DIR}/dotar+ftp"
+ "${CMAKE_CURRENT_BINARY_DIR}/dotar+http"
+ "${CMAKE_CURRENT_BINARY_DIR}/dotar+https"
+ "${CMAKE_CURRENT_SOURCE_DIR}/dodummy"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/syncers")
+install(FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/.keep"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_DATADIR}/paludis/syncers")
+
diff --git a/paludis/util/CMakeLists.txt b/paludis/util/CMakeLists.txt
new file mode 100644
index 0000000..c8b1093
--- /dev/null
+++ b/paludis/util/CMakeLists.txt
@@ -0,0 +1,263 @@
+
+paludis_m4process(${CMAKE_CURRENT_SOURCE_DIR}/util.hh.m4
+ paludis_util_hh_TARGET)
+
+paludis_add_library(libpaludisutil
+ "${CMAKE_CURRENT_SOURCE_DIR}/active_object_ptr.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/buffer_output_stream.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/channel.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/config_file.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cookie.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/damerau_levenshtein.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/destringify.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/deferred_construction_ptr.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/digest_registry.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/discard_output_stream.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/elf.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/elf_dynamic_section.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/elf_relocation_section.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/elf_sections.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/elf_symbol_section.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/enum_iterator.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/env_var_names.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/exception.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/executor.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/extract_host_from_url.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/fs_iterator.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/fs_error.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/fs_path.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/fs_stat.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/graph.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/hashes.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/is_file_with_extension.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/log.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/make_named_values.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/map.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/md5.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/named_value.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/options.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/persona.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pipe.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pool.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pretty_print.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/process.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pty.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/realpath.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/return_literal_function.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/rmd160.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/safe_ifstream.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/safe_ofstream.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/sequence.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/set.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/sha1.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/sha256.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/sha512.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/simple_parser.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/string_list_stream.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/strip.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/system.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/tail_output_stream.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/tee_output_stream.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/thread_pool.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/timestamp.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/tokeniser.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/tribool.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/type_list.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/upper_lower.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/visitor.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/visitor_cast.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/whirlpool.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/wildcard_expander.cc"
+ SE_SOURCES
+ "${CMAKE_CURRENT_SOURCE_DIR}/config_file.se"
+ "${CMAKE_CURRENT_SOURCE_DIR}/fs_iterator.se"
+ "${CMAKE_CURRENT_SOURCE_DIR}/fs_path.se"
+ "${CMAKE_CURRENT_SOURCE_DIR}/is_file_with_extension.se"
+ "${CMAKE_CURRENT_SOURCE_DIR}/log.se")
+add_dependencies(libpaludisutil ${paludis_util_hh_TARGET})
+target_link_libraries(libpaludisutil
+ PRIVATE
+ ${CMAKE_THREAD_LIBS_INIT}
+ ${CMAKE_DL_LIBS})
+
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/echo_functions.bash.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/echo_functions.bash"
+ @ONLY)
+
+add_executable(outputwrapper
+ "${CMAKE_CURRENT_SOURCE_DIR}/output_wrapper.cc")
+
+foreach(test
+ active_object_ptr
+ byte_swap
+ create_iterator
+ damerau_levenshtein
+ destringify
+ deferred_construction_ptr
+ enum_iterator
+ extract_host_from_url
+ graph
+ hashes
+ iterator_funcs
+ indirect_iterator
+ join
+ log
+ member_iterator
+ md5
+ options
+ pool
+ pretty_print
+ pty
+ return_literal_function
+ rmd160
+ save
+ sha1
+ sha256
+ sha512
+ simple_parser
+ singleton
+ stream_holder
+ stringify
+ strip
+ system
+ tail_output_stream
+ thread_pool
+ tokeniser
+ tribool
+ whirlpool
+ wrapped_forward_iterator
+ wrapped_value)
+ paludis_add_test(${test} GTEST)
+endforeach()
+
+foreach(test
+ config_file
+ fs_iterator
+ fs_path
+ fs_stat
+ is_file_with_extension
+ process
+ realpath
+ safe_ifstream
+ safe_ofstream
+ wildcard_expander)
+ paludis_add_test(${test} GTEST)
+endforeach()
+
+foreach(test buffer_output_stream;string_list_stream)
+ paludis_add_test(${test} GTEST
+ LINK_LIBRARIES
+ ${CMAKE_THREAD_LIBS_INIT})
+endforeach()
+
+install(TARGETS
+ libpaludisutil
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBDIR}")
+install(FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/active_object_ptr.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/attributes.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/buffer_output_stream.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/byte_swap.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/channel.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/checked_delete.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/clone.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/config_file.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cookie.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/create_iterator.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/damerau_levenshtein.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/destringify.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/deferred_construction_ptr.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/digest_registry.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/discard_output_stream.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/elf.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/elf_dynamic_section.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/elf_relocation_section.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/elf_sections.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/elf_symbol_section.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/elf_types.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/enum_iterator.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/env_var_names.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/exception.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/executor.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/extract_host_from_url.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/fd_holder.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/fs_iterator.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/fs_error.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/fs_path.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/fs_stat.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/graph.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/hashes.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/iterator_funcs.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/iterator_range.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/indirect_iterator.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/is_file_with_extension.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/join.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/log.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/make_named_values.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/make_shared_copy.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/map.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/member_iterator.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/md5.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/named_value.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/no_type.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/operators.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/options.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/persona.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pimp.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pipe.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pool.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pretty_print.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/process.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pty.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/realpath.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/remove_shared_ptr.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/return_literal_function.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/rmd160.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/safe_ifstream.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/safe_ofstream.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/save.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/sequence.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/set.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/sha1.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/sha256.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/sha512.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/simple_parser.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/singleton.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/stream_holder.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/stringify.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/string_list_stream.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/strip.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/system.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/tail_output_stream.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/tee_output_stream.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/thread_pool.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/timestamp.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/tokeniser.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/tribool.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/type_list.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/upper_lower.hh"
+ "${CMAKE_CURRENT_BINARY_DIR}/util.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/visitor.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/visitor_cast.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/whirlpool.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/wildcard_expander.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/wrapped_forward_iterator.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/wrapped_output_iterator.hh"
+ "${CMAKE_CURRENT_SOURCE_DIR}/wrapped_value.hh"
+ "${CMAKE_CURRENT_BINARY_DIR}/config_file-se.hh"
+ "${CMAKE_CURRENT_BINARY_DIR}/fs_iterator-se.hh"
+ "${CMAKE_CURRENT_BINARY_DIR}/fs_path-se.hh"
+ "${CMAKE_CURRENT_BINARY_DIR}/is_file_with_extension-se.hh"
+ "${CMAKE_CURRENT_BINARY_DIR}/log-se.hh"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_INCLUDEDIR}/paludis-${PALUDIS_PKG_CONFIG_SLOT}/paludis/util")
+install(FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/echo_functions.bash"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis")
+install(TARGETS
+ outputwrapper
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBEXECDIR}/paludis/utils")
+
diff --git a/pkg-config/CMakeLists.txt b/pkg-config/CMakeLists.txt
new file mode 100644
index 0000000..abd0cf7
--- /dev/null
+++ b/pkg-config/CMakeLists.txt
@@ -0,0 +1,14 @@
+
+set(PALUDIS_PKG_CONFIG_CFLAGS)
+set(PALUDIS_PKG_CONFIG_LIBS
+ "-lpaludis_${PALUDIS_PKG_CONFIG_SLOT} -lpaludisutil_${PALUDIS_PKG_CONFIG_SLOT} -lpaludisargs_${PALUDIS_PKG_CONFIG_SLOT} ${CMAKE_THREAD_LIBS_INIT}")
+
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/paludis.pc.cmake"
+ "${CMAKE_CURRENT_BINARY_DIR}/paludis.pc"
+ @ONLY)
+
+install(FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/paludis.pc"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig")
+
diff --git a/pkg-config/paludis.pc.cmake b/pkg-config/paludis.pc.cmake
new file mode 100644
index 0000000..c0af433
--- /dev/null
+++ b/pkg-config/paludis.pc.cmake
@@ -0,0 +1,11 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+libdir=@CMAKE_INSTALL_FULL_LIBDIR@
+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
+
+Name: Paludis
+Description: The Other Package Mangler
+Version: @PALUDIS_PC_SLOT@
+Libs: -L${libdir} @PALUDIS_PKG_CONFIG_LIBS@
+Cflags: -I${includedir} @PALUDIS_PKG_CONFIG_CFLAGS@
+
diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
new file mode 100644
index 0000000..7ff904a
--- /dev/null
+++ b/python/CMakeLists.txt
@@ -0,0 +1,131 @@
+
+if(CXX_SUPPORTS_FNO_STRICT_ALIASING)
+ add_compile_options(-fno-strict-aliasing)
+endif()
+
+if(ENABLE_PYTHON)
+ paludis_add_library(libpaludispython
+ "${CMAKE_CURRENT_SOURCE_DIR}/about.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/action.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/choices.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/contents.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/dep_label.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/dep_spec.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/environment.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/exception.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/filter.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/filtered_generator.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/fs_path.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/generator.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/mask.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/match_package.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/metadata_key.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/mutex.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/name.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/log.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/package_id.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/repository.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/selection.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/slot_requirement.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/version_operator.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/version_requirements.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/version_spec.cc"
+ NN_SOURCES
+ "${CMAKE_CURRENT_SOURCE_DIR}/nice_names.nn")
+ if(CXX_SUPPORTS_G0)
+ target_compile_options(libpaludispython
+ PRIVATE
+ -g0)
+ endif()
+ target_include_directories(libpaludispython
+ PRIVATE
+ ${PYTHON_INCLUDE_DIRS}
+ ${Boost_INCLUDE_DIRS})
+ target_link_libraries(libpaludispython
+ PRIVATE
+ libpaludis)
+
+ paludis_add_library(paludis UNVERSIONED SHARED_LIBRARY
+ "${CMAKE_CURRENT_SOURCE_DIR}/paludis_python_so.cc")
+ target_include_directories(paludis
+ PRIVATE
+ ${PYTHON_INCLUDE_DIRS}
+ ${Boost_INCLUDE_DIRS})
+ target_link_libraries(paludis
+ PRIVATE
+ ${Boost_LIBRARIES}
+ ${PYTHON_LIBRARIES}
+ libpaludispython)
+ set_target_properties(paludis PROPERTIES
+ OUTPUT_NAME
+ paludis
+ PREFIX
+ "")
+
+ paludis_add_library(libadditionaltests
+ "${CMAKE_CURRENT_SOURCE_DIR}/additional_tests.cc")
+ target_include_directories(libadditionaltests
+ PRIVATE
+ ${PYTHON_INCLUDE_DIRS}
+ ${Boost_INCLUDE_DIRS})
+ target_link_libraries(libadditionaltests
+ PRIVATE
+ libpaludispython)
+
+ paludis_add_library(additional_tests UNVERSIONED SHARED_LIBRARY
+ "${CMAKE_CURRENT_SOURCE_DIR}/additional_tests_so.cc")
+ target_include_directories(additional_tests
+ PRIVATE
+ ${PYTHON_INCLUDE_DIRS}
+ ${Boost_INCLUDE_DIRS})
+ target_link_libraries(additional_tests
+ PRIVATE
+ ${Boost_PYTHON_LIBRARY}
+ libadditionaltests)
+ set_target_properties(additional_tests PROPERTIES
+ OUTPUT_NAME
+ additional_Tests
+ PREFIX
+ "")
+
+ foreach(test
+ action
+ contents
+ dep_label
+ dep_spec
+ filter
+ filtered_generator
+ generator
+ log
+ name
+ selection
+ version_operator
+ version_requirements
+ version_spec)
+ paludis_add_test(${test} PYTHON)
+ endforeach()
+
+ foreach(test
+ choices
+ environment
+ mask
+ metadata_key
+ package_id
+ repository)
+ paludis_add_test(${test} PYTHON)
+ endforeach()
+
+ install(TARGETS
+ libpaludispython
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBDIR}")
+ install(TARGETS
+ paludis
+ DESTINATION
+ "${PALUDIS_PYTHON_INSTALL_DIR}")
+ install(FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/paludis_output_wrapper.py"
+ DESTINATION
+ "${PALUDIS_PYTHON_INSTALL_DIR}")
+endif()
+
diff --git a/ruby/CMakeLists.txt b/ruby/CMakeLists.txt
new file mode 100644
index 0000000..99ab613
--- /dev/null
+++ b/ruby/CMakeLists.txt
@@ -0,0 +1,85 @@
+
+if(ENABLE_RUBY)
+ include_directories(${CMAKE_CURRENT_BINARY_DIR})
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+
+ paludis_add_library(libpaludisruby
+ "${CMAKE_CURRENT_SOURCE_DIR}/action.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/choice.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/contents.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/dep_label.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/dep_spec.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/environment.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/filter.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/filtered_generator.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/generator.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/log.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/mask.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/metadata_key.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/name.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/package_id.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/paludis_ruby.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/qualified_package_name.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/repository.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/selection.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/version_spec.cc"
+ NN_SOURCES
+ "${CMAKE_CURRENT_SOURCE_DIR}/nice_names.nn")
+ target_include_directories(libpaludisruby SYSTEM
+ PRIVATE
+ ${RUBY_INCLUDE_DIRS})
+ target_link_libraries(libpaludisruby
+ PRIVATE
+ libpaludis
+ libpaludisutil
+ ${CMAKE_THREAD_LIBS_INIT})
+
+ paludis_add_library(Paludis UNVERSIONED SHARED_LIBRARY
+ "${CMAKE_CURRENT_SOURCE_DIR}/paludis_ruby_so.cc")
+ target_include_directories(Paludis SYSTEM
+ PRIVATE
+ ${RUBY_INCLUDE_DIRS})
+ target_link_libraries(Paludis
+ PRIVATE
+ libpaludisruby)
+ set_target_properties(Paludis PROPERTIES
+ OUTPUT_NAME
+ Paludis
+ PREFIX
+ "")
+
+ foreach(test
+ contents
+ filter
+ filtered_generator
+ log
+ qualified_package_name
+ selection
+ version_spec)
+ paludis_add_test(${test} RUBY)
+ endforeach()
+
+ foreach(test
+ action
+ choice
+ dep_spec
+ environment
+ generator
+ package_id
+ paludis_ruby
+ repository)
+ paludis_add_test(${test} RUBY)
+ endforeach()
+
+ add_subdirectory(demos)
+
+ install(TARGETS
+ libpaludisruby
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBDIR}")
+ install(TARGETS
+ Paludis
+ DESTINATION
+ "${PALUDIS_RUBY_INSTALL_DIR}")
+endif()
+
diff --git a/ruby/demos/CMakeLists.txt b/ruby/demos/CMakeLists.txt
new file mode 100644
index 0000000..5f5294d
--- /dev/null
+++ b/ruby/demos/CMakeLists.txt
@@ -0,0 +1,18 @@
+
+if(ENABLE_RUBY)
+ install(CODE
+ "
+ execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink \"${CMAKE_INSTALL_FULL_DATADIR}/paludis/ruby/demos/playman.rb\" \"${CMAKE_CURRENT_BINARY_DIR}/playman\")
+ ")
+ install(FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/version_spec_distributions.rb"
+ "${CMAKE_CURRENT_SOURCE_DIR}/latest_stable.rb"
+ "${CMAKE_CURRENT_SOURCE_DIR}/playman.rb"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_DATADIR}/paludis/ruby/demos")
+ install(FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/playman"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_BINDIR}")
+endif()
+
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644
index 0000000..398dd23
--- /dev/null
+++ b/src/CMakeLists.txt
@@ -0,0 +1,10 @@
+
+if(PALUDIS_COLOUR_PINK)
+ add_definitions(-DPALUDIS_COLOUR_PINK=0)
+else()
+ add_definitions(-DPALUDIS_COLOUR_PINK=1)
+endif()
+
+add_subdirectory(output)
+add_subdirectory(clients)
+
diff --git a/src/clients/CMakeLists.txt b/src/clients/CMakeLists.txt
new file mode 100644
index 0000000..03ba77b
--- /dev/null
+++ b/src/clients/CMakeLists.txt
@@ -0,0 +1,5 @@
+
+foreach(client ${PALUDIS_CLIENTS})
+ add_subdirectory(${client})
+endforeach()
+
diff --git a/src/clients/cave/CMakeLists.txt b/src/clients/cave/CMakeLists.txt
new file mode 100644
index 0000000..4611268
--- /dev/null
+++ b/src/clients/cave/CMakeLists.txt
@@ -0,0 +1,304 @@
+
+paludis_add_library(libcave
+ STATIC_LIBRARY
+ "${CMAKE_CURRENT_SOURCE_DIR}/colour_pretty_printer.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/command.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/command_line.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/command_command_line.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/command_factory.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_contents.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_config.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_digest.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_display_resolution.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_dump_cave_formats_conf.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_executables.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_execute_resolution.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_find_candidates.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_fix_cache.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_fix_linkage.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_generate_metadata.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_graph_jobs.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_has_version.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_help.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_import.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_info.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_manage_search_index.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_match.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_mirror.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_owner.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_perform.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_print_best_version.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_print_categories.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_print_checksum.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_print_checksum_algorithms.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_print_commands.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_print_dependent_ids.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_print_environment_metadata.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_print_id_actions.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_print_id_contents.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_print_id_environment_variable.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_print_id_executables.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_print_id_masks.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_print_id_metadata.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_print_id_size.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_print_ids.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_print_owners.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_print_packages.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_print_repositories.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_print_repository_formats.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_print_repository_metadata.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_print_resolution_required_confirmations.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_print_set.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_print_sets.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_print_spec.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_print_sync_protocols.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_print_unmanaged_files.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_print_unused_distfiles.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_purge.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_report.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_resolve.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_resolve_display_callback.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_resolve_dump.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_resume.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_search.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_search_cmdline.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_show.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_size.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_sync.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_sync_protocol_options.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_uninstall.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_update_world.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmd_verify.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/colours.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/exceptions.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/executables_common.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/format_package_id.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/format_plain_contents_entry.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/format_plain_metadata_key.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/format_string.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/format_user_config.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/script_command.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/search_extras_handle.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/select_format_for_spec.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/owner_common.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/parse_spec_with_nice_error.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/resolve_cmdline.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/resolve_common.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/resume_data.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/size_common.cc")
+
+paludis_add_library(libcavematchextras
+ "${CMAKE_CURRENT_SOURCE_DIR}/match_extras.cc")
+target_link_libraries(libcavematchextras
+ PRIVATE
+ ${PCRECPP_LIBRARIES})
+
+if(ENABLE_SEARCH_INDEX)
+ paludis_add_library(libcavesearchextras
+ "${CMAKE_CURRENT_SOURCE_DIR}/search_extras.cc")
+ target_compile_definitions(libcavesearchextras
+ PRIVATE
+ -DENABLE_SEARCH_INDEX=1)
+ target_link_libraries(libcavesearchextras
+ PRIVATE
+ ${SQLite3_LIBRARIES})
+endif()
+
+add_executable(cave
+ "${CMAKE_CURRENT_SOURCE_DIR}/cave.cc")
+target_link_libraries(cave
+ PRIVATE
+ libcave
+ libpaludis
+ libpaludisargs
+ libpaludisutil
+ libpaludisresolver
+ liboutput
+ ${CMAKE_DL_LIBS})
+
+set(CAVE_SUBCOMMANDS
+ config
+ contents
+ digest
+ display-resolution
+ dump-cave-formats-conf
+ executables
+ execute-resolution
+ find-candidates
+ fix-cache
+ fix-linkage
+ generate-metadata
+ graph-jobs
+ has-version
+ help
+ import
+ info
+ manage-search-index
+ match
+ mirror
+ owner
+ perform
+ print-best-version
+ print-categories
+ print-checksum
+ print-checksum-algorithms
+ print-commands
+ print-dependent-ids
+ print-environment-metadata
+ print-id-actions
+ print-id-contents
+ print-id-environment-variable
+ print-id-executables
+ print-id-masks
+ print-id-metadata
+ print-id-size
+ print-ids
+ print-owners
+ print-packages
+ print-repositories
+ print-repository-formats
+ print-repository-metadata
+ print-resolution-required-confirmations
+ print-set
+ print-sets
+ print-spec
+ print-sync-protocols
+ print-unmanaged-files
+ print-unused-distfiles
+ purge
+ report
+ resolve
+ resume
+ search
+ show
+ size
+ sync
+ sync-protocol-options
+ uninstall
+ update-world
+ verify)
+
+if(NOT USE_PREBUILT_DOCUMENTATION)
+ add_executable(man-cave
+ "${CMAKE_CURRENT_SOURCE_DIR}/man_cave.cc")
+ target_link_libraries(man-cave
+ PRIVATE
+ libcave
+ libpaludis
+ libpaludisargs
+ libpaludisutil
+ libpaludisresolver
+ ${CMAKE_DL_LIBS})
+
+ add_custom_command(OUTPUT
+ "${CMAKE_CURRENT_BINARY_DIR}/cave.txt"
+ COMMAND
+ man-cave > "${CMAKE_CURRENT_BINARY_DIR}/cave.txt"
+ DEPENDS
+ man-cave)
+ add_custom_command(OUTPUT
+ "${CMAKE_CURRENT_BINARY_DIR}/cave.xml"
+ COMMAND
+ asciidoc --doctype=manpage --backend=docbook --out-file "${CMAKE_CURRENT_BINARY_DIR}/cave.xml" --conf "${PROJECT_SOURCE_DIR}/misc/asciidoc.conf" "${CMAKE_CURRENT_BINARY_DIR}/cave.txt"
+ DEPENDS
+ "${PROJECT_SOURCE_DIR}/misc/asciidoc.conf"
+ "${CMAKE_CURRENT_BINARY_DIR}/cave.txt")
+ add_custom_command(OUTPUT
+ "${CMAKE_CURRENT_BINARY_DIR}/cave.1"
+ COMMAND
+ xmlto man "${CMAKE_CURRENT_BINARY_DIR}/cave.xml"
+ DEPENDS
+ "${CMAKE_CURRENT_BINARY_DIR}/cave.xml")
+ add_custom_command(OUTPUT
+ "${CMAKE_CURRENT_BINARY_DIR}/cave.html-man-fragment"
+ COMMAND
+ xmlto -o "${CMAKE_CURRENT_BINARY_DIR}/cave.html-man-fragment-dir" html "${CMAKE_CURRENT_BINARY_DIR}/cave.xml"
+ COMMAND
+ "${SED_EXECUTABLE}" -e "'1s,^.*\\(<div class=\"refnameddiv\">\\),\\1,'" -e "'$$s,</body>.*,,'" -e "'$$s,</dev><div class=\"navfooter\"><hr></div>,,'" -e "'s,<a name=\"[^\"]*\"></a>,,g'" < "${CMAKE_CURRENT_BINARY_DIR}/cave.html-man-fragment-dir/index.html" > "${CMAKE_CURRENT_BINARY_DIR}/cave.html-man-fragment"
+ BYPRODUCTS
+ "${CMAKE_CURRENT_BINARY_DIR}/cave.html-man-fragment-dir/cave.proc"
+ "${CMAKE_CURRENT_BINARY_DIR}/cave.html-man-fragment-dir/index.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/cave.html-man-fragment-dir"
+ DEPENDS
+ "${CMAKE_CURRENT_BINARY_DIR}/cave.xml")
+
+ foreach(subcommand ${CAVE_SUBCOMMANDS})
+ add_custom_command(OUTPUT
+ "${CMAKE_CURRENT_BINARY_DIR}/cave-${subcommand}.txt"
+ COMMAND
+ man-cave ${subcommand} > "${CMAKE_CURRENT_BINARY_DIR}/cave-${subcommand}.txt"
+ DEPENDS
+ man-cave)
+ add_custom_command(OUTPUT
+ "${CMAKE_CURRENT_BINARY_DIR}/cave-${subcommand}.xml"
+ COMMAND
+ asciidoc --doctype=manpage --backend=docbook --out-file "${CMAKE_CURRENT_BINARY_DIR}/cave-${subcommand}.xml" --conf "${PROJECT_SOURCE_DIR}/misc/asciidoc.conf" "${CMAKE_CURRENT_BINARY_DIR}/cave-${subcommand}.txt"
+ DEPENDS
+ "${PROJECT_SOURCE_DIR}/misc/asciidoc.conf"
+ "${CMAKE_CURRENT_BINARY_DIR}/cave-${subcommand}.txt")
+ add_custom_command(OUTPUT
+ "${CMAKE_CURRENT_BINARY_DIR}/cave-${subcommand}.1"
+ COMMAND
+ xmlto man "${CMAKE_CURRENT_BINARY_DIR}/cave-${subcommand}.xml"
+ DEPENDS
+ "${CMAKE_CURRENT_BINARY_DIR}/cave-${subcommand}.xml")
+ add_custom_command(OUTPUT
+ "${CMAKE_CURRENT_BINARY_DIR}/cave-${subcommand}.html-man-fragment"
+ COMMAND
+ xmlto -o "${CMAKE_CURRENT_BINARY_DIR}/cave-${subcommand}.html-man-fragment-dir" html "${CMAKE_CURRENT_BINARY_DIR}/cave-${subcommand}.xml"
+ COMMAND
+ "${SED_EXECUTABLE}" -e "'1s,^.*\\(<div class=\"refnameddiv\">\\),\\1,'" -e "'$$s,</body>.*,,'" -e "'$$s,</dev><div class=\"navfooter\"><hr></div>,,'" -e "'s,<a name=\"[^\"]*\"></a>,,g'" < "${CMAKE_CURRENT_BINARY_DIR}/cave-${subcommand}.html-man-fragment-dir/index.html" > "${CMAKE_CURRENT_BINARY_DIR}/cave-${subcommand}.html-man-fragment"
+ BYPRODUCTS
+ "${CMAKE_CURRENT_BINARY_DIR}/cave-${subcommand}.html-man-fragment-dir/cave-${subcommand}.proc"
+ "${CMAKE_CURRENT_BINARY_DIR}/cave-${subcommand}.html-man-fragment-dir/index.html"
+ "${CMAKE_CURRENT_BINARY_DIR}/cave-${subcommand}.html-man-fragment-dir"
+ DEPENDS
+ "${CMAKE_CURRENT_BINARY_DIR}/cave-${subcommand}.xml")
+ endforeach()
+
+ set(html-fragments "${CMAKE_CURRENT_BINARY_DIR}/cave.html-man-fragment")
+ set(manpages "${CMAKE_CURRENT_BINARY_DIR}/cave.1")
+ foreach(subcommand ${CAVE_SUBCOMMANDS})
+ list(APPEND html-fragments "${CMAKE_CURRENT_BINARY_DIR}/cave-${subcommand}.html-man-fragment")
+ list(APPEND manpages "${CMAKE_CURRENT_BINARY_DIR}/cave-${subcommand}.1")
+ endforeach()
+ add_custom_target(cave-manpages
+ ALL
+ DEPENDS
+ ${manpages})
+ add_custom_target(cave-html-man-fragments
+ DEPENDS
+ ${html-fragments})
+endif()
+
+paludis_add_test(continue_on_failure BASH)
+
+install(TARGETS
+ cave
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_BINDIR}")
+install(TARGETS
+ libcavematchextras
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBDIR}")
+if(ENABLE_SEARCH_INDEX)
+ install(TARGETS
+ libcavesearchextras
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBDIR}")
+endif()
+install(FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/cave.1"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_MANDIR}/man1")
+foreach(subcommand ${CAVE_SUBCOMMANDS})
+ install(FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/cave-${subcommand}.1"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_MANDIR}/man1")
+endforeach()
+install(FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/moo"
+ DESTINATION
+ "${CMAKE_INSTALL_FULL_LIBEXECDIR}/cave/commands")
+
diff --git a/src/output/CMakeLists.txt b/src/output/CMakeLists.txt
new file mode 100644
index 0000000..6f38c48
--- /dev/null
+++ b/src/output/CMakeLists.txt
@@ -0,0 +1,6 @@
+
+paludis_add_library(liboutput
+ STATIC_LIBRARY
+ "${CMAKE_CURRENT_SOURCE_DIR}/colour.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/colour_pretty_printer.cc")
+
diff --git a/vim/CMakeLists.txt b/vim/CMakeLists.txt
new file mode 100644
index 0000000..635ed0e
--- /dev/null
+++ b/vim/CMakeLists.txt
@@ -0,0 +1,4 @@
+
+add_subdirectory(ftdetect)
+add_subdirectory(syntax)
+
diff --git a/vim/ftdetect/CMakeLists.txt b/vim/ftdetect/CMakeLists.txt
new file mode 100644
index 0000000..c79b131
--- /dev/null
+++ b/vim/ftdetect/CMakeLists.txt
@@ -0,0 +1,10 @@
+
+if(ENABLE_VIM)
+ install(FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/paludis.vim"
+ DESTINATION
+ "${PALUDIS_VIM_INSTALL_DIR}/ftdetect"
+ COMPONENT
+ vim)
+endif()
+
diff --git a/vim/syntax/CMakeLists.txt b/vim/syntax/CMakeLists.txt
new file mode 100644
index 0000000..1dff1e8
--- /dev/null
+++ b/vim/syntax/CMakeLists.txt
@@ -0,0 +1,18 @@
+
+if(ENABLE_VIM)
+ install(FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/paludis-general-conf.vim"
+ "${CMAKE_CURRENT_SOURCE_DIR}/paludis-keywords-conf.vim"
+ "${CMAKE_CURRENT_SOURCE_DIR}/paludis-licenses-conf.vim"
+ "${CMAKE_CURRENT_SOURCE_DIR}/paludis-mirrors-conf.vim"
+ "${CMAKE_CURRENT_SOURCE_DIR}/paludis-output-conf.vim"
+ "${CMAKE_CURRENT_SOURCE_DIR}/paludis-package-mask-conf.vim"
+ "${CMAKE_CURRENT_SOURCE_DIR}/paludis-repositories-conf.vim"
+ "${CMAKE_CURRENT_SOURCE_DIR}/paludis-suggestions-conf.vim"
+ "${CMAKE_CURRENT_SOURCE_DIR}/paludis-use-conf.vim"
+ DESTINATION
+ "${PALUDIS_VIM_INSTALL_DIR}/syntax"
+ COMPONENT
+ vim)
+endif()
+
diff --git a/zsh-completion/CMakeLists.txt b/zsh-completion/CMakeLists.txt
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/zsh-completion/CMakeLists.txt
@@ -0,0 +1 @@
+