1 |
commit: 8d01f01ca8e92057e1eae6b849d66fb23de4f36e |
2 |
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Aug 4 11:28:33 2020 +0000 |
4 |
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Aug 4 12:11:20 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8d01f01c |
7 |
|
8 |
app-emacs/vterm: Initial import. |
9 |
|
10 |
Ebuild contributed by me, based on earlier work by Hans de Graaff |
11 |
<graaff <AT> gentoo.org> and Arjan Adriaanse <arjan@×××××××.se>. |
12 |
|
13 |
Closes: https://bugs.gentoo.org/721256 |
14 |
Package-Manager: Portage-3.0.1, Repoman-2.3.23 |
15 |
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org> |
16 |
|
17 |
app-emacs/vterm/Manifest | 1 + |
18 |
app-emacs/vterm/files/50vterm-gentoo.el | 5 +++ |
19 |
app-emacs/vterm/files/vterm-dont-compile.patch | 22 +++++++++++++ |
20 |
app-emacs/vterm/metadata.xml | 17 ++++++++++ |
21 |
app-emacs/vterm/vterm-0.0.1_pre20200713.ebuild | 45 ++++++++++++++++++++++++++ |
22 |
5 files changed, 90 insertions(+) |
23 |
|
24 |
diff --git a/app-emacs/vterm/Manifest b/app-emacs/vterm/Manifest |
25 |
new file mode 100644 |
26 |
index 00000000000..f04e9cddcdd |
27 |
--- /dev/null |
28 |
+++ b/app-emacs/vterm/Manifest |
29 |
@@ -0,0 +1 @@ |
30 |
+DIST vterm-0.0.1_pre20200713.tar.gz 48160 BLAKE2B 96c45ddb139d19f3020d7a8eebc1ee31a7dc098f47c16cfffc7bf3327261a4366763744a8158d3c8a066ec94be4966a5ef78804db95c9025eee06fb8c9e4aa76 SHA512 17726ad0957daeab2a87b398bfa24dbe3c4c48dfba932138a71cd8c992bf20bd2925a7118a89247bbd674dbecd7fda8663c564a278168bb207034efb03e50cd0 |
31 |
|
32 |
diff --git a/app-emacs/vterm/files/50vterm-gentoo.el b/app-emacs/vterm/files/50vterm-gentoo.el |
33 |
new file mode 100644 |
34 |
index 00000000000..b3e234eba1c |
35 |
--- /dev/null |
36 |
+++ b/app-emacs/vterm/files/50vterm-gentoo.el |
37 |
@@ -0,0 +1,5 @@ |
38 |
+(add-to-list 'load-path "@SITELISP@") |
39 |
+(add-to-list 'load-path "@EMACSMODULES@") |
40 |
+(autoload 'vterm "vterm" "Create a new vterm." t) |
41 |
+(autoload 'vterm-other-window "vterm" |
42 |
+ "Create a new vterm in another window." t) |
43 |
|
44 |
diff --git a/app-emacs/vterm/files/vterm-dont-compile.patch b/app-emacs/vterm/files/vterm-dont-compile.patch |
45 |
new file mode 100644 |
46 |
index 00000000000..6b08ae81236 |
47 |
--- /dev/null |
48 |
+++ b/app-emacs/vterm/files/vterm-dont-compile.patch |
49 |
@@ -0,0 +1,22 @@ |
50 |
+Simply error out if the module is not found. Don't confuse the user |
51 |
+with messages about compiling the module, which won't work outside of |
52 |
+the package's source tree. |
53 |
+ |
54 |
+--- a/vterm.el |
55 |
++++ b/vterm.el |
56 |
+@@ -121,14 +121,7 @@ |
57 |
+ (message "Compilation of `emacs-libvterm' module succeeded") |
58 |
+ (error "Compilation of `emacs-libvterm' module failed!"))))) |
59 |
+ |
60 |
+-;; If the vterm-module is not compiled yet, compile it |
61 |
+-(unless (require 'vterm-module nil t) |
62 |
+- (if (or vterm-always-compile-module |
63 |
+- (y-or-n-p "Vterm needs `vterm-module' to work. Compile it now? ")) |
64 |
+- (progn |
65 |
+- (vterm-module-compile) |
66 |
+- (require 'vterm-module)) |
67 |
+- (error "Vterm will not work until `vterm-module' is compiled!"))) |
68 |
++(require 'vterm-module) |
69 |
+ |
70 |
+ ;; Silence compiler warnings by informing it of what functions are defined |
71 |
+ (declare-function display-line-numbers-update-width "display-line-numbers") |
72 |
|
73 |
diff --git a/app-emacs/vterm/metadata.xml b/app-emacs/vterm/metadata.xml |
74 |
new file mode 100644 |
75 |
index 00000000000..ac2faa79e28 |
76 |
--- /dev/null |
77 |
+++ b/app-emacs/vterm/metadata.xml |
78 |
@@ -0,0 +1,17 @@ |
79 |
+<?xml version="1.0" encoding="UTF-8"?> |
80 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
81 |
+<pkgmetadata> |
82 |
+<maintainer type="project"> |
83 |
+ <email>gnu-emacs@g.o</email> |
84 |
+ <name>Gentoo GNU Emacs project</name> |
85 |
+</maintainer> |
86 |
+<longdescription> |
87 |
+ Emacs-libvterm (vterm) is fully-fledged terminal emulator inside |
88 |
+ GNU Emacs based on libvterm, a C library. As a result of using |
89 |
+ compiled code (instead of elisp), emacs-libvterm is fully capable, |
90 |
+ fast, and it can seamlessly handle large outputs. |
91 |
+</longdescription> |
92 |
+<upstream> |
93 |
+ <remote-id type="github">akermu/emacs-libvterm</remote-id> |
94 |
+</upstream> |
95 |
+</pkgmetadata> |
96 |
|
97 |
diff --git a/app-emacs/vterm/vterm-0.0.1_pre20200713.ebuild b/app-emacs/vterm/vterm-0.0.1_pre20200713.ebuild |
98 |
new file mode 100644 |
99 |
index 00000000000..412a03668c1 |
100 |
--- /dev/null |
101 |
+++ b/app-emacs/vterm/vterm-0.0.1_pre20200713.ebuild |
102 |
@@ -0,0 +1,45 @@ |
103 |
+# Copyright 1999-2020 Gentoo Authors |
104 |
+# Distributed under the terms of the GNU General Public License v2 |
105 |
+ |
106 |
+EAPI=7 |
107 |
+NEED_EMACS=26 |
108 |
+COMMIT="f41849c2c9c1899f22d1c3d4f871ec47c82627ce" |
109 |
+ |
110 |
+inherit cmake elisp |
111 |
+ |
112 |
+MY_PN="emacs-libvterm" |
113 |
+DESCRIPTION="Fully-featured terminal emulator based on libvterm" |
114 |
+HOMEPAGE="https://github.com/akermu/emacs-libvterm" |
115 |
+SRC_URI="https://github.com/akermu/${MY_PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" |
116 |
+ |
117 |
+LICENSE="GPL-3+" |
118 |
+SLOT="0" |
119 |
+KEYWORDS="~amd64 ~x86" |
120 |
+ |
121 |
+DEPEND="dev-libs/libvterm" |
122 |
+RDEPEND="${DEPEND} |
123 |
+ app-editors/emacs[dynamic-loading]" |
124 |
+ |
125 |
+S="${WORKDIR}/${MY_PN}-${COMMIT}" |
126 |
+PATCHES=( "${FILESDIR}"/${PN}-dont-compile.patch ) |
127 |
+SITEFILE="50${PN}-gentoo.el" |
128 |
+DOCS="README.md" |
129 |
+ |
130 |
+src_prepare() { |
131 |
+ cmake_src_prepare |
132 |
+} |
133 |
+ |
134 |
+src_configure() { |
135 |
+ local mycmakeargs=( "-DUSE_SYSTEM_LIBVTERM=ON" ) |
136 |
+ cmake_src_configure |
137 |
+} |
138 |
+ |
139 |
+src_compile() { |
140 |
+ cmake_src_compile |
141 |
+ elisp_src_compile |
142 |
+} |
143 |
+ |
144 |
+src_install() { |
145 |
+ elisp_src_install |
146 |
+ elisp-modules-install ${PN} vterm-module.so |
147 |
+} |