diff options
author | Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> | 2020-12-26 04:00:00 +0000 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2020-12-27 13:39:12 -0500 |
commit | 3f3756b5e3919e295b2751523e2291fb41686d4a (patch) | |
tree | 4ac41bb6a556ebc95d57bcc8461b10ca249d0abd /app-i18n/opencc/files | |
parent | app-i18n/opencc: Version bump (1.1.1). (diff) | |
download | gentoo-3f3756b5e3919e295b2751523e2291fb41686d4a.tar.gz gentoo-3f3756b5e3919e295b2751523e2291fb41686d4a.tar.bz2 gentoo-3f3756b5e3919e295b2751523e2291fb41686d4a.zip |
app-i18n/opencc: Use system libraries.
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'app-i18n/opencc/files')
-rw-r--r-- | app-i18n/opencc/files/opencc-1.1.1-system_libraries.patch | 94 | ||||
-rw-r--r-- | app-i18n/opencc/files/opencc-1.1.2-system_libraries.patch | 111 |
2 files changed, 205 insertions, 0 deletions
diff --git a/app-i18n/opencc/files/opencc-1.1.1-system_libraries.patch b/app-i18n/opencc/files/opencc-1.1.1-system_libraries.patch new file mode 100644 index 000000000000..ee0527f22356 --- /dev/null +++ b/app-i18n/opencc/files/opencc-1.1.1-system_libraries.patch @@ -0,0 +1,94 @@ +https://github.com/BYVoid/OpenCC/issues/547 + +--- /CMakeLists.txt ++++ /CMakeLists.txt +@@ -28,7 +28,12 @@ + option(ENABLE_GTEST "Build all tests." OFF) + option(ENABLE_BENCHMARK "Build benchmark tests." OFF) + option(ENABLE_DARTS "Build DartsDict (ocd format)." ON) +-option(BUILD_BUNDLED_LIBMARISA "" ON) ++option(USE_SYSTEM_DARTS "Use system version of Darts" OFF) ++option(USE_SYSTEM_GOOGLE_BENCHMARK "Use system version of Google Benchmark" OFF) ++option(USE_SYSTEM_GTEST "Use system version of GoogleTest" OFF) ++option(USE_SYSTEM_MARISA "Use system version of Marisa" OFF) ++option(USE_SYSTEM_RAPIDJSON "Use system version of RapidJSON" OFF) ++option(USE_SYSTEM_TCLAP "Use system version of TCLAP" OFF) + + ######## Package information + set (PACKAGE_URL https://github.com/BYVoid/Opencc) +@@ -172,7 +177,7 @@ + + ######## Dependencies + +-if(BUILD_BUNDLED_LIBMARISA) ++if(NOT USE_SYSTEM_MARISA) + message(STATUS "Use bundled marisa library.") + add_subdirectory(deps/marisa-0.2.5) + else() +@@ -194,12 +199,16 @@ + ######## Testing + + if (ENABLE_GTEST) +- add_subdirectory(deps/gtest-1.11.0) ++ if(NOT USE_SYSTEM_GTEST) ++ add_subdirectory(deps/gtest-1.11.0) ++ endif() + enable_testing() + endif() + + if (ENABLE_BENCHMARK) + set(BENCHMARK_ENABLE_TESTING OFF) +- add_subdirectory(deps/google-benchmark) ++ if(NOT USE_SYSTEM_GOOGLE_BENCHMARK) ++ add_subdirectory(deps/google-benchmark) ++ endif() + enable_testing() + endif() +--- /src/CMakeLists.txt ++++ /src/CMakeLists.txt +@@ -1,7 +1,13 @@ + include (GenerateExportHeader) +-include_directories(../deps/marisa-0.2.5/include) +-include_directories(../deps/rapidjson-1.1.0) +-include_directories(../deps/tclap-1.2.2) ++if(NOT USE_SYSTEM_MARISA) ++ include_directories(../deps/marisa-0.2.5/include) ++endif() ++if(NOT USE_SYSTEM_RAPIDJSON) ++ include_directories(../deps/rapidjson-1.1.0) ++endif() ++if(NOT USE_SYSTEM_TCLAP) ++ include_directories(../deps/tclap-1.2.2) ++endif() + + # Library + +@@ -72,7 +78,9 @@ + ) + + if (ENABLE_DARTS) +- include_directories(../deps/darts-clone) ++ if(NOT USE_SYSTEM_DARTS) ++ include_directories(../deps/darts-clone) ++ endif() + set( + LIBOPENCC_HEADERS + ${LIBOPENCC_HEADERS} +--- /test/CMakeLists.txt ++++ /test/CMakeLists.txt +@@ -1,4 +1,3 @@ +-include_directories(../deps/libdarts/src) + include_directories(../src) + + set(CONFIG_TEST +@@ -27,7 +26,9 @@ + ) + endif() + +- include_directories(../deps/gtest-1.7.0/include) ++ if(NOT USE_SYSTEM_GTEST) ++ include_directories(../deps/gtest-1.7.0/include) ++ endif() + set(UNITTESTS + CommandLineConvertTest + ) diff --git a/app-i18n/opencc/files/opencc-1.1.2-system_libraries.patch b/app-i18n/opencc/files/opencc-1.1.2-system_libraries.patch new file mode 100644 index 000000000000..e0b624a63e9f --- /dev/null +++ b/app-i18n/opencc/files/opencc-1.1.2-system_libraries.patch @@ -0,0 +1,111 @@ +https://github.com/BYVoid/OpenCC/issues/547 + +--- /CMakeLists.txt ++++ /CMakeLists.txt +@@ -28,8 +28,14 @@ + option(ENABLE_GTEST "Build all tests." OFF) + option(ENABLE_BENCHMARK "Build benchmark tests." OFF) + option(ENABLE_DARTS "Build DartsDict (ocd format)." ON) +-option(BUILD_BUNDLED_LIBMARISA "" ON) + option(BUILD_PYTHON "Build python library" OFF) ++option(USE_SYSTEM_DARTS "Use system version of Darts" OFF) ++option(USE_SYSTEM_GOOGLE_BENCHMARK "Use system version of Google Benchmark" OFF) ++option(USE_SYSTEM_GTEST "Use system version of GoogleTest" OFF) ++option(USE_SYSTEM_MARISA "Use system version of Marisa" OFF) ++option(USE_SYSTEM_PYBIND11 "Use system version of pybind11" OFF) ++option(USE_SYSTEM_RAPIDJSON "Use system version of RapidJSON" OFF) ++option(USE_SYSTEM_TCLAP "Use system version of TCLAP" OFF) + + ######## Package information + set (PACKAGE_URL https://github.com/BYVoid/Opencc) +@@ -173,7 +179,7 @@ + + ######## Dependencies + +-if(BUILD_BUNDLED_LIBMARISA) ++if(NOT USE_SYSTEM_MARISA) + message(STATUS "Use bundled marisa library.") + add_subdirectory(deps/marisa-0.2.5) + else() +@@ -195,20 +201,30 @@ + ######## Testing + + if (ENABLE_GTEST) +- add_subdirectory(deps/gtest-1.11.0) ++ if(NOT USE_SYSTEM_GTEST) ++ add_subdirectory(deps/gtest-1.11.0) ++ endif() + enable_testing() + endif() + + if (ENABLE_BENCHMARK) + set(BENCHMARK_ENABLE_TESTING OFF) +- add_subdirectory(deps/google-benchmark) ++ if(NOT USE_SYSTEM_GOOGLE_BENCHMARK) ++ add_subdirectory(deps/google-benchmark) ++ endif() + enable_testing() + endif() + + ######## Python + + if (BUILD_PYTHON) +- add_subdirectory(deps/pybind11-2.5.0) ++ if(USE_SYSTEM_PYBIND11) ++ include(pybind11Config) ++ include(pybind11Common) ++ include(pybind11Tools) ++ else() ++ add_subdirectory(deps/pybind11-2.5.0) ++ endif() + pybind11_add_module(opencc_clib src/py_opencc.cpp) + target_link_libraries(opencc_clib PRIVATE libopencc) + endif() +--- /src/CMakeLists.txt ++++ /src/CMakeLists.txt +@@ -1,7 +1,13 @@ + include (GenerateExportHeader) +-include_directories(../deps/marisa-0.2.5/include) +-include_directories(../deps/rapidjson-1.1.0) +-include_directories(../deps/tclap-1.2.2) ++if(NOT USE_SYSTEM_MARISA) ++ include_directories(../deps/marisa-0.2.5/include) ++endif() ++if(NOT USE_SYSTEM_RAPIDJSON) ++ include_directories(../deps/rapidjson-1.1.0) ++endif() ++if(NOT USE_SYSTEM_TCLAP) ++ include_directories(../deps/tclap-1.2.2) ++endif() + + # Library + +@@ -72,7 +78,9 @@ + ) + + if (ENABLE_DARTS) +- include_directories(../deps/darts-clone) ++ if(NOT USE_SYSTEM_DARTS) ++ include_directories(../deps/darts-clone) ++ endif() + set( + LIBOPENCC_HEADERS + ${LIBOPENCC_HEADERS} +--- /test/CMakeLists.txt ++++ /test/CMakeLists.txt +@@ -1,4 +1,3 @@ +-include_directories(../deps/libdarts/src) + include_directories(../src) + + set(CONFIG_TEST +@@ -27,7 +26,9 @@ + ) + endif() + +- include_directories(../deps/gtest-1.7.0/include) ++ if(NOT USE_SYSTEM_GTEST) ++ include_directories(../deps/gtest-1.7.0/include) ++ endif() + set(UNITTESTS + CommandLineConvertTest + ) |