mirror of
https://github.com/gentoo-mirror/gentoo-zh.git
synced 2025-04-17 23:18:49 -04:00
app-i18n/libime-jyutping: new package, add 1.0.8
Signed-off-by: liuyujielol <2073201758GD@gmail.com>
This commit is contained in:
parent
4d0c6a2cd6
commit
b3e18be682
12
.github/workflows/overlay.toml
vendored
12
.github/workflows/overlay.toml
vendored
@ -99,6 +99,12 @@ source = "github"
|
||||
github = "fcitx/fcitx5-hangul"
|
||||
use_latest_tag = true
|
||||
|
||||
["app-i18n/fcitx-m17n"]
|
||||
source = "github"
|
||||
github = "fcitx/fcitx5-m17n"
|
||||
use_latest_tag = true
|
||||
github_account = "liuyujielol"
|
||||
|
||||
# virtual package
|
||||
#["app-i18n/fcitx-meta"]
|
||||
|
||||
@ -144,6 +150,12 @@ github = "fcitx/libime"
|
||||
use_latest_tag = true
|
||||
github_account = "liangyongxiang"
|
||||
|
||||
["app-i18n/libime-jyutping"]
|
||||
source = "github"
|
||||
github = "fcitx/libime-jyutping"
|
||||
use_latest_tag = true
|
||||
github_account = "liuyujielol"
|
||||
|
||||
["app-i18n/lunar"]
|
||||
source = "debianpkg"
|
||||
debianpkg = "lunar"
|
||||
|
3
app-i18n/libime-jyutping/Manifest
Normal file
3
app-i18n/libime-jyutping/Manifest
Normal file
@ -0,0 +1,3 @@
|
||||
DIST jyutping-dict-20180104.tar.xz 1987632 BLAKE2B 7d93c5a8f660f90070605aee58086dca1077abd81b372312f9845cf48cfc678c9e155e5f193347433592ea79f18e8fa4d2769f8c3c2dc5f714c9bbf9a0f9f4fa SHA512 a73cd0b9befaf45497999ff322e8b4a309c8afe78dd9d6e16963476423411ce477c8cd3e1a0007c8af89a87328d721b7f5c22cb420117977c6a6a62d1fcd22c5
|
||||
DIST jyutping-model-20180103.tar.xz 11006680 BLAKE2B 5a97eceb1222c693c0b0f3d866cfd90bf1a6c86ac2b06fb3e6566053f276f27b361edd17fbc49282b36e8796aaa152b5c88cf74aa0ec99a657157b5eb44b25c7 SHA512 ea99669fc3c0e4ab0f0fc38aeffe9dbc876a869397b3e870e70fb7f041002f7f271383110b8ca0158212ef327cdca4facb49b8b1ccba94e03927ba743423f597
|
||||
DIST libime-jyutping-1.0.8.tar.gz 48333 BLAKE2B b27dc2ff50dcb21843d71794a7008f25c49196fe7fd6c95d9ff1a8f1f697dd905b22217b444e4f0e31be30e83072a085db54ad02de5f4f8b9f1b37bc293f8060 SHA512 72e81ce491ae5e1cb6276a685aeca0616db15a667077cbfe093288ee654ec4978aba895541ad10f1439f0095caeaf5e0e72e8deeb7fe0132eed4a7e17af0e49c
|
@ -0,0 +1,53 @@
|
||||
From cdfa5ba2404a8afe387d5a1ee741bab22d8065b7 Mon Sep 17 00:00:00 2001
|
||||
From: rocka <i@rocka.me>
|
||||
Date: Sat, 4 Nov 2023 20:00:47 +0800
|
||||
Subject: [PATCH] Set install component for lib/header/tools/cmake config. (#9)
|
||||
|
||||
---
|
||||
src/libime/jyutping/CMakeLists.txt | 12 ++++++++----
|
||||
tools/CMakeLists.txt | 2 +-
|
||||
2 files changed, 9 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/libime/jyutping/CMakeLists.txt b/src/libime/jyutping/CMakeLists.txt
|
||||
index 677d1ba..f94366d 100644
|
||||
--- a/src/libime/jyutping/CMakeLists.txt
|
||||
+++ b/src/libime/jyutping/CMakeLists.txt
|
||||
@@ -37,8 +37,8 @@ target_include_directories(IMEJyutping PUBLIC
|
||||
|
||||
target_link_libraries(IMEJyutping PUBLIC Fcitx5::Utils Boost::boost LibIME::Core PRIVATE Boost::iostreams PkgConfig::ZSTD)
|
||||
|
||||
-install(TARGETS IMEJyutping EXPORT LibIMEJyutpingTargets LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}")
|
||||
-install(FILES ${LIBIME_JYUTPING_HDRS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/LibIME/libime/jyutping")
|
||||
+install(TARGETS IMEJyutping EXPORT LibIMEJyutpingTargets LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib)
|
||||
+install(FILES ${LIBIME_JYUTPING_HDRS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/LibIME/libime/jyutping" COMPONENT header)
|
||||
|
||||
add_library(LibIME::Jyutping ALIAS IMEJyutping)
|
||||
|
||||
@@ -49,10 +49,14 @@ configure_package_config_file("${CMAKE_CURRENT_SOURCE_DIR}/LibIMEJyutpingConfig.
|
||||
|
||||
generate_export_header(IMEJyutping BASE_NAME LibIMEJyutping)
|
||||
|
||||
-install(EXPORT LibIMEJyutpingTargets DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/LibIMEJyutping" FILE LibIMEJyutpingTargets.cmake NAMESPACE LibIME:: )
|
||||
+install(EXPORT LibIMEJyutpingTargets
|
||||
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/LibIMEJyutping"
|
||||
+ FILE LibIMEJyutpingTargets.cmake
|
||||
+ NAMESPACE LibIME::
|
||||
+ COMPONENT Devel)
|
||||
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/LibIMEJyutpingConfig.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/LibIMEJyutpingConfigVersion.cmake"
|
||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/LibIMEJyutping"
|
||||
- COMPONENT Devel )
|
||||
+ COMPONENT Devel)
|
||||
|
||||
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
|
||||
index dcceb63..26cc78f 100644
|
||||
--- a/tools/CMakeLists.txt
|
||||
+++ b/tools/CMakeLists.txt
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
add_executable(libime_jyutpingdict libime_jyutpingdict.cpp)
|
||||
target_link_libraries(libime_jyutpingdict LibIME::Jyutping)
|
||||
-install(TARGETS libime_jyutpingdict DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
+install(TARGETS libime_jyutpingdict DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT tools)
|
||||
add_executable(LibIME::jyutpingdict ALIAS libime_jyutpingdict)
|
@ -0,0 +1,39 @@
|
||||
From 3cbd2fc2d43bee266f85c44a739b06f1e3010493 Mon Sep 17 00:00:00 2001
|
||||
From: rocka <i@rocka.me>
|
||||
Date: Sat, 4 Nov 2023 23:29:35 +0800
|
||||
Subject: [PATCH] Find Gettext and Fcitx5Module only when engine enabled. (#10)
|
||||
|
||||
* Find Gettext and Fcitx5Module only when engine enabled.
|
||||
|
||||
* Build translation only when ENABLE_ENGINE
|
||||
---
|
||||
CMakeLists.txt | 9 ++++++---
|
||||
1 file changed, 6 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index b8e94e1..ee2bb79 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -42,8 +42,12 @@ set(LIBIME_JYUTPING_INSTALL_PKGDATADIR "${CMAKE_INSTALL_FULL_DATADIR}/libime")
|
||||
set(LIBIME_JYUTPING_INSTALL_LIBDATADIR "${CMAKE_INSTALL_FULL_LIBDIR}/libime")
|
||||
|
||||
find_package(LibIMECore 1.0.16 REQUIRED)
|
||||
-find_package(Gettext REQUIRED)
|
||||
-find_package(Fcitx5Module REQUIRED Spell Punctuation QuickPhrase)
|
||||
+
|
||||
+if(ENABLE_ENGINE)
|
||||
+ find_package(Gettext REQUIRED)
|
||||
+ find_package(Fcitx5Module REQUIRED Spell Punctuation QuickPhrase)
|
||||
+ add_subdirectory(po)
|
||||
+endif()
|
||||
|
||||
if(ENABLE_TEST)
|
||||
enable_testing()
|
||||
@@ -53,7 +57,6 @@ endif()
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(tools)
|
||||
add_subdirectory(data)
|
||||
-add_subdirectory(po)
|
||||
|
||||
if (ENABLE_DOC)
|
||||
find_package(Doxygen REQUIRED)
|
73
app-i18n/libime-jyutping/libime-jyutping-1.0.8.ebuild
Normal file
73
app-i18n/libime-jyutping/libime-jyutping-1.0.8.ebuild
Normal file
@ -0,0 +1,73 @@
|
||||
# Copyright 2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
inherit cmake
|
||||
|
||||
DESCRIPTION="A library make use of libime to implement jyutping (粵拼) input method"
|
||||
HOMEPAGE="https://github.com/fcitx/libime-jyutping"
|
||||
|
||||
if [[ "${PV}" == 9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/fcitx/libime-jyutping.git"
|
||||
else
|
||||
SRC_URI="https://github.com/fcitx/libime-jyutping/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
KEYWORDS="~amd64"
|
||||
fi
|
||||
|
||||
SRC_URI+="
|
||||
https://download.fcitx-im.org/data/jyutping-model-20180103.tar.xz
|
||||
https://download.fcitx-im.org/data/jyutping-dict-20180104.tar.xz
|
||||
"
|
||||
|
||||
# libime-jyutping => LGPL-2.1+
|
||||
# data file derived from libpinyin and rime-jyutping => GPL-3+
|
||||
LICENSE="LGPL-2.1+ GPL-3+"
|
||||
SLOT="0"
|
||||
IUSE="+engine test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
DEPEND="
|
||||
app-arch/zstd
|
||||
>=app-i18n/libime-1.0.6:5
|
||||
engine? (
|
||||
app-i18n/fcitx:5
|
||||
sys-devel/gettext
|
||||
)
|
||||
>=dev-libs/boost-1.61
|
||||
dev-libs/libfmt
|
||||
"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
# https://github.com/fcitx/libime-jyutping/commit/cdfa5ba2404a8afe387d5a1ee741bab22d8065b7
|
||||
# https://github.com/fcitx/libime-jyutping/commit/3cbd2fc2d43bee266f85c44a739b06f1e3010493
|
||||
# only for this version (1.0.8)
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${P}-Set-install-component-for-cmake-config.patch"
|
||||
"${FILESDIR}/${P}-find-gettext-and-fcitx5Module-only-when-engine-enabled.patch"
|
||||
)
|
||||
|
||||
src_unpack() {
|
||||
if [[ "${PV}" == *9999* ]]; then
|
||||
git-r3_src_unpack
|
||||
else
|
||||
# avoid unpacking jyutping-*.tar.xz
|
||||
unpack "${P}.tar.gz"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
ln -sv "${DISTDIR}/jyutping-model-20180103.tar.xz" "${S}/data" || die
|
||||
ln -sv "${DISTDIR}/jyutping-dict-20180104.tar.xz" "${S}/data" || die
|
||||
cmake_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# no .codedocs, no doc
|
||||
local mycmakeargs=(
|
||||
-DENABLE_ENGINE=$(usex engine)
|
||||
-DENABLE_TEST=$(usex test)
|
||||
-DENABLE_DOC=no
|
||||
)
|
||||
cmake_src_configure
|
||||
}
|
14
app-i18n/libime-jyutping/metadata.xml
Normal file
14
app-i18n/libime-jyutping/metadata.xml
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>2073201758GD@gmail.com</email>
|
||||
<name>liuyujielol</name>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="engine">Enable input method for fcitx</flag>
|
||||
</use>
|
||||
<upstream>
|
||||
<remote-id type="github">fcitx/libime-jyutping</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
Loading…
x
Reference in New Issue
Block a user