repo/proj/emacs:master commit in: app-editors/uemacs-pk/, app-editors/uemacs-pk/files/

Ulrich Müller <[email protected]>
Newsgroups gmane.linux.gentoo.cvs
Message-ID <1786097100.188b77f224aed687a402059dc94de7f3cfde8c3e.ulm@gentoo>
commit:     188b77f224aed687a402059dc94de7f3cfde8c3e
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Fri Aug  7 09:23:52 2026 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Fri Aug  7 10:05:00 2026 +0000
URL:        https://gitweb.gentoo.org/repo/proj/emacs.git/commit/?id=188b77f2

app-editors/uemacs-pk: Add hunspell flag

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 .../files/uemacs-pk-4.0.15_p20260806-gentoo.patch  | 12 ++++++++++++
 app-editors/uemacs-pk/metadata.xml                 |  5 +++++
 app-editors/uemacs-pk/uemacs-pk-9999.ebuild        | 22 +++++++++++++++++-----
 3 files changed, 34 insertions(+), 5 deletions(-)

diff --git a/app-editors/uemacs-pk/files/uemacs-pk-4.0.15_p20260806-gentoo.patch b/app-editors/uemacs-pk/files/uemacs-pk-4.0.15_p20260806-gentoo.patch
new file mode 100644
index 00000000..e15503ee
--- /dev/null
+++ b/app-editors/uemacs-pk/files/uemacs-pk-4.0.15_p20260806-gentoo.patch
@@ -0,0 +1,12 @@
+--- uemacs-pk/epath.h
++++ uemacs-pk/epath.h
+@@ -11,8 +11,7 @@
+ /*	possible names and paths of help files under different OSs	*/
+ static char *pathname[] = {
+ 	".emacsrc", "emacs.hlp",
+-	"/usr/global/lib/", "/usr/local/bin/", "/usr/local/lib/",
+-	"/usr/local/", "/usr/lib/", ""
++	"/etc/uemacs-pk/", "/usr/share/uemacs-pk/", ""
+ };
+ 
+ #endif				/* EPATH_H_ */

diff --git a/app-editors/uemacs-pk/metadata.xml b/app-editors/uemacs-pk/metadata.xml
index 7514825f..3be0c246 100644
--- a/app-editors/uemacs-pk/metadata.xml
+++ b/app-editors/uemacs-pk/metadata.xml
@@ -22,4 +22,9 @@
   fixes, adds some new functionality and comfort but does not sacrifice the
   best things (small size and portability).
 </longdescription>
+<use>
+  <flag name="hunspell">
+    Enable spell checking support (<pkg>app-text/hunspell</pkg>)
+  </flag>
+</use>
 </pkgmetadata>

diff --git a/app-editors/uemacs-pk/uemacs-pk-9999.ebuild b/app-editors/uemacs-pk/uemacs-pk-9999.ebuild
index 79572698..583fedc5 100644
--- a/app-editors/uemacs-pk/uemacs-pk-9999.ebuild
+++ b/app-editors/uemacs-pk/uemacs-pk-9999.ebuild
@@ -3,9 +3,17 @@
 
 EAPI=9
 
-EGIT_REPO_URI="https://git.kernel.org/pub/scm/editors/uemacs/uemacs.git"
-EGIT_CHECKOUT_DIR="${WORKDIR}/${PN}"
-inherit git-r3 toolchain-funcs
+inherit toolchain-funcs
+
+if [[ ${PV##*.} = 9999 ]]; then
+	inherit git-r3
+	EGIT_REPO_URI="https://git.kernel.org/pub/scm/editors/uemacs/uemacs.git"
+	EGIT_CHECKOUT_DIR="${WORKDIR}/${PN}"
+else
+	# git archive --prefix=${PN}/ HEAD | xz > ${P}.tar.xz
+	SRC_URI="https://distfiles.gentoo.org/pub/proj/emacs/${P}.tar.xz"
+	KEYWORDS="~amd64 ~riscv ~x86"
+fi
 
 DESCRIPTION="uEmacs/PK is an enhanced version of MicroEMACS"
 HOMEPAGE="https://git.kernel.org/pub/scm/editors/uemacs/uemacs.git"
@@ -13,17 +21,21 @@ S="${WORKDIR}/${PN}"
 
 LICENSE="free-noncomm"
 SLOT="0"
+IUSE="hunspell"
 
-RDEPEND="sys-libs/ncurses:0="
+RDEPEND="sys-libs/ncurses:0=
+	hunspell? ( app-text/hunspell:= )"
 DEPEND="${RDEPEND}"
 BDEPEND="virtual/pkgconfig"
 
+PATCHES=("${FILESDIR}"/${PN}-4.0.15_p20260806-gentoo.patch)
+
 src_compile() {
 	emake V=1 \
 		CC="$(tc-getCC)" \
 		CFLAGS="${CFLAGS}" \
 		LDFLAGS="${LDFLAGS}" \
-		LIBS="$("$(tc-getPKG_CONFIG)" --libs ncurses)"
+		HUNSPELL="$(usex hunspell 1 0)"
 }
 
 src_install() {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.