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/files/, dev-lisp/linedit/
Date: Sat, 26 Jul 2014 15:47:05
Message-Id: 1406389683.309cbe75930279a6f3ecc121d7e0b1e9fee3fc76.nimiux@gentoo
1 commit: 309cbe75930279a6f3ecc121d7e0b1e9fee3fc76
2 Author: Chema Alonso <nimiux <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jul 26 15:48:03 2014 +0000
4 Commit: José María Alonso <nimiux <AT> gentoo <DOT> org>
5 CommitDate: Sat Jul 26 15:48:03 2014 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/lisp.git;a=commit;h=309cbe75
7
8 dev-lisp/linedit: new live ebuild
9
10 ---
11 .../files/9999-linedit.asd-uffi-glue-gentoo.patch | 20 +++++++
12 dev-lisp/linedit/linedit-9999.ebuild | 62 ++++++++++++++++++++++
13 2 files changed, 82 insertions(+)
14
15 diff --git a/dev-lisp/linedit/files/9999-linedit.asd-uffi-glue-gentoo.patch b/dev-lisp/linedit/files/9999-linedit.asd-uffi-glue-gentoo.patch
16 new file mode 100644
17 index 0000000..97dabc4
18 --- /dev/null
19 +++ b/dev-lisp/linedit/files/9999-linedit.asd-uffi-glue-gentoo.patch
20 @@ -0,0 +1,20 @@
21 +diff -Nuar a/linedit.asd b/linedit.asd
22 +--- a/linedit.asd 2014-07-26 14:24:03.109913304 +0200
23 ++++ b/linedit.asd 2014-07-26 14:25:34.279912792 +0200
24 +@@ -75,10 +75,13 @@
25 + (:file "matcher" :depends-on ("packages"))
26 +
27 + ;; Backend
28 +- (:file "backend" :depends-on ("utility-macros"))
29 +- (:uffi-c-source-file "terminal_glue")
30 ++ ;(:file "backend" :depends-on ("utility-macros"))
31 ++ ;(:uffi-c-source-file "terminal_glue")
32 ++ (:file "uffi-loader" :depends-on ("packages"))
33 ++ (:file "backend" :depends-on ("utility-macros" "uffi-loader"))
34 ++
35 + (:file "terminal-translations" :depends-on ("packages"))
36 +- (:file "terminal" :depends-on ("terminal-translations" "backend" "terminal_glue"))
37 ++ (:file "terminal" :depends-on ("terminal-translations" "backend" "uffi-loader"))
38 + (:file "smart-terminal" :depends-on ("terminal" "matcher"))
39 + (:file "dumb-terminal" :depends-on ("terminal"))
40 +
41
42 diff --git a/dev-lisp/linedit/linedit-9999.ebuild b/dev-lisp/linedit/linedit-9999.ebuild
43 new file mode 100644
44 index 0000000..6151256
45 --- /dev/null
46 +++ b/dev-lisp/linedit/linedit-9999.ebuild
47 @@ -0,0 +1,62 @@
48 +# Copyright 1999-2014 Gentoo Foundation
49 +# Distributed under the terms of the GNU General Public License v2
50 +# $Header: $
51 +
52 +EAPI=5
53 +
54 +inherit common-lisp-3 eutils flag-o-matic git-2 multilib toolchain-funcs
55 +
56 +DESCRIPTION="Linedit is a readline-style library written in Common Lisp."
57 +HOMEPAGE="http://www.common-lisp.net/project/linedit/"
58 +EGIT_REPO_URI="git://common-lisp.net/projects/${PN}/${PN}.git"
59 +
60 +LICENSE="MIT"
61 +SLOT="0"
62 +KEYWORDS="~amd64 ~x86"
63 +IUSE=""
64 +
65 +RDEPEND="!dev-lisp/cl-${PN}
66 + dev-lisp/alexandria
67 + dev-lisp/madeira-port
68 + >=dev-lisp/osicat-0.6.0
69 + dev-lisp/terminfo
70 + dev-lisp/uffi"
71 +
72 +CFILES="terminal_glue"
73 +
74 +@cc() {
75 + local cc=$(tc-getCC)
76 + echo "${cc}" "${@}"
77 + "${cc}" "${@}"
78 +}
79 +
80 +
81 +create_uffi_loader() {
82 + cat > uffi-loader.lisp <<-EOF
83 + ;;;; -*- mode: lisp; syntax: common-lisp; indent-tabs-mode: nil; base: 10; package: linedit -*-
84 + (in-package :linedit)
85 +
86 + (uffi:load-foreign-library #p"/usr/$(get_libdir)/linedit/terminal_glue.so")
87 + EOF
88 +}
89 +
90 +src_prepare() {
91 + epatch "${FILESDIR}"/${PV}-${PN}.asd-uffi-glue-gentoo.patch
92 + create_uffi_loader
93 +}
94 +
95 +src_compile() {
96 + strip-flags
97 + for filename in "${CFILES}" ; do
98 + @cc "${filename}.c" ${CFLAGS} ${LDFLAGS} \
99 + -fPIC -DPIC -shared -Wl,-soname="${filename}" -o "${filename}.so" \
100 + || die "Cannot compile ${filename}.c"
101 + done
102 +}
103 +
104 +src_install() {
105 + common-lisp-install-sources *.lisp ports/
106 + common-lisp-install-asdf
107 + exeinto "/usr/$(get_libdir)/${PN}"
108 + doexe *.so
109 +}