From: "Mike Gilbert" <floppym@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-i18n/opencc/files/, app-i18n/opencc/
Date: Sun, 27 Dec 2020 18:39:16 +0000 (UTC) [thread overview]
Message-ID: <1609094352.3f3756b5e3919e295b2751523e2291fb41686d4a.floppym@gentoo> (raw)
commit: 3f3756b5e3919e295b2751523e2291fb41686d4a
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Sat Dec 26 04:00:00 2020 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun Dec 27 18:39:12 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f3756b5
app-i18n/opencc: Use system libraries.
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
.../files/opencc-1.1.1-system_libraries.patch | 94 +++++++++++++++++
.../files/opencc-1.1.2-system_libraries.patch | 111 +++++++++++++++++++++
app-i18n/opencc/opencc-1.1.1.ebuild | 32 ++++--
app-i18n/opencc/opencc-9999.ebuild | 32 ++++--
4 files changed, 249 insertions(+), 20 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 00000000000..ee0527f2235
--- /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 00000000000..e0b624a63e9
--- /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
+ )
diff --git a/app-i18n/opencc/opencc-1.1.1.ebuild b/app-i18n/opencc/opencc-1.1.1.ebuild
index 21a2b29d193..6fd7527c0a9 100644
--- a/app-i18n/opencc/opencc-1.1.1.ebuild
+++ b/app-i18n/opencc/opencc-1.1.1.ebuild
@@ -20,13 +20,7 @@ else
SRC_URI="https://github.com/BYVoid/OpenCC/archive/ver.${PV}.tar.gz -> ${P}.tar.gz"
fi
-# OpenCC: Apache-2.0
-# deps/darts-clone: BSD-2
-# deps/gtest-1.11.0: BSD
-# deps/marisa-0.2.5: || ( BSD-2 LGPL-2.1+ )
-# deps/rapidjson-1.1.0: MIT
-# deps/tclap-1.2.2: MIT
-LICENSE="Apache-2.0 BSD-2 MIT || ( BSD-2 LGPL-2.1+ ) test? ( BSD )"
+LICENSE="Apache-2.0"
SLOT="0/1.1"
KEYWORDS="~amd64 ~x86"
IUSE="doc test"
@@ -34,8 +28,15 @@ RESTRICT="!test? ( test )"
BDEPEND="${PYTHON_DEPS}
doc? ( app-doc/doxygen )"
-DEPEND=""
-RDEPEND=""
+DEPEND="dev-cpp/tclap
+ dev-libs/darts
+ dev-libs/marisa:0=
+ dev-libs/rapidjson
+ test? (
+ dev-cpp/benchmark
+ dev-cpp/gtest
+ )"
+RDEPEND="dev-libs/marisa:0="
if [[ "${PV}" != "9999" ]]; then
S="${WORKDIR}/OpenCC-ver.${PV}"
@@ -43,21 +44,32 @@ fi
PATCHES=(
"${FILESDIR}/${PN}-1.1.0-parallel_build.patch"
+ "${FILESDIR}/${PN}-1.1.1-system_libraries.patch"
)
DOCS=(AUTHORS NEWS.md README.md)
src_prepare() {
+ rm -r deps || die
+
cmake_src_prepare
sed -e "s:\${DIR_SHARE_OPENCC}/doc:share/doc/${PF}:" -i doc/CMakeLists.txt || die
}
src_configure() {
+ local -x CXXFLAGS="${CXXFLAGS} -I${ESYSROOT}/usr/include/rapidjson"
+
local mycmakeargs=(
-DBUILD_DOCUMENTATION=$(usex doc ON OFF)
- -DBUILD_SHARED_LIBS=ON
+ -DENABLE_BENCHMARK=$(usex test ON OFF)
-DENABLE_GTEST=$(usex test ON OFF)
+ -DUSE_SYSTEM_DARTS=ON
+ -DUSE_SYSTEM_GOOGLE_BENCHMARK=ON
+ -DUSE_SYSTEM_GTEST=ON
+ -DUSE_SYSTEM_MARISA=ON
+ -DUSE_SYSTEM_RAPIDJSON=ON
+ -DUSE_SYSTEM_TCLAP=ON
)
cmake_src_configure
diff --git a/app-i18n/opencc/opencc-9999.ebuild b/app-i18n/opencc/opencc-9999.ebuild
index 9f285d735f5..87734540550 100644
--- a/app-i18n/opencc/opencc-9999.ebuild
+++ b/app-i18n/opencc/opencc-9999.ebuild
@@ -20,13 +20,7 @@ else
SRC_URI="https://github.com/BYVoid/OpenCC/archive/ver.${PV}.tar.gz -> ${P}.tar.gz"
fi
-# OpenCC: Apache-2.0
-# deps/darts-clone: BSD-2
-# deps/gtest-1.11.0: BSD
-# deps/marisa-0.2.5: || ( BSD-2 LGPL-2.1+ )
-# deps/rapidjson-1.1.0: MIT
-# deps/tclap-1.2.2: MIT
-LICENSE="Apache-2.0 BSD-2 MIT || ( BSD-2 LGPL-2.1+ ) test? ( BSD )"
+LICENSE="Apache-2.0"
SLOT="0/1.1"
KEYWORDS=""
IUSE="doc test"
@@ -34,8 +28,15 @@ RESTRICT="!test? ( test )"
BDEPEND="${PYTHON_DEPS}
doc? ( app-doc/doxygen )"
-DEPEND=""
-RDEPEND=""
+DEPEND="dev-cpp/tclap
+ dev-libs/darts
+ dev-libs/marisa:0=
+ dev-libs/rapidjson
+ test? (
+ dev-cpp/benchmark
+ dev-cpp/gtest
+ )"
+RDEPEND="dev-libs/marisa:0="
if [[ "${PV}" != "9999" ]]; then
S="${WORKDIR}/OpenCC-ver.${PV}"
@@ -43,21 +44,32 @@ fi
PATCHES=(
"${FILESDIR}/${PN}-1.1.0-parallel_build.patch"
+ "${FILESDIR}/${PN}-1.1.2-system_libraries.patch"
)
DOCS=(AUTHORS NEWS.md README.md)
src_prepare() {
+ rm -r deps || die
+
cmake_src_prepare
sed -e "s:\${DIR_SHARE_OPENCC}/doc:share/doc/${PF}:" -i doc/CMakeLists.txt || die
}
src_configure() {
+ local -x CXXFLAGS="${CXXFLAGS} -I${ESYSROOT}/usr/include/rapidjson"
+
local mycmakeargs=(
-DBUILD_DOCUMENTATION=$(usex doc ON OFF)
- -DBUILD_SHARED_LIBS=ON
+ -DENABLE_BENCHMARK=$(usex test ON OFF)
-DENABLE_GTEST=$(usex test ON OFF)
+ -DUSE_SYSTEM_DARTS=ON
+ -DUSE_SYSTEM_GOOGLE_BENCHMARK=ON
+ -DUSE_SYSTEM_GTEST=ON
+ -DUSE_SYSTEM_MARISA=ON
+ -DUSE_SYSTEM_RAPIDJSON=ON
+ -DUSE_SYSTEM_TCLAP=ON
)
cmake_src_configure
next reply other threads:[~2020-12-27 18:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-27 18:39 Mike Gilbert [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-02-08 1:15 [gentoo-commits] repo/gentoo:master commit in: app-i18n/opencc/files/, app-i18n/opencc/ Yixun Lan
2017-11-01 20:54 Mike Gilbert
2017-08-23 14:25 Akinori Hattori
2017-02-12 18:03 Johannes Huber
2017-02-03 22:45 Lars Wendler
2016-05-27 10:22 Yixun Lan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1609094352.3f3756b5e3919e295b2751523e2291fb41686d4a.floppym@gentoo \
--to=floppym@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox