commit:     1d8ff1e639f18dbe75f7c3cc2367a71900d2f650
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 20 01:16:54 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Oct 20 01:24:21 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d8ff1e6

app-editors/micro: fix syntax highlighting

Closes: https://bugs.gentoo.org/915628
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../micro/files/micro-2.0.12-no-strip.patch        | 25 +++++++++++++
 app-editors/micro/micro-2.0.12-r1.ebuild           | 43 ++++++++++++++++++++++
 2 files changed, 68 insertions(+)

diff --git a/app-editors/micro/files/micro-2.0.12-no-strip.patch 
b/app-editors/micro/files/micro-2.0.12-no-strip.patch
new file mode 100644
index 000000000000..48700182bd18
--- /dev/null
+++ b/app-editors/micro/files/micro-2.0.12-no-strip.patch
@@ -0,0 +1,25 @@
+--- a/Makefile
++++ b/Makefile
+@@ -16,18 +16,18 @@ VSCODE_TESTS_BASE_URL = 
'https://raw.githubusercontent.com/microsoft/vscode/e6a4
+ build: generate build-quick
+ 
+ build-quick:
+-      go build -trimpath -ldflags "-s -w $(GOVARS) 
$(ADDITIONAL_GO_LINKER_FLAGS)" ./cmd/micro
++      go build -trimpath -ldflags "-w $(GOVARS) 
$(ADDITIONAL_GO_LINKER_FLAGS)" ./cmd/micro
+ 
+ build-dbg:
+-      go build -trimpath -ldflags "-s -w $(ADDITIONAL_GO_LINKER_FLAGS) 
$(DEBUGVAR)" ./cmd/micro
++      go build -trimpath -ldflags "-w $(ADDITIONAL_GO_LINKER_FLAGS) 
$(DEBUGVAR)" ./cmd/micro
+ 
+ build-tags: fetch-tags generate
+-      go build -trimpath -ldflags "-s -w $(GOVARS) 
$(ADDITIONAL_GO_LINKER_FLAGS)" ./cmd/micro
++      go build -trimpath -ldflags "-w $(GOVARS) 
$(ADDITIONAL_GO_LINKER_FLAGS)" ./cmd/micro
+ 
+ build-all: build
+ 
+ install: generate
+-      go install -ldflags "-s -w $(GOVARS) $(ADDITIONAL_GO_LINKER_FLAGS)" 
./cmd/micro
++      go install -ldflags "-w $(GOVARS) $(ADDITIONAL_GO_LINKER_FLAGS)" 
./cmd/micro
+ 
+ install-all: install
+ 

diff --git a/app-editors/micro/micro-2.0.12-r1.ebuild 
b/app-editors/micro/micro-2.0.12-r1.ebuild
new file mode 100644
index 000000000000..5ccf1af373bf
--- /dev/null
+++ b/app-editors/micro/micro-2.0.12-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit go-module optfeature desktop xdg
+
+DESCRIPTION="Modern and intuitive terminal-based text editor"
+HOMEPAGE="https://github.com/zyedidia/micro";
+SRC_URI="https://github.com/zyedidia/${PN}/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
+SRC_URI+=" 
https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-deps.tar.xz";
+
+LICENSE="MIT Apache-2.0 BSD MPL-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~riscv ~x86"
+
+BDEPEND="dev-vcs/git"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-2.0.12-no-strip.patch
+)
+
+src_compile() {
+       # We build/install this way for bug #915628 (highlighting)
+       emake VERSION=${PV} build
+}
+
+src_install() {
+       dodir /usr/bin
+       emake GOBIN="${ED}"/usr/bin install
+       doman ./assets/packaging/micro.1
+       domenu assets/packaging/micro.desktop
+       einstalldocs
+}
+
+pkg_postinst() {
+       # Update desktop file mime cache
+       xdg_pkg_postinst
+
+       optfeature_header "Clipboard support with display servers:"
+       optfeature "Xorg" x11-misc/xsel x11-misc/xclip
+       optfeature "Wayland" gui-apps/wl-clipboard
+}

Reply via email to