Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/emerge-on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,13 @@ jobs:
echo 'FEATURES="getbinpkg"' >> /etc/portage/make.conf
getuto

- name: setup distfiles permissions
run: |
mkdir -p /var/cache/distfiles
chown root:portage /var/cache/distfiles
chmod 775 /var/cache/distfiles
install -d -o portage -g portage -m 775 /var/cache/distfiles/git3-src

- name: install depends
run: |
emerge --verbose --quiet --jobs $(nproc) --autounmask y --autounmask-continue y \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ EAPI=8

MY_PN="fcitx5-cskk"

inherit cmake
inherit cmake xdg

DESCRIPTION="SKK input method plugin for fcitx5 that uses LibCSKK"
HOMEPAGE="https://github.com/fcitx/fcitx5-cskk"
Expand All @@ -15,29 +15,27 @@ S="${WORKDIR}/${MY_PN}-${PV}"
LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~amd64"
IUSE="+qt5"

DEPEND="
app-i18n/cskk
>=app-i18n/fcitx-5.0.6:5
app-i18n/fcitx-qt[qt5?,-onlyplugin]
app-i18n/libskk
app-i18n/skk-jisyo
qt5? (
dev-qt/qtcore:5
dev-qt/qtgui:5
dev-qt/qtwidgets:5
)
"
RDEPEND="${DEPEND}"
BDEPEND="
kde-frameworks/extra-cmake-modules
virtual/pkgconfig
"

PATCHES=(
"${FILESDIR}/${P}-cmake-minimum.patch"
"${FILESDIR}/${P}-standardpaths.patch"
)

src_configure() {
local mycmakeargs=(
-DENABLE_QT=$(usex qt5)
-DENABLE_QT=OFF
)
cmake_src_configure
}
10 changes: 10 additions & 0 deletions app-i18n/fcitx-cskk/files/fcitx-cskk-1.2.0-cmake-minimum.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Fix portage QA warning from current extra-cmake-modules.

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.13)
+cmake_minimum_required(VERSION 3.16)
cmake_policy(SET CMP0063 NEW)
project(fcitx5-cskk VERSION 1.2.0)
set(CMAKE_CXX_FLAGS "-Wall")
59 changes: 59 additions & 0 deletions app-i18n/fcitx-cskk/files/fcitx-cskk-1.2.0-standardpaths.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
https://github.com/fcitx/fcitx5-cskk/commit/da7e2ce7d8f1319368adae3d9e96513058c40018

