Skip to content
Open
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
1 change: 1 addition & 0 deletions media-plugins/gimp-xsanecli/Manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DIST gimp-xsanecli-0_pre20260222.tar.gz 14890 BLAKE2B da867cfecfd609f2ef1ee901b4d33406df063f3862f15b2a768b165e47f258d23a7606e67ac03f7cc6b1c0e5fa4f079f59ed1658b503d04e32b00d8374668ef8 SHA512 c5addad1e0f9fbbc4340d98aa9288d59d09d35031cba6f0856c70a14990b0c9e7cd01541b059b31e6fdb9ab45a425c0e9d581d3c35a12b1c3d01fafcebd1c2aa
42 changes: 42 additions & 0 deletions media-plugins/gimp-xsanecli/gimp-xsanecli-0_pre20260222.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Copyright 2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

PYTHON_COMPAT=( python3_{11..14} )
inherit python-single-r1

COMMIT="08064858578d9b262a2ed6cc3309b0cc1b13b999"

DESCRIPTION="XSane wrapper for GIMP 3.0 via CLI"
HOMEPAGE="https://yingtongli.me/git/gimp-xsanecli/"
SRC_URI="https://bugs.gentoo.org/attachment.cgi?id=955778 -> ${P}.tar.gz"
S="${WORKDIR}/${PN}"

LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~amd64"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"

RDEPEND="
${PYTHON_DEPS}
media-gfx/gimp[${PYTHON_SINGLE_USEDEP}]
media-gfx/xsane
$(python_gen_cond_dep '
dev-python/pygobject:3[${PYTHON_USEDEP}]
')
"
DEPEND="${RDEPEND}"

src_install() {
# GIMP 3.0 looks for plugins in their own subdirectories
local gimp_plugin_dir="/usr/$(get_libdir)/gimp/3.0/plug-ins/${PN}"

exeinto "${gimp_plugin_dir}"
newexe xsanecli.py "${PN}"

python_fix_shebang "${ED}/${gimp_plugin_dir}/${PN}"

# Use dodoc instead of einstalldocs for manual control
dodoc README.md CONTRIBUTORS
}
49 changes: 49 additions & 0 deletions media-plugins/gimp-xsanecli/gimp-xsanecli-9999.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Copyright 2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

# Match the versions GIMP 3.0 supports
PYTHON_COMPAT=( python3_{11..14} )

inherit git-r3 python-single-r1

DESCRIPTION="XSane wrapper for GIMP 3.0 via CLI"
HOMEPAGE="https://yingtongli.me/git/gimp-xsanecli/"
EGIT_REPO_URI="https://yingtongli.me/git/gimp-xsanecli/"

LICENSE="GPL-3+"
SLOT="0"
KEYWORDS=""

# This ensures exactly one python_single_target_* is set
REQUIRED_USE="${PYTHON_REQUIRED_USE}"

# RDEPEND Explanation:
# 1. ${PYTHON_DEPS}: Pulls in the selected python interpreter
# 2. media-gfx/gimp[${PYTHON_SINGLE_USEDEP}]: Enforces that GIMP
# has the SAME python_single_target enabled as this plugin.
# 3. pygobject: Needs the standard PYTHON_USEDEP because it is
# a multi-target (python-r1) package.
RDEPEND="
${PYTHON_DEPS}
media-gfx/gimp[${PYTHON_SINGLE_USEDEP}]
media-gfx/xsane
$(python_gen_cond_dep '
dev-python/pygobject:3[${PYTHON_USEDEP}]
')
"
DEPEND="${RDEPEND}"

src_install() {
# GIMP 3.0 requires each plugin in a subfolder of the same name
local gimp_plugin_dir="/usr/$(get_libdir)/gimp/3.0/plug-ins/${PN}"

exeinto "${gimp_plugin_dir}"
# Change 'gimp-xsanecli.py' to 'xsanecli.py'
newexe xsanecli.py "${PN}"

python_fix_shebang "${ED}/${gimp_plugin_dir}/${PN}"

dodoc README.md CONTRIBUTORS
}
16 changes: 16 additions & 0 deletions media-plugins/gimp-xsanecli/metadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>kc8rwr@unfy.us</email>
<name>Leif J. Burrow</name>
</maintainer>
<longdescription>
A wrapper script for GIMP 3.0 that restores scanning functionality
by calling the standalone XSane interface and importing the
result as a new layer.
</longdescription>
<upstream>
<bugs-to>mailto:blog@yingtongli.me</bugs-to>
</upstream>
</pkgmetadata>