Gentoo Archives: gentoo-commits

From: "José María Alonso" <nimiux@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/lisp:master commit in: dev-lisp/linedit/, dev-lisp/linedit/files/
Date: Mon, 16 Oct 2017 21:16:11
Message-Id: 1508188570.6aa322fae7f3c46b013dea5c0942b6272b1a4fcb.nimiux@gentoo
1 commit: 6aa322fae7f3c46b013dea5c0942b6272b1a4fcb
2 Author: Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
3 AuthorDate: Mon Oct 16 21:16:10 2017 +0000
4 Commit: José María Alonso <nimiux <AT> gentoo <DOT> org>
5 CommitDate: Mon Oct 16 21:16:10 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/lisp.git/commit/?id=6aa322fa
7
8 dev-lisp/linedit: Bumps version to 0.17.5
9
10 .../0.17.5-linedit.asd-drop-madeira-port.patch | 21 ++++++++
11 .../files/0.17.5-linedit.asd-uffi-glue.patch | 58 ++++++++++++++++++++++
12 .../{linedit-9999.ebuild => linedit-0.17.5.ebuild} | 35 ++++++-------
13 dev-lisp/linedit/linedit-9999.ebuild | 1 +
14 4 files changed, 96 insertions(+), 19 deletions(-)
15
16 diff --git a/dev-lisp/linedit/files/0.17.5-linedit.asd-drop-madeira-port.patch b/dev-lisp/linedit/files/0.17.5-linedit.asd-drop-madeira-port.patch
17 new file mode 100644
18 index 00000000..a6576ec9
19 --- /dev/null
20 +++ b/dev-lisp/linedit/files/0.17.5-linedit.asd-drop-madeira-port.patch
21 @@ -0,0 +1,21 @@
22 +diff -Nuar a/linedit.asd b/linedit.asd
23 +--- a/linedit.asd 2017-10-16 23:10:11.424173773 +0200
24 ++++ b/linedit.asd 2017-10-16 23:10:48.764173614 +0200
25 +@@ -30,7 +30,6 @@
26 + :licence "MIT"
27 + :author "Nikodemus Siivola <nikodemus@××××××××××××.net>"
28 + :depends-on (:uffi :terminfo :osicat :alexandria)
29 +- :defsystem-depends-on (:madeira-port)
30 + :components
31 + (
32 + ;; Common
33 +@@ -60,6 +59,6 @@
34 + (:module "ports"
35 + :depends-on ("main")
36 + :components
37 +- ((:madeira-port "sbcl" :when :sbcl)
38 +- (:madeira-port "ccl" :when :ccl)
39 +- (:madeira-port "generic" :unless (:or :sbcl :ccl))))))
40 ++ ((:file "sbcl" :if-feature :sbcl)
41 ++ (:file "ccl" :if-feature :ccl)
42 ++ (:file "generic" :if-feature (:not (:or :sbcl :ccl)))))))
43
44 diff --git a/dev-lisp/linedit/files/0.17.5-linedit.asd-uffi-glue.patch b/dev-lisp/linedit/files/0.17.5-linedit.asd-uffi-glue.patch
45 new file mode 100644
46 index 00000000..fbbd38da
47 --- /dev/null
48 +++ b/dev-lisp/linedit/files/0.17.5-linedit.asd-uffi-glue.patch
49 @@ -0,0 +1,58 @@
50 +diff -Nuar a/linedit.asd b/linedit.asd
51 +--- a/linedit.asd 2015-06-24 00:10:05.000000000 +0200
52 ++++ b/linedit.asd 2017-10-16 21:17:13.314174329 +0200
53 +@@ -24,40 +24,6 @@
54 +
55 + (in-package :linedit-system)
56 +
57 +-(defvar *gcc* "/usr/bin/gcc")
58 +-
59 +-(defvar *gcc-options*
60 +- #-(or darwin macosx)
61 +- (list "-shared" "-fPIC")
62 +- #+(or darwin macosx)
63 +- (append
64 +- (list "-dynamic" "-bundle")
65 +- #+(or x86 x86-64)
66 +- (list "-arch" "x86_64" "-arch" "i386")
67 +- #-sbcl
68 +- (list "/usr/lib/bundle1.o" "-flat_namespace" "-undefined" "suppress")))
69 +-
70 +-;;; Separate class so that we don't mess up other packages
71 +-(defclass uffi-c-source-file (c-source-file) ())
72 +-
73 +-(defmethod output-files ((o compile-op) (c uffi-c-source-file))
74 +- (list (make-pathname :name (component-name c)
75 +- :type #-(or darwin macosx) "so" #+(or darwin macosx) "dylib"
76 +- :defaults (component-pathname c))))
77 +-
78 +-(defmethod perform ((o load-op) (c uffi-c-source-file))
79 +- (let ((loader (intern (symbol-name '#:load-foreign-library) :uffi)))
80 +- (dolist (f (asdf::input-files o c))
81 +- (funcall loader f :module (pathname-name f)))))
82 +-
83 +-(defmethod perform ((o compile-op) (c uffi-c-source-file))
84 +- (unless (zerop (run-shell-command "~S ~S ~{~S ~}-o ~S"
85 +- *gcc*
86 +- (namestring (component-pathname c))
87 +- *gcc-options*
88 +- (namestring (car (output-files o c)))))
89 +- (error 'operation-error :component c :operation o)))
90 +-
91 + (defsystem :linedit
92 + :version "0.17.5"
93 + :description "Readline-style library."
94 +@@ -74,10 +40,10 @@
95 + (:file "matcher" :depends-on ("packages"))
96 +
97 + ;; Backend
98 +- (:file "backend" :depends-on ("utility-macros"))
99 +- (:uffi-c-source-file "terminal_glue")
100 ++ (:file "uffi-loader" :depends-on ("packages"))
101 ++ (:file "backend" :depends-on ("utility-macros" "uffi-loader"))
102 + (:file "terminal-translations" :depends-on ("packages"))
103 +- (:file "terminal" :depends-on ("terminal-translations" "backend" "terminal_glue"))
104 ++ (:file "terminal" :depends-on ("terminal-translations" "backend" "uffi-loader"))
105 + (:file "smart-terminal" :depends-on ("terminal" "matcher"))
106 + (:file "dumb-terminal" :depends-on ("terminal"))
107 +
108
109 diff --git a/dev-lisp/linedit/linedit-9999.ebuild b/dev-lisp/linedit/linedit-0.17.5.ebuild
110 similarity index 55%
111 copy from dev-lisp/linedit/linedit-9999.ebuild
112 copy to dev-lisp/linedit/linedit-0.17.5.ebuild
113 index 01dcc0d7..c120ec65 100644
114 --- a/dev-lisp/linedit/linedit-9999.ebuild
115 +++ b/dev-lisp/linedit/linedit-0.17.5.ebuild
116 @@ -3,24 +3,23 @@
117
118 EAPI=6
119
120 -inherit common-lisp-3 flag-o-matic git-r3 multilib toolchain-funcs
121 +inherit common-lisp-3 eutils flag-o-matic multilib toolchain-funcs
122
123 DESCRIPTION="Linedit is a readline-style library written in Common Lisp."
124 HOMEPAGE="http://www.common-lisp.net/project/linedit/"
125 -EGIT_REPO_URI="https://gitlab.common-lisp.net/${PN}/${PN}.git"
126 +SRC_URI="https://dev.gentoo.org/~nimiux/${CATEGORY}/${PN}/${P}.tar.bz2"
127
128 LICENSE="MIT"
129 SLOT="0"
130 +KEYWORDS="~amd64 ~ppc ~sparc ~x86"
131 IUSE=""
132
133 RDEPEND="!dev-lisp/cl-${PN}
134 - dev-lisp/alexandria
135 - dev-lisp/madeira-port
136 - >=dev-lisp/osicat-0.6.0
137 + dev-lisp/osicat
138 dev-lisp/terminfo
139 dev-lisp/uffi"
140
141 -CFILES="terminal_glue"
142 +HTML_DOCS=( public_html/. )
143
144 @cc() {
145 local cc=$(tc-getCC)
146 @@ -33,33 +32,31 @@ create_uffi_loader() {
147 ;;;; -*- mode: lisp; syntax: common-lisp; indent-tabs-mode: nil; base: 10; package: linedit -*-
148 (in-package :linedit)
149
150 + (uffi:load-foreign-library #p"/usr/$(get_libdir)/linedit/signals.so")
151 (uffi:load-foreign-library #p"/usr/$(get_libdir)/linedit/terminal_glue.so")
152 EOF
153 }
154
155 -cleanup_terminfo_files() {
156 - rm "${D}/${CLSOURCEROOT}/${PN}/terminfo.lisp" || die
157 - rm "${D}/${CLSYSTEMROOT}/terminfo.asd" || die
158 -}
159 -
160 src_prepare() {
161 - eapply "${FILESDIR}"/${PV}-${PN}.asd-uffi-glue-gentoo.patch
162 + default
163 + # terminfo lives in a separate package
164 + rm "${S}"/terminfo.* || die
165 + eapply "${FILESDIR}"/${PV}-${PN}.asd-uffi-glue.patch
166 + eapply "${FILESDIR}"/${PV}-${PN}.asd-drop-madeira-port.patch
167 create_uffi_loader
168 }
169
170 src_compile() {
171 strip-flags
172 - for filename in "${CFILES}" ; do
173 - @cc "${filename}.c" ${CFLAGS} ${LDFLAGS} \
174 - -fPIC -DPIC -shared -Wl,-soname="${filename}" -o "${filename}.so" \
175 - || die "Cannot compile ${filename}.c"
176 - done
177 + @cc "terminal_glue.c" ${CFLAGS} ${LDFLAGS} \
178 + -fPIC -DPIC -shared -Wl,-soname="terminal_glue" -o "terminal_glue.so" \
179 + || die
180 }
181
182 src_install() {
183 - common-lisp-install-sources *.lisp ports/
184 + common-lisp-install-sources -t all *.lisp ports/
185 common-lisp-install-asdf
186 - cleanup_terminfo_files
187 + einstalldocs
188 exeinto "/usr/$(get_libdir)/${PN}"
189 doexe *.so
190 }
191
192 diff --git a/dev-lisp/linedit/linedit-9999.ebuild b/dev-lisp/linedit/linedit-9999.ebuild
193 index 01dcc0d7..bccaff67 100644
194 --- a/dev-lisp/linedit/linedit-9999.ebuild
195 +++ b/dev-lisp/linedit/linedit-9999.ebuild
196 @@ -43,6 +43,7 @@ cleanup_terminfo_files() {
197 }
198
199 src_prepare() {
200 + default
201 eapply "${FILESDIR}"/${PV}-${PN}.asd-uffi-glue-gentoo.patch
202 create_uffi_loader
203 }