blob: a13ea02114418a58fabf2c7e3b22e5c7309f77d4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit common-lisp-3 eutils flag-o-matic multilib toolchain-funcs
DESCRIPTION="Linedit is a readline-style library written in Common Lisp."
HOMEPAGE="http://www.common-lisp.net/project/linedit/"
SRC_URI="mirror://gentoo/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~sparc ~x86"
IUSE=""
RDEPEND="dev-lisp/alexandria
dev-lisp/osicat
dev-lisp/terminfo
dev-lisp/uffi"
HTML_DOCS=( public_html/. )
@cc() {
local cc=$(tc-getCC)
echo "${cc}" "${@}"
"${cc}" "${@}"
}
create_uffi_loader() {
cat > uffi-loader.lisp <<-EOF
;;;; -*- mode: lisp; syntax: common-lisp; indent-tabs-mode: nil; base: 10; package: linedit -*-
(in-package :linedit)
(uffi:load-foreign-library #p"/usr/$(get_libdir)/linedit/signals.so")
(uffi:load-foreign-library #p"/usr/$(get_libdir)/linedit/terminal_glue.so")
EOF
}
src_prepare() {
# terminfo lives in a separate package
rm "${S}"/terminfo.* || die
eapply "${FILESDIR}"/${PV}-${PN}.asd-uffi-glue.patch
eapply "${FILESDIR}"/${PV}-${PN}.asd-drop-madeira-port.patch
create_uffi_loader
eapply_user
}
src_compile() {
strip-flags
@cc "terminal_glue.c" ${CFLAGS} ${LDFLAGS} \
-fPIC -DPIC -shared -Wl,-soname="terminal_glue" -o "terminal_glue.so" \
|| die
}
src_install() {
common-lisp-install-sources -t all *.lisp ports/
common-lisp-install-asdf
einstalldocs
exeinto "/usr/$(get_libdir)/${PN}"
doexe *.so
}
|