public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-i18n/opencc/files/, app-i18n/opencc/
@ 2020-12-27 18:39 Mike Gilbert
  0 siblings, 0 replies; 7+ messages in thread
From: Mike Gilbert @ 2020-12-27 18:39 UTC (permalink / raw
  To: gentoo-commits

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


^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-i18n/opencc/files/, app-i18n/opencc/
@ 2025-02-08  1:15 Yixun Lan
  0 siblings, 0 replies; 7+ messages in thread
From: Yixun Lan @ 2025-02-08  1:15 UTC (permalink / raw
  To: gentoo-commits

commit:     b134a6bbe4edef40bc580dbf66b9b8dcb1dcd333
Author:     blackteahamburger <blackteahamburger <AT> outlook <DOT> com>
AuthorDate: Sun Feb  2 15:38:06 2025 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Sat Feb  8 01:14:36 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b134a6bb

app-i18n/opencc: Bump to 1.1.9

Closes: https://bugs.gentoo.org/949213
Signed-off-by: blackteahamburger <blackteahamburger <AT> outlook.com>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 app-i18n/opencc/Manifest                        |   1 +
 app-i18n/opencc/files/opencc-1.1.9-python.patch | 162 ++++++++++++++++++++++++
 app-i18n/opencc/opencc-1.1.9.ebuild             | 122 ++++++++++++++++++
 3 files changed, 285 insertions(+)

diff --git a/app-i18n/opencc/Manifest b/app-i18n/opencc/Manifest
index 7d89492fcc76..02afde939744 100644
--- a/app-i18n/opencc/Manifest
+++ b/app-i18n/opencc/Manifest
@@ -1,2 +1,3 @@
 DIST opencc-1.1.4.tar.gz 2806887 BLAKE2B 150fd83818616de42e535f349b2574ff3319e41618e522583a57a00ab08b7f28db6e8f4fa4a0d4dbe027753b5be87065b2015542251986c6301ad441c4bf4c98 SHA512 ab8e7e6a0cc71106cf09eb32899fa8620b946a406f042d75a2444096e0b383cb1993d6c2d12cd7862e71854da4cd5893442bce51df84c32ed09fdfb4a2846f46
 DIST opencc-1.1.7.tar.gz 3311712 BLAKE2B 158a4ea5707ade583d326b0e4441640cbaae2ccb1c89c4ccfaeb8b8dd6f1d427a7f5fcaae7ac0bd6fca3208c65fe24577f6b6ba9c7fec1a499936ef83887d181 SHA512 26e4b12238f853b0fa91f9f0d9af7985bf04a0763185cc3b50b69ba99a2d80091b8c3160176d0d4cd348fbf1a680bfd80dc740dc60c938a256dc2dac8ef49f15
+DIST opencc-1.1.9.tar.gz 3422511 BLAKE2B e83fda092fafa3dc4a108c4d1d6c35cfe2e75609cd5bc2eea9c9b59ef636c876e8993b0b45291f35dd86e69f3182ddbcd775fa8d347e5e5ac89576b09a5cb901 SHA512 713cf00931d7616994eb455eef3bc893096b5cd6d42b346aa1130591752d9612891ea3ed035bd7bd4ec7df1c90425e86375f5b3337fac11663c656c79a8f33e9

diff --git a/app-i18n/opencc/files/opencc-1.1.9-python.patch b/app-i18n/opencc/files/opencc-1.1.9-python.patch
new file mode 100644
index 000000000000..442771256649
--- /dev/null
+++ b/app-i18n/opencc/files/opencc-1.1.9-python.patch
@@ -0,0 +1,162 @@
+From 8f3a5b4b201f091713cb4e2b1b5883a4b12d10b2 Mon Sep 17 00:00:00 2001
+From: Frost Ming <mianghong@gmail.com>
+Date: Thu, 18 Jul 2024 05:32:08 +0800
+Subject: [PATCH] fix: release sdist to PyPI (#797)
+
+* fix: release sdist to PyPI
+
+* fix: add newline at file end
+
+* fix: ignore more files
+
+Signed-off-by: Frost Ming <me@frostming.com>
+
+* fix: change the install root of cmake
+
+Signed-off-by: Frost Ming <me@frostming.com>
+
+* fix: make it work for editable build as well
+
+Signed-off-by: Frost Ming <me@frostming.com>
+
+* fix release script
+
+Signed-off-by: Frost Ming <me@frostming.com>
+
+* fix: include files in sdist
+
+Signed-off-by: Frost Ming <me@frostming.com>
+
+---------
+
+Signed-off-by: Frost Ming <me@frostming.com>
+Co-authored-by: Carbo Kuo <BYVoid@users.noreply.github.com>
+---
+ .github/workflows/python.yml   | 10 ++++----
+ .gitignore                     |  1 +
+ MANIFEST.in                    |  9 +++++++
+ Makefile                       |  6 ++---
+ pyproject.toml                 |  3 +++
+ python/opencc/.gitignore       |  1 +
+ python/opencc/clib/__init__.py |  1 -
+ release-pypi-linux.sh          |  8 +++----
+ release-pypi-macos.sh          |  6 ++---
+ release-pypi-windows.cmd       |  6 ++---
+ setup.py                       | 43 +++++++++-------------------------
+ 11 files changed, 43 insertions(+), 51 deletions(-)
+ create mode 100644 MANIFEST.in
+ create mode 100644 pyproject.toml
+
+diff --git a/setup.py b/setup.py
+index a7ce160d..a4bc500f 100644
+--- a/setup.py
++++ b/setup.py
+@@ -9,21 +9,12 @@
+ import wheel.bdist_wheel
+ 
+ _this_dir = os.path.dirname(os.path.abspath(__file__))
+-_clib_dir = os.path.join(_this_dir, 'python', 'opencc', 'clib')
+ _build_dir = os.path.join(_this_dir, 'build', 'python')
+ 
+ _cmake_file = os.path.join(_this_dir, 'CMakeLists.txt')
+ _author_file = os.path.join(_this_dir, 'AUTHORS')
+ _readme_file = os.path.join(_this_dir, 'README.md')
+ 
+-try:
+-    sys.path.insert(0, os.path.join(_this_dir, 'python'))
+-
+-    import opencc  # noqa
+-    _libopencc_built = True
+-except ImportError:
+-    _libopencc_built = False
+-
+ 
+ def get_version_info():
+     version_info = ['1', '0', '0']
+@@ -70,20 +61,13 @@ def get_long_description():
+         return f.read().decode('utf-8')
+ 
+ 
+-def build_libopencc():
+-    if _libopencc_built:
+-        return  # Skip building binary file
++def build_libopencc(output_path):
+     print('building libopencc into %s' % _build_dir)
+ 
+     is_windows = sys.platform == 'win32'
+ 
+     # Make build directories
+-    if is_windows:
+-        subprocess.call('md {}'.format(_build_dir), shell=True)
+-        subprocess.call('md {}'.format(_clib_dir), shell=True)
+-    else:
+-        subprocess.call('mkdir -p {}'.format(_build_dir), shell=True)
+-        subprocess.call('mkdir -p {}'.format(_clib_dir), shell=True)
++    os.makedirs(_build_dir, exist_ok=True)
+ 
+     # Configure
+     cmake_args = [
+@@ -93,14 +77,14 @@ def build_libopencc():
+         '-DENABLE_BENCHMARK:BOOL=OFF',
+         '-DBUILD_PYTHON:BOOL=ON',
+         '-DCMAKE_BUILD_TYPE=Release',
+-        '-DCMAKE_INSTALL_PREFIX={}'.format(_clib_dir),
+-        '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY={}'.format(_clib_dir),
++        '-DCMAKE_INSTALL_PREFIX={}'.format(output_path),
++        '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY={}'.format(output_path),
+         '-DPYTHON_EXECUTABLE={}'.format(sys.executable),
+     ]
+ 
+     if is_windows:
+         cmake_args += \
+-            ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE={}'.format(_clib_dir)]
++            ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE={}'.format(output_path)]
+         if sys.maxsize > 2**32:
+             cmake_args += ['-A', 'x64']
+ 
+@@ -117,11 +101,6 @@ def build_libopencc():
+     errno = subprocess.call(cmd)
+     assert errno == 0, 'Build failed'
+ 
+-    # Empty __init__.py file has to be created
+-    # to make opencc.clib a module
+-    with open('{}/__init__.py'.format(_clib_dir), 'w'):
+-        pass
+-
+ 
+ class OpenCCExtension(setuptools.Extension, object):
+     def __init__(self, name, sourcedir=''):
+@@ -131,8 +110,12 @@ def __init__(self, name, sourcedir=''):
+ 
+ class BuildExtCommand(setuptools.command.build_ext.build_ext, object):
+     def build_extension(self, ext):
++        if self.inplace:
++            output_path = os.path.join(_this_dir, 'python', 'opencc', 'clib')
++        else:
++            output_path = os.path.abspath(os.path.join(self.build_lib, 'opencc', 'clib'))
+         if isinstance(ext, OpenCCExtension):
+-            build_libopencc()
++            build_libopencc(output_path)
+         else:
+             super(BuildExtCommand, self).build_extension(ext)
+ 
+@@ -157,7 +140,7 @@ def _determine_platform_tag():
+                 return 'macosx-11.0-{}'.format(machine)
+             else:
+                 raise NotImplementedError
+-                
++
+         if os.name == 'posix':
+             _, _, _, _, machine = os.uname()
+             return 'manylinux2014-{}'.format(machine)
+@@ -190,10 +173,6 @@ def initialize_options(self):
+ 
+     packages=packages,
+     package_dir={'opencc': 'python/opencc'},
+-    package_data={str('opencc'): [
+-        'clib/opencc_clib*',
+-        'clib/share/opencc/*',
+-    ]},
+     ext_modules=[OpenCCExtension('opencc.clib.opencc_clib', 'python')],
+     cmdclass={
+         'build_ext': BuildExtCommand,

diff --git a/app-i18n/opencc/opencc-1.1.9.ebuild b/app-i18n/opencc/opencc-1.1.9.ebuild
new file mode 100644
index 000000000000..df2e04117895
--- /dev/null
+++ b/app-i18n/opencc/opencc-1.1.9.ebuild
@@ -0,0 +1,122 @@
+# Copyright 2010-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+DISTUTILS_EXT=1
+DISTUTILS_OPTIONAL=1
+DISTUTILS_SINGLE_IMPL=1
+DISTUTILS_USE_PEP517=setuptools
+
+inherit cmake distutils-r1
+
+DESCRIPTION="Library for conversion between Traditional and Simplified Chinese characters"
+HOMEPAGE="https://github.com/BYVoid/OpenCC"
+SRC_URI="https://github.com/BYVoid/OpenCC/archive/ver.${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/OpenCC-ver.${PV}"
+
+LICENSE="Apache-2.0"
+SLOT="0/1.1"
+KEYWORDS="~amd64 ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86"
+IUSE="doc python test"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="dev-libs/marisa
+	python? ( ${PYTHON_DEPS} )
+"
+DEPEND="${RDEPEND}
+	dev-cpp/tclap
+	dev-libs/darts
+	dev-libs/rapidjson
+"
+BDEPEND="${PYTHON_DEPS}
+	doc? ( app-text/doxygen )
+	python? (
+		${DISTUTILS_DEPS}
+		app-admin/chrpath
+		$(python_gen_cond_dep 'dev-python/pybind11[${PYTHON_USEDEP}]')
+		test? ( $(python_gen_cond_dep 'dev-python/pytest[${PYTHON_USEDEP}]') )
+	)
+	test? (
+		dev-cpp/gtest
+		!hppa? ( !sparc? ( dev-cpp/benchmark ) )
+	)
+"
+
+DOCS=( AUTHORS NEWS.md README.md )
+
+src_prepare() {
+	# as of opencc 1.1.8 there is no clean way to disable duplicated building of the clib again.
+	# plus, the installation is broken as well.
+	# let's revert the offending commit for now.
+	eapply -R "${FILESDIR}/${P}-python.patch"
+
+	rm -r deps || die
+
+	sed -e "s:\${DIR_SHARE_OPENCC}/doc:share/doc/${PF}:" -i doc/CMakeLists.txt || die
+
+	cmake_src_prepare
+	use python && distutils-r1_src_prepare
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-DBUILD_DOCUMENTATION=$(usex doc)
+		-DBUILD_PYTHON=$(usex python)
+		-DENABLE_BENCHMARK=$(if use test && has_version -d dev-cpp/benchmark; then echo ON; else echo OFF; fi)
+		-DENABLE_GTEST=$(usex test)
+		-DUSE_SYSTEM_DARTS=ON
+		-DUSE_SYSTEM_GOOGLE_BENCHMARK=ON
+		-DUSE_SYSTEM_GTEST=ON
+		-DUSE_SYSTEM_MARISA=ON
+		-DUSE_SYSTEM_PYBIND11=ON
+		-DUSE_SYSTEM_RAPIDJSON=ON
+		-DUSE_SYSTEM_TCLAP=ON
+	)
+
+	cmake_src_configure
+	use python && distutils-r1_src_configure
+}
+
+src_compile() {
+	cmake_src_compile
+	if use python; then
+		cp "${BUILD_DIR}"/opencc_clib.*.so python/opencc/clib/
+		distutils-r1_src_compile
+	fi
+}
+
+python_test() {
+	epytest
+}
+
+src_test() {
+	cmake_src_test
+	if use python; then
+		cd "${BUILD_DIR}_${EPYTHON}/install/usr/lib/${EPYTHON}/site-packages/opencc/clib" || die
+		mkdir -p share/opencc || die
+		cp "${S}/data/config"/*.json share/opencc/ || die
+		pushd "${S}" || die
+
+		distutils-r1_src_test
+
+		popd || die
+		rm -r share/ || die
+	fi
+}
+
+src_install() {
+	cmake_src_install
+	if use python; then
+		distutils-r1_src_install
+
+		# Hack to make opencc's python binding to use system opencc's configs
+		dodir "/usr/lib/${EPYTHON}/site-packages/opencc/clib/share"
+		dosym -r /usr/share/opencc "/usr/lib/${EPYTHON}/site-packages/opencc/clib/share/opencc"
+
+		# Remove insecure RPATH
+		chrpath --delete "${ED}/usr/lib/${EPYTHON}/site-packages/opencc/clib"/*.so || die
+	fi
+}


^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-i18n/opencc/files/, app-i18n/opencc/
@ 2017-11-01 20:54 Mike Gilbert
  0 siblings, 0 replies; 7+ messages in thread
From: Mike Gilbert @ 2017-11-01 20:54 UTC (permalink / raw
  To: gentoo-commits

commit:     b37dd966a4a1ff68ebc03fecbd4bc6ec654018fe
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Wed Nov  1 11:03:40 2017 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Wed Nov  1 20:54:15 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b37dd966

app-i18n/opencc: Delete old version (1.0.4).

 app-i18n/opencc/Manifest                           |  1 -
 .../opencc/files/opencc-1.0.4-cmake-libdir.patch   | 13 ---------
 app-i18n/opencc/opencc-1.0.4.ebuild                | 32 ----------------------
 3 files changed, 46 deletions(-)

diff --git a/app-i18n/opencc/Manifest b/app-i18n/opencc/Manifest
index 2a8ba3f00c2..9ec72207270 100644
--- a/app-i18n/opencc/Manifest
+++ b/app-i18n/opencc/Manifest
@@ -1,2 +1 @@
-DIST opencc-1.0.4.tar.gz 1597309 SHA256 0553b7461ebd379d118d45d7f40f8a6e272750115bdbc49267595a05ee3481ac SHA512 682cc621fddb6495f26675863faefe7c9f584d2c60676cee0a3ff2120828a09a5e71671f5537030c2cc874f55b7f22af70d9d376f17b83e30cb04dcd5f6bba8a WHIRLPOOL 964180d27db85df6ffb4310ea6cae7b6c294c163bce68d05a5a21e8e736be6c11b44f8a2a856481b47e14c8c1104d244fc294259cbfa2f3160912743ac933cd6
 DIST opencc-1.0.5.tar.gz 1598354 SHA256 1ce1649ba280cfc88bb76e740be5f54b29a9c034400c97a3ae211c37d7030705 SHA512 3fbefbafe5c3c2491032158577ab97b5a3edf6ea98a03a7250deba082b72c3112ad4a3396d1a469936ec32e1d141f0a2236001c2891ac9c793add2b082596cc1 WHIRLPOOL eea817748d94c973f39c527d86359dd6710157b340ad906c85123129dee34f300d17dd9cc3d851d749c6651e9743ae0ff612009130de06c0ac97fd3fca409b9e

diff --git a/app-i18n/opencc/files/opencc-1.0.4-cmake-libdir.patch b/app-i18n/opencc/files/opencc-1.0.4-cmake-libdir.patch
deleted file mode 100644
index dc8859d8e28..00000000000
--- a/app-i18n/opencc/files/opencc-1.0.4-cmake-libdir.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -83,6 +83,10 @@
-   set (DIR_ETC ${SYSCONF_INSTALL_DIR})
- endif (DEFINED SYSCONF_INSTALL_DIR)
- 
-+if (DEFINED CMAKE_INSTALL_LIBDIR)
-+  set (DIR_LIBRARY ${CMAKE_INSTALL_LIBDIR})
-+endif (DEFINED CMAKE_INSTALL_LIBDIR)
-+
- set (DIR_SHARE_OPENCC ${DIR_SHARE}opencc/)
- set (DIR_SHARE_LOCALE ${DIR_SHARE}locale/)
- 

diff --git a/app-i18n/opencc/opencc-1.0.4.ebuild b/app-i18n/opencc/opencc-1.0.4.ebuild
deleted file mode 100644
index 139e1b4bf18..00000000000
--- a/app-i18n/opencc/opencc-1.0.4.ebuild
+++ /dev/null
@@ -1,32 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-inherit cmake-utils vcs-snapshot
-
-DESCRIPTION="Libraries for conversion between Traditional and Simplified Chinese"
-HOMEPAGE="https://github.com/BYVoid/OpenCC"
-SRC_URI="https://github.com/BYVoid/${PN^^[oc]}/archive/ver.${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="0/2"
-KEYWORDS="amd64 hppa ppc ppc64 x86"
-IUSE="doc test"
-
-DEPEND="doc? ( app-doc/doxygen )"
-
-DOCS="AUTHORS *.md"
-PATCHES=(
-	"${FILESDIR}"/${P}-cmake-libdir.patch
-	"${FILESDIR}"/${PN}-test.patch
-)
-
-src_configure() {
-	local mycmakeargs=(
-		-DBUILD_DOCUMENTATION=$(usex doc)
-		-DBUILD_SHARED_LIBS=ON
-		-DENABLE_GTEST=$(usex test)
-	)
-	cmake-utils_src_configure
-}


^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-i18n/opencc/files/, app-i18n/opencc/
@ 2017-08-23 14:25 Akinori Hattori
  0 siblings, 0 replies; 7+ messages in thread
From: Akinori Hattori @ 2017-08-23 14:25 UTC (permalink / raw
  To: gentoo-commits

commit:     2bc8db79ebabd401fb909b8834d7cb723e510495
Author:     Akinori Hattori <hattya <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 23 14:23:46 2017 +0000
Commit:     Akinori Hattori <hattya <AT> gentoo <DOT> org>
CommitDate: Wed Aug 23 14:25:34 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2bc8db79

app-i18n/opencc: enable tests

Package-Manager: Portage-2.3.6, Repoman-2.3.1

 app-i18n/opencc/files/opencc-test.patch | 11 +++++++++++
 app-i18n/opencc/opencc-1.0.4.ebuild     |  9 ++++++---
 app-i18n/opencc/opencc-1.0.5.ebuild     |  5 +++--
 app-i18n/opencc/opencc-9999.ebuild      |  5 +++--
 4 files changed, 23 insertions(+), 7 deletions(-)

diff --git a/app-i18n/opencc/files/opencc-test.patch b/app-i18n/opencc/files/opencc-test.patch
new file mode 100644
index 00000000000..dd6e91b984d
--- /dev/null
+++ b/app-i18n/opencc/files/opencc-test.patch
@@ -0,0 +1,11 @@
+--- a/src/PhraseExtractTest.cpp
++++ b/src/PhraseExtractTest.cpp
+@@ -16,6 +16,8 @@
+  * limitations under the License.
+  */
+ 
++#include <cmath>
++
+ #include "PhraseExtract.hpp"
+ #include "TestUtils.hpp"
+ 

diff --git a/app-i18n/opencc/opencc-1.0.4.ebuild b/app-i18n/opencc/opencc-1.0.4.ebuild
index fa655b4ac0e..139e1b4bf18 100644
--- a/app-i18n/opencc/opencc-1.0.4.ebuild
+++ b/app-i18n/opencc/opencc-1.0.4.ebuild
@@ -12,18 +12,21 @@ SRC_URI="https://github.com/BYVoid/${PN^^[oc]}/archive/ver.${PV}.tar.gz -> ${P}.
 LICENSE="Apache-2.0"
 SLOT="0/2"
 KEYWORDS="amd64 hppa ppc ppc64 x86"
-IUSE="doc"
+IUSE="doc test"
 
 DEPEND="doc? ( app-doc/doxygen )"
 
 DOCS="AUTHORS *.md"
-PATCHES=( "${FILESDIR}"/${P}-cmake-libdir.patch )
+PATCHES=(
+	"${FILESDIR}"/${P}-cmake-libdir.patch
+	"${FILESDIR}"/${PN}-test.patch
+)
 
 src_configure() {
 	local mycmakeargs=(
 		-DBUILD_DOCUMENTATION=$(usex doc)
 		-DBUILD_SHARED_LIBS=ON
-		-DENABLE_GTEST=OFF
+		-DENABLE_GTEST=$(usex test)
 	)
 	cmake-utils_src_configure
 }

diff --git a/app-i18n/opencc/opencc-1.0.5.ebuild b/app-i18n/opencc/opencc-1.0.5.ebuild
index 93e6c7c9ffe..72a714fbc0c 100644
--- a/app-i18n/opencc/opencc-1.0.5.ebuild
+++ b/app-i18n/opencc/opencc-1.0.5.ebuild
@@ -21,11 +21,12 @@ HOMEPAGE="https://github.com/BYVoid/OpenCC"
 LICENSE="Apache-2.0"
 SLOT="0/2"
 KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~x86"
-IUSE="doc"
+IUSE="doc test"
 
 DEPEND="doc? ( app-doc/doxygen )"
 
 DOCS="AUTHORS *.md"
+PATCHES=( "${FILESDIR}"/${PN}-test.patch )
 
 src_prepare() {
 	sed -i "s|\${DIR_SHARE_OPENCC}/doc|share/doc/${PF}|" doc/CMakeLists.txt
@@ -37,7 +38,7 @@ src_configure() {
 	local mycmakeargs=(
 		-DBUILD_DOCUMENTATION=$(usex doc)
 		-DBUILD_SHARED_LIBS=ON
-		-DENABLE_GTEST=OFF
+		-DENABLE_GTEST=$(usex test)
 	)
 	cmake-utils_src_configure
 }

diff --git a/app-i18n/opencc/opencc-9999.ebuild b/app-i18n/opencc/opencc-9999.ebuild
index f98b8945135..9ec1cbd5d8b 100644
--- a/app-i18n/opencc/opencc-9999.ebuild
+++ b/app-i18n/opencc/opencc-9999.ebuild
@@ -21,11 +21,12 @@ HOMEPAGE="https://github.com/BYVoid/OpenCC"
 LICENSE="Apache-2.0"
 SLOT="0/2"
 KEYWORDS=""
-IUSE="doc"
+IUSE="doc test"
 
 DEPEND="doc? ( app-doc/doxygen )"
 
 DOCS="AUTHORS *.md"
+PATCHES=( "${FILESDIR}"/${PN}-test.patch )
 
 src_prepare() {
 	sed -i "s|\${DIR_SHARE_OPENCC}/doc|share/doc/${PF}|" doc/CMakeLists.txt
@@ -37,7 +38,7 @@ src_configure() {
 	local mycmakeargs=(
 		-DBUILD_DOCUMENTATION=$(usex doc)
 		-DBUILD_SHARED_LIBS=ON
-		-DENABLE_GTEST=OFF
+		-DENABLE_GTEST=$(usex test)
 	)
 	cmake-utils_src_configure
 }


^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-i18n/opencc/files/, app-i18n/opencc/
@ 2017-02-12 18:03 Johannes Huber
  0 siblings, 0 replies; 7+ messages in thread
From: Johannes Huber @ 2017-02-12 18:03 UTC (permalink / raw
  To: gentoo-commits

commit:     28ff73b9a48eaa95120b9ed5baa1a6005faeb967
Author:     Johannes Huber <johu <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 12 17:59:40 2017 +0000
Commit:     Johannes Huber <johu <AT> gentoo <DOT> org>
CommitDate: Sun Feb 12 17:59:40 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=28ff73b9

app-i18n/opencc: Remove 0.3.0_pre20120819-r1

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 app-i18n/opencc/Manifest                           |  1 -
 .../opencc-0.3.0_pre20120819-cmake-libdir.patch    | 17 ---------
 app-i18n/opencc/opencc-0.3.0_pre20120819-r1.ebuild | 42 ----------------------
 3 files changed, 60 deletions(-)

diff --git a/app-i18n/opencc/Manifest b/app-i18n/opencc/Manifest
index f1ebb9c230..df3b997f88 100644
--- a/app-i18n/opencc/Manifest
+++ b/app-i18n/opencc/Manifest
@@ -1,2 +1 @@
-DIST opencc-0.3.0_pre20120819.tar.xz 363528 SHA256 3ed46594547b86f1326b07c3ea910148b1c58b74c9d21c8d4e11ec30e2254fae SHA512 0ca231b5fd7b314111a76bfaa8e288fc2d43e02dbbb2a7c7e9312c1f1f0aed1a0d3b67b04b0cc3634d1b48b8fe6983e6219db053f3a2114abadec1af00b9f8d5 WHIRLPOOL 268d331479bffefdc6e1f58600422a36a32abb7d4dd873eeb216977daca05f4a4775ca547bb301bc16ea8fc702ef04cfd5d8f88c90d10e224a585575129e67c6
 DIST opencc-1.0.4.tar.gz 1597309 SHA256 0553b7461ebd379d118d45d7f40f8a6e272750115bdbc49267595a05ee3481ac SHA512 682cc621fddb6495f26675863faefe7c9f584d2c60676cee0a3ff2120828a09a5e71671f5537030c2cc874f55b7f22af70d9d376f17b83e30cb04dcd5f6bba8a WHIRLPOOL 964180d27db85df6ffb4310ea6cae7b6c294c163bce68d05a5a21e8e736be6c11b44f8a2a856481b47e14c8c1104d244fc294259cbfa2f3160912743ac933cd6

diff --git a/app-i18n/opencc/files/opencc-0.3.0_pre20120819-cmake-libdir.patch b/app-i18n/opencc/files/opencc-0.3.0_pre20120819-cmake-libdir.patch
deleted file mode 100644
index 76dc4330c4..0000000000
--- a/app-i18n/opencc/files/opencc-0.3.0_pre20120819-cmake-libdir.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -70,11 +70,11 @@ set (DIR_SHARE ${DIR_PREFIX}/share)
- set (DIR_BIN ${DIR_PREFIX}/bin)
- set (DIR_ETC ${DIR_PREFIX}/etc)
- 
- if (DEFINED CMAKE_INSTALL_LIBDIR)
--	set (DIR_LIBRARY ${CMAKE_INSTALL_LIBDIR})
--	set (DIR_LIBRARY_STATIC ${CMAKE_INSTALL_LIBDIR})
-+	set (DIR_LIBRARY ${DIR_PREFIX}/${CMAKE_INSTALL_LIBDIR})
-+	set (DIR_LIBRARY_STATIC ${DIR_PREFIX}/${CMAKE_INSTALL_LIBDIR})
- endif (DEFINED CMAKE_INSTALL_LIBDIR)
- 
- if (DEFINED SHARE_INSTALL_PREFIX)
- 	set (DIR_SHARE ${SHARE_INSTALL_PREFIX})
- endif (DEFINED SHARE_INSTALL_PREFIX)

diff --git a/app-i18n/opencc/opencc-0.3.0_pre20120819-r1.ebuild b/app-i18n/opencc/opencc-0.3.0_pre20120819-r1.ebuild
deleted file mode 100644
index 1d81dd28c5..0000000000
--- a/app-i18n/opencc/opencc-0.3.0_pre20120819-r1.ebuild
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=4
-
-inherit cmake-utils multilib eutils
-
-DESCRIPTION="Libraries for Simplified-Traditional Chinese Conversion"
-HOMEPAGE="https://github.com/BYVoid/OpenCC"
-SRC_URI="http://dev.gentooexperimental.org/~scarabeus/${P}.tar.xz"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="amd64 hppa ppc ppc64 x86"
-IUSE="+nls static-libs"
-
-DEPEND="nls? ( sys-devel/gettext )"
-RDEPEND="nls? ( virtual/libintl )"
-
-DOCS="AUTHORS README"
-
-src_prepare() {
-	sed -i \
-		-e "s:\${CMAKE_\(SHARED\|STATIC\)_LIBRARY_PREFIX}:\"$(get_libdir)\":" \
-		CMakeLists.txt || die
-	epatch "${FILESDIR}"/${P}-cmake-libdir.patch
-}
-
-src_configure() {
-	local mycmakeargs=(
-		"$(cmake-utils_use_enable nls GETTEXT)"
-	)
-
-	cmake-utils_src_configure
-}
-
-src_install() {
-	cmake-utils_src_install
-
-	use static-libs || find "${ED}" -name '*.la' -o -name '*.a' -exec rm {} +
-}


^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-i18n/opencc/files/, app-i18n/opencc/
@ 2017-02-03 22:45 Lars Wendler
  0 siblings, 0 replies; 7+ messages in thread
From: Lars Wendler @ 2017-02-03 22:45 UTC (permalink / raw
  To: gentoo-commits

commit:     416254c17898b06b58964a07ce3e33a5686cae33
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Fri Feb  3 22:44:28 2017 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Fri Feb  3 22:44:28 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=416254c1

Revert "app-i18n/opencc: Remove 0.3.0_pre20120819-r1"

This reverts commit 998b1baee2f85bb4d376d8e43272e6dca6c2fd21.

This is still required by app-i18n/fcitx on stable ppc arch.

 app-i18n/opencc/Manifest                           |  1 +
 .../opencc-0.3.0_pre20120819-cmake-libdir.patch    | 17 +++++++++
 app-i18n/opencc/opencc-0.3.0_pre20120819-r1.ebuild | 42 ++++++++++++++++++++++
 3 files changed, 60 insertions(+)

diff --git a/app-i18n/opencc/Manifest b/app-i18n/opencc/Manifest
index df3b997..f1ebb9c 100644
--- a/app-i18n/opencc/Manifest
+++ b/app-i18n/opencc/Manifest
@@ -1 +1,2 @@
+DIST opencc-0.3.0_pre20120819.tar.xz 363528 SHA256 3ed46594547b86f1326b07c3ea910148b1c58b74c9d21c8d4e11ec30e2254fae SHA512 0ca231b5fd7b314111a76bfaa8e288fc2d43e02dbbb2a7c7e9312c1f1f0aed1a0d3b67b04b0cc3634d1b48b8fe6983e6219db053f3a2114abadec1af00b9f8d5 WHIRLPOOL 268d331479bffefdc6e1f58600422a36a32abb7d4dd873eeb216977daca05f4a4775ca547bb301bc16ea8fc702ef04cfd5d8f88c90d10e224a585575129e67c6
 DIST opencc-1.0.4.tar.gz 1597309 SHA256 0553b7461ebd379d118d45d7f40f8a6e272750115bdbc49267595a05ee3481ac SHA512 682cc621fddb6495f26675863faefe7c9f584d2c60676cee0a3ff2120828a09a5e71671f5537030c2cc874f55b7f22af70d9d376f17b83e30cb04dcd5f6bba8a WHIRLPOOL 964180d27db85df6ffb4310ea6cae7b6c294c163bce68d05a5a21e8e736be6c11b44f8a2a856481b47e14c8c1104d244fc294259cbfa2f3160912743ac933cd6

diff --git a/app-i18n/opencc/files/opencc-0.3.0_pre20120819-cmake-libdir.patch b/app-i18n/opencc/files/opencc-0.3.0_pre20120819-cmake-libdir.patch
new file mode 100644
index 00000000..76dc433
--- /dev/null
+++ b/app-i18n/opencc/files/opencc-0.3.0_pre20120819-cmake-libdir.patch
@@ -0,0 +1,17 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -70,11 +70,11 @@ set (DIR_SHARE ${DIR_PREFIX}/share)
+ set (DIR_BIN ${DIR_PREFIX}/bin)
+ set (DIR_ETC ${DIR_PREFIX}/etc)
+ 
+ if (DEFINED CMAKE_INSTALL_LIBDIR)
+-	set (DIR_LIBRARY ${CMAKE_INSTALL_LIBDIR})
+-	set (DIR_LIBRARY_STATIC ${CMAKE_INSTALL_LIBDIR})
++	set (DIR_LIBRARY ${DIR_PREFIX}/${CMAKE_INSTALL_LIBDIR})
++	set (DIR_LIBRARY_STATIC ${DIR_PREFIX}/${CMAKE_INSTALL_LIBDIR})
+ endif (DEFINED CMAKE_INSTALL_LIBDIR)
+ 
+ if (DEFINED SHARE_INSTALL_PREFIX)
+ 	set (DIR_SHARE ${SHARE_INSTALL_PREFIX})
+ endif (DEFINED SHARE_INSTALL_PREFIX)

diff --git a/app-i18n/opencc/opencc-0.3.0_pre20120819-r1.ebuild b/app-i18n/opencc/opencc-0.3.0_pre20120819-r1.ebuild
new file mode 100644
index 00000000..1d81dd2
--- /dev/null
+++ b/app-i18n/opencc/opencc-0.3.0_pre20120819-r1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit cmake-utils multilib eutils
+
+DESCRIPTION="Libraries for Simplified-Traditional Chinese Conversion"
+HOMEPAGE="https://github.com/BYVoid/OpenCC"
+SRC_URI="http://dev.gentooexperimental.org/~scarabeus/${P}.tar.xz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 hppa ppc ppc64 x86"
+IUSE="+nls static-libs"
+
+DEPEND="nls? ( sys-devel/gettext )"
+RDEPEND="nls? ( virtual/libintl )"
+
+DOCS="AUTHORS README"
+
+src_prepare() {
+	sed -i \
+		-e "s:\${CMAKE_\(SHARED\|STATIC\)_LIBRARY_PREFIX}:\"$(get_libdir)\":" \
+		CMakeLists.txt || die
+	epatch "${FILESDIR}"/${P}-cmake-libdir.patch
+}
+
+src_configure() {
+	local mycmakeargs=(
+		"$(cmake-utils_use_enable nls GETTEXT)"
+	)
+
+	cmake-utils_src_configure
+}
+
+src_install() {
+	cmake-utils_src_install
+
+	use static-libs || find "${ED}" -name '*.la' -o -name '*.a' -exec rm {} +
+}


^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-i18n/opencc/files/, app-i18n/opencc/
@ 2016-05-27 10:22 Yixun Lan
  0 siblings, 0 replies; 7+ messages in thread
From: Yixun Lan @ 2016-05-27 10:22 UTC (permalink / raw
  To: gentoo-commits

commit:     f86c3377437c2e79d312aef15bfa75e5e5002271
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Fri May 27 09:04:37 2016 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Fri May 27 10:20:30 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f86c3377

app-i18n/opencc: version bump 1.0.4

Gentoo-Bug: 580782

Package-Manager: portage-2.2.28

 app-i18n/opencc/Manifest                           |  1 +
 .../opencc/files/opencc-1.0.4-cmake-libdir.patch   | 15 ++++++++
 app-i18n/opencc/opencc-1.0.4.ebuild                | 42 ++++++++++++++++++++++
 3 files changed, 58 insertions(+)

diff --git a/app-i18n/opencc/Manifest b/app-i18n/opencc/Manifest
index d427f14..d60d49f 100644
--- a/app-i18n/opencc/Manifest
+++ b/app-i18n/opencc/Manifest
@@ -1,3 +1,4 @@
 DIST opencc-0.2.0.tar.gz 496313 SHA256 fc4b3203482c7e5ad5c887dc08f83cd1d0e0c1fd1bdd9ec48672ca89bfe2a424 SHA512 46c03a1605b8c464d8836bfa6e69fef1d1978102aa6a75ab75c9546635da91223bb26412639869a1f7fc3f8db1f4ebd12645c53d07cb1375605dbb42c7e4524a WHIRLPOOL 98675c15579e573633f68e9c73a83164a3bd0ebb82b7b92dd31dfddda4a6cd3c81dd4cbd5fd775021b29e7c543952bf2206c2c00257fdc11f91754f56a969e9b
 DIST opencc-0.3.0_pre20120819.tar.xz 363528 SHA256 3ed46594547b86f1326b07c3ea910148b1c58b74c9d21c8d4e11ec30e2254fae SHA512 0ca231b5fd7b314111a76bfaa8e288fc2d43e02dbbb2a7c7e9312c1f1f0aed1a0d3b67b04b0cc3634d1b48b8fe6983e6219db053f3a2114abadec1af00b9f8d5 WHIRLPOOL 268d331479bffefdc6e1f58600422a36a32abb7d4dd873eeb216977daca05f4a4775ca547bb301bc16ea8fc702ef04cfd5d8f88c90d10e224a585575129e67c6
 DIST opencc-0.4.3.tar.gz 535151 SHA256 7bdcf9e38ac05a16750d5276494d810db107c8a8b5f8b87e2357ee167a13a587 SHA512 ac31c3c018467cf047e077d399903560feb0f8c214accd1ef45d0b1477d011af8e9bf2dbde4497c133daef61b6508460e9b2b04c0b5f336c2d67fc840a1d07e6 WHIRLPOOL 316857e7720e962c9fde27c04327c0c6b5137ca7290b170cc1ead86dcd0c6f14202ac2386f6e565ad12ebca99c939a511447902054792203edeabed88e149a2e
+DIST opencc-1.0.4.tar.gz 1597309 SHA256 0553b7461ebd379d118d45d7f40f8a6e272750115bdbc49267595a05ee3481ac SHA512 682cc621fddb6495f26675863faefe7c9f584d2c60676cee0a3ff2120828a09a5e71671f5537030c2cc874f55b7f22af70d9d376f17b83e30cb04dcd5f6bba8a WHIRLPOOL 964180d27db85df6ffb4310ea6cae7b6c294c163bce68d05a5a21e8e736be6c11b44f8a2a856481b47e14c8c1104d244fc294259cbfa2f3160912743ac933cd6

diff --git a/app-i18n/opencc/files/opencc-1.0.4-cmake-libdir.patch b/app-i18n/opencc/files/opencc-1.0.4-cmake-libdir.patch
new file mode 100644
index 0000000..c09f327
--- /dev/null
+++ b/app-i18n/opencc/files/opencc-1.0.4-cmake-libdir.patch
@@ -0,0 +1,15 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e3eb3a1..5370866 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -83,6 +83,10 @@ if (DEFINED SYSCONF_INSTALL_DIR)
+   set (DIR_ETC ${SYSCONF_INSTALL_DIR})
+ endif (DEFINED SYSCONF_INSTALL_DIR)
+ 
++if (DEFINED CMAKE_INSTALL_LIBDIR)
++  set (DIR_LIBRARY ${CMAKE_INSTALL_LIBDIR})
++endif (DEFINED CMAKE_INSTALL_LIBDIR)
++
+ set (DIR_SHARE_OPENCC ${DIR_SHARE}opencc/)
+ set (DIR_SHARE_LOCALE ${DIR_SHARE}locale/)
+ 

diff --git a/app-i18n/opencc/opencc-1.0.4.ebuild b/app-i18n/opencc/opencc-1.0.4.ebuild
new file mode 100644
index 0000000..aa08f7b
--- /dev/null
+++ b/app-i18n/opencc/opencc-1.0.4.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit cmake-utils multilib eutils vcs-snapshot
+
+DESCRIPTION="Libraries for conversion between Traditional and Simplified Chinese"
+HOMEPAGE="https://github.com/BYVoid/OpenCC"
+SRC_URI="https://github.com/BYVoid/OpenCC/archive/ver.${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~x86"
+IUSE="doc static-libs"
+
+DEPEND="doc? ( app-doc/doxygen )"
+RDEPEND=""
+
+DOCS="AUTHORS NEWS.md README.md"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-cmake-libdir.patch
+)
+
+src_configure() {
+	local mycmakeargs=(
+		-DBUILD_DOCUMENTATION=$(usex doc)
+		-DBUILD_SHARED_LIBS=ON
+		-DENABLE_GTEST=OFF
+		-DCMAKE_INSTALL_LIBDIR="${EPREFIX}"/usr/$(get_libdir)
+	)
+
+	cmake-utils_src_configure
+}
+
+src_install() {
+	cmake-utils_src_install
+
+	use static-libs || find "${ED}" -name '*.la' -o -name '*.a' -exec rm {} +
+}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-02-08  1:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-27 18:39 [gentoo-commits] repo/gentoo:master commit in: app-i18n/opencc/files/, app-i18n/opencc/ Mike Gilbert
  -- strict thread matches above, loose matches on Subject: below --
2025-02-08  1:15 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox