forked from gentoo/gentoo-rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request gentoo#371 from gentoo90/xi
Add app-editor/xi-core and app-editor/xi-gtk live ebuilds
- Loading branch information
Showing
5 changed files
with
134 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> | ||
<pkgmetadata> | ||
<maintainer type="person"> | ||
<email>[email protected]</email> | ||
</maintainer> | ||
<longdescription>A modern editor with a backend written in Rust</longdescription> | ||
<use> | ||
<flag name="syntect">Enable syntax highlighting plugin</flag> | ||
</use> | ||
</pkgmetadata> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Copyright 1999-2018 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=7 | ||
|
||
inherit cargo git-r3 | ||
|
||
DESCRIPTION="A modern editor with a backend written in Rust" | ||
HOMEPAGE="https://xi-editor.github.io/xi-editor/" | ||
|
||
LICENSE="Apache-2.0" | ||
SLOT="0" | ||
KEYWORDS="" | ||
IUSE="+syntect" | ||
RESTRICT="network-sandbox" | ||
|
||
EGIT_REPO_URI="https://github.com/xi-editor/xi-editor.git" | ||
|
||
DEPEND="" | ||
RDEPEND="" | ||
|
||
S=${WORKDIR}/${P}/rust | ||
|
||
src_compile() { | ||
debug-print-function ${FUNCNAME} "$@" | ||
|
||
export CARGO_HOME="${ECARGO_HOME}" | ||
|
||
cargo build -v -j $(makeopts_jobs) $(usex debug "" --release) \ | ||
|| die "cargo build failed" | ||
|
||
if use syntect; then | ||
cargo build -v -j $(makeopts_jobs) $(usex debug "" --release) --manifest-path syntect-plugin/Cargo.toml \ | ||
|| die "cargo build failed" | ||
fi | ||
} | ||
|
||
src_install() { | ||
einfo "PWD = $(pwd)" | ||
debug-print-function ${FUNCNAME} "$@" | ||
|
||
cargo install -j $(makeopts_jobs) --root="${D}/usr" $(usex debug --debug "") \ | ||
|| die "cargo install failed" | ||
rm -f "${D}/usr/.crates.toml" | ||
|
||
if use syntect; then | ||
insinto /usr/share/xi/plugins/syntect | ||
doins syntect-plugin/manifest.toml | ||
exeinto /usr/share/xi/plugins/syntect/bin | ||
doexe target/release/xi-syntect-plugin | ||
fi | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
diff --git a/meson.build b/meson.build | ||
index d55c4c7..c0ef38e 100644 | ||
--- a/meson.build | ||
+++ b/meson.build | ||
@@ -25,7 +25,7 @@ dependencies = [ | ||
] | ||
|
||
config = configuration_data() | ||
-config.set_quoted('PLUGIN_DIR', join_paths(get_option('prefix'), get_option('datadir'), 'xi-gtk', 'plugins')) | ||
+config.set_quoted('PLUGIN_DIR', join_paths(get_option('prefix'), get_option('datadir'), get_option('datasubdir'), 'plugins')) | ||
configure_file(configuration: config, output: 'config.h') | ||
dependencies += meson.get_compiler('vala').find_library('config', dirs: meson.current_source_dir()) | ||
|
||
diff --git a/meson_options.txt b/meson_options.txt | ||
new file mode 100644 | ||
index 0000000..0382e40 | ||
--- /dev/null | ||
+++ b/meson_options.txt | ||
@@ -0,0 +1,2 @@ | ||
+option('datasubdir', type : 'string', value : 'xi-gtk', | ||
+ description: 'Name of the directory in datadir where plugins should be installed') | ||
-- | ||
2.16.4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> | ||
<pkgmetadata> | ||
<maintainer type="person"> | ||
<email>[email protected]</email> | ||
</maintainer> | ||
<longdescription>A GTK+ front-end for the Xi editor</longdescription> | ||
</pkgmetadata> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Copyright 1999-2018 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=7 | ||
|
||
inherit meson vala git-r3 | ||
|
||
DESCRIPTION="A GTK+ front-end for the Xi editor" | ||
HOMEPAGE="https://github.com/eyelash/xi-gtk" | ||
|
||
LICENSE="Apache-2.0" | ||
SLOT="0" | ||
KEYWORDS="" | ||
IUSE="" | ||
RESTRICT="network-sandbox" | ||
|
||
EGIT_REPO_URI="https://github.com/eyelash/xi-gtk.git" | ||
|
||
DEPEND="$(vala_depend) | ||
>=x11-libs/gtk+-3.20.0 | ||
dev-libs/json-glib" | ||
RDEPEND="${DEPEND} | ||
=app-editors/xi-core-9999" | ||
|
||
PATCHES=( | ||
"${FILESDIR}/xi-gtk-9999-datasubdir.patch" | ||
) | ||
|
||
src_prepare() { | ||
default | ||
vala_src_prepare | ||
} | ||
|
||
src_configure() { | ||
local emesonargs=( | ||
-Ddatasubdir="xi" | ||
) | ||
meson_src_configure | ||
} |