--- a/src/cskk.cpp
+++ b/src/cskk.cpp
@@ -17,6 +17,13 @@
#include <cstring>
#include <fcitx-config/iniparser.h>
#include <fcitx/addonmanager.h>
+#if __has_include(<fcitx-utils/standardpaths.h>)
+#include <fcitx-utils/standardpaths.h>
+#define FCITX_CSKK_HAS_STANDARDPATHS 1
+#else
+#include <fcitx-utils/standardpath.h>
+#define FCITX_CSKK_HAS_STANDARDPATHS 0
+#endif
#include <fcitx/inputpanel.h>
#include <filesystem>
#include <string>
@@ -105,13 +112,23 @@ typedef enum _FcitxSkkDictType { FSDT_Invalid, FSDT_File } FcitxSkkDictType;
void FcitxCskkEngine::loadDictionary() {
freeDictionaries();

+#if FCITX_CSKK_HAS_STANDARDPATHS
+ auto dict_config_file = StandardPaths::global().open(
+ StandardPathsType::PkgData, "cskk/dictionary_list");
+#else
auto dict_config_file = StandardPath::global().open(
StandardPath::Type::PkgData, "cskk/dictionary_list", O_RDONLY);
+#endif
+
+ if (!dict_config_file.isValid()) {
+ return;
+ }

UniqueFilePtr fp(fdopen(dict_config_file.fd(), "rb"));
if (!fp) {
return;
}
+ dict_config_file.release();

UniqueCPtr<char> buf;
size_t len = 0;
@@ -192,9 +209,16 @@ void FcitxCskkEngine::loadDictionary() {
constexpr auto var_len = sizeof(configDir) - 1;
std::string realpath = path;
if (stringutils::startsWith(path, configDir)) {
+#if FCITX_CSKK_HAS_STANDARDPATHS
+ realpath =
+ (StandardPaths::global().userDirectory(StandardPathsType::PkgData) /
+ path.substr(var_len))
+ .string();
+#else
realpath = stringutils::joinPath(
StandardPath::global().userDirectory(StandardPath::Type::PkgData),
path.substr(var_len));
+#endif
}
auto *userdict =
skk_user_dict_new(realpath.c_str(), encoding.c_str(), complete);
14 changes: 2 additions & 12 deletions app-i18n/fcitx-qt/fcitx-qt-9999.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,14 @@ EGIT_REPO_URI="https://github.com/fcitx/fcitx5-qt.git"
LICENSE="BSD LGPL-2.1+"
SLOT="5"
KEYWORDS=""
IUSE="qt5 onlyplugin staticplugin +qt6 +X wayland"
IUSE="onlyplugin staticplugin +qt6 +X wayland"
REQUIRED_USE="
|| ( qt5 qt6 )
qt5? ( X )
staticplugin? ( onlyplugin )
"

RDEPEND="
!onlyplugin? (
>=app-i18n/fcitx-5.1.13:5
qt5? ( dev-qt/qtconcurrent:5 )
)
qt5? (
dev-qt/qtcore:5
dev-qt/qtdbus:5
dev-qt/qtgui:5=
dev-qt/qtwidgets:5
wayland? ( dev-qt/qtwayland:5 )
)
qt6? (
dev-qt/qtbase:6=[dbus,gui,widgets,wayland?]
Expand All @@ -53,7 +43,7 @@ BDEPEND="
src_configure() {
local mycmakeargs=(
-DENABLE_QT4=no
-DENABLE_QT5=$(usex qt5)
-DENABLE_QT5=no
-DENABLE_QT6=$(usex qt6)
-DENABLE_QT6_WAYLAND_WORKAROUND=$(usex qt6 $(usex wayland))
-DENABLE_X11=$(usex X)
Expand Down
1 change: 0 additions & 1 deletion app-i18n/fcitx-skk/Manifest
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
DIST fcitx5-skk-5.1.10.tar.zst 57697 BLAKE2B 5e8552c9a0897c8763f6bb5c2ff422fb6d66cfa0bea91d8c56b5f352d6c01caac112df1f53fd1a31be56ed569f4b93a3a3fd94ec245077d3e25d29bce9d4fd35 SHA512 d4642614d558e5ac687f67e5ca9ffc9b2c8f63079246e0c0757b6f5ae672e6dd457a5905047c87fdda1fc9edab545ca0117ee095396d6e38cf45238c9b903c2a
DIST fcitx5-skk-5.1.6.tar.zst 54904 BLAKE2B e4e02f93f7c877c3e5b989f2566d088488033cabf37aa7b597efa79e7911f471f43421d13331a5231d4ea553d790240e7009cb04a500d239b605090a2e99571e SHA512 cca454689261e01a4675fb39c72a8f00e8de7e09f24dc1929dd49e81f6a4f7569b00328fa3f7157908ead0bd9d4c679ebb0e1f433c5ac5f3f820056cee1a0351
DIST fcitx5-skk-5.1.7.tar.zst 55433 BLAKE2B 69e08a65f514acd15c5ef85d2a642cd62cdfcf79d60aebab761c44a327bde3595056a00b47275e95762cc11adfdb3a3c7d91be6cf70506286c55b9bad7832894 SHA512 0fb7f32894d43a47966d5056cbfe1bd1ab2bcd879ded604cf5c0bce2c1200f66f2c9330770e001d27244ad2d8a269307ff19f2174d3980a1fbd35f9ad800b8b5
53 changes: 0 additions & 53 deletions app-i18n/fcitx-skk/fcitx-skk-5.1.6.ebuild

This file was deleted.

Loading