Skip to content

Commit

Permalink
app-i18n/fcitx-skk: new package
Browse files Browse the repository at this point in the history
Package-Manager: Portage-2.3.98, Repoman-2.3.22
Signed-off-by: YOSHIOKA Takuma <lo48576@hard-wi.red>
  • Loading branch information
lo48576 committed Apr 10, 2020
1 parent d271c8c commit 935fc88
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
1 change: 1 addition & 0 deletions app-i18n/fcitx-skk/Manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DIST fcitx-skk-0.1.4.tar.bz2 37700 BLAKE2B 9405b30124e6f10230db42b18fcd4aefce3c58ca4c4298a3f1e84efcfe9cf2af741f29b7470ae50641ee1c508d8208dc2e536657a66b4d7b12914aca29bda035 SHA512 e1973a279e2a7caa3cda64b73421549561acef5c99555c78ff35886fee351fd75e3136160144b582a3a27cfdbe6e817dc8fdc2675684b8b1af887afd59250e43
41 changes: 41 additions & 0 deletions app-i18n/fcitx-skk/fcitx-skk-0.1.4.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=6

This comment has been minimized.

Copy link
@AndrewAmmerlaan

AndrewAmmerlaan Apr 10, 2020

Member

If possible, please use the latest EAPI (which is 7 atm)


inherit cmake-utils xdg-utils

DESCRIPTION="An input method engine for Fcitx"
HOMEPAGE="https://gitlab.com/fcitx/fcitx-skk"
SRC_URI="https://gitlab.com/fcitx/fcitx-skk/-/archive/${PV}/${P}.tar.bz2"

LICENSE="GPL-3"
SLOT="4"

This comment has been minimized.

Copy link
@Alessandro-Barbieri

Alessandro-Barbieri Apr 10, 2020

Contributor

why slot 4?

This comment has been minimized.

Copy link
@lo48576

lo48576 Apr 11, 2020

Author Contributor

This depends on app-i18n/fcitx:4, and fcitx:5 is under development.
I guess it may be incompatible with fcitx:4.
Other fcitx modules I know (for example app-i18n/fcitx-hangul and app-i18n/fcitx-qt5 in gentoo repo) also have slot 4.

This comment has been minimized.

Copy link
@Alessandro-Barbieri

Alessandro-Barbieri Apr 12, 2020

Contributor

I never made a slotted ebuild but I think it's more work than you think. You should make the slotted packages able to coexist. @juippis any thought?

This comment has been minimized.

Copy link
@AndrewAmmerlaan

AndrewAmmerlaan Apr 12, 2020

Member

I never made a slotted ebuild but I think it's more work than you think. You should make the slotted packages able to coexist. @juippis any thought?

You either make sure that the packages in different slots can coexist, or you make sure that all the versions of the package are in the same slot.

(e.g all plasma* packages are in SLOT 5, even though different versions cannot coexist on the same system, but since there are no versions in other slots it is not a problem)

This comment has been minimized.

Copy link
@juippis

juippis Apr 13, 2020

Member

I think for plasma there's a great "dependency mess" and it's easier to just depend on :5. EDIT: It may have started between qt3, qt4 and qt5.

This package can also depend on app-i18n/fcitx:4, there is no reason to have a slot 4 here.

This comment has been minimized.

Copy link
@lo48576

lo48576 Apr 13, 2020

Author Contributor

Ok, this package should not be slotted, because it is not sure that future version of this package for fcitx:5 can coexist with the current version.
Is this right?

This comment has been minimized.

Copy link
@juippis

juippis Apr 13, 2020

Member

This package should not be slotted, because it doesn't have a reason to be.

You can depend on :4, :5 or :* depending on the compatibility with fcitx. It has nothing to do with this package.

KEYWORDS="~amd64 ~x86"
IUSE="qt5"

DEPEND=">=app-i18n/fcitx-4.2.8
app-i18n/libskk
app-i18n/skk-jisyo
qt5? (
app-i18n/fcitx-qt5:4
dev-qt/qtcore:5
dev-qt/qtgui:5=
dev-qt/qtwidgets:5
)"
RDEPEND="${DEPEND}"

src_configure() {
local mycmakeargs=(
-DENABLE_QT=$(usex qt5)
)
cmake-utils_src_configure
}

pkg_postinst() {
xdg_icon_cache_update
}

pkg_postrm() {
xdg_icon_cache_update
}

This comment has been minimized.

Copy link
@AndrewAmmerlaan

AndrewAmmerlaan Apr 10, 2020

Member

If you inherit xdg instead of inherit xdg-utils the pkg_postinst and pkg_postrm will be taken care of automatically by the eclass

This comment has been minimized.

Copy link
@lo48576

lo48576 Apr 10, 2020

Author Contributor

Thank you.
Should I make two commits for EAPI change and pkg_post* removal, or single commit to change both?

This comment has been minimized.

Copy link
@AndrewAmmerlaan

AndrewAmmerlaan Apr 10, 2020

Member

Doesn't really matter, you can do these in one go. We try to keep commits modular (one commit per package), but it is fine to make multiple changes to an ebuild in one single commit (IMO).

Also, the cmake-utils eclass is being deprecated, and replaced by the cmake eclass, so you might want to change that here too. (The functions are the same so replacing cmake-utils_src_configurte with cmake_src_configure should just work).

You might also want to change the order of the cmake and xdg eclasses, otherwise xdg will overwrite cmake's src_prepare function. e.g.:

inherit xdg cmake
14 changes: 14 additions & 0 deletions app-i18n/fcitx-skk/metadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>lo48576@hard-wi.red</email>
<name>YOSHIOKA Takuma</name>
</maintainer>
<upstream>
<remote-id type="gitlab">fcitx/fcitx-skk</remote-id>
</upstream>
<longdescription lang="en">
fcitx-skk is an input method engine for Fcitx, which uses libskk as its backend.
</longdescription>
</pkgmetadata>

0 comments on commit 935fc88

Please sign in to comment.