1 |
commit: 0a0e8bbe10212ebcce3c7ca0f8399a269c58b5df |
2 |
Author: Chema Alonso <nimiux <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Apr 1 11:43:47 2013 +0000 |
4 |
Commit: José María Alonso <nimiux <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Apr 1 11:43:47 2013 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/lisp.git;a=commit;h=0a0e8bbe |
7 |
|
8 |
dev-lisp/clsql: bump to version 6.4.0 |
9 |
|
10 |
--- |
11 |
dev-lisp/clsql/clsql-6.4.0.ebuild | 103 +++++++++++++++++++++++++++++++++++++ |
12 |
1 files changed, 103 insertions(+), 0 deletions(-) |
13 |
|
14 |
diff --git a/dev-lisp/clsql/clsql-6.4.0.ebuild b/dev-lisp/clsql/clsql-6.4.0.ebuild |
15 |
new file mode 100644 |
16 |
index 0000000..397768d |
17 |
--- /dev/null |
18 |
+++ b/dev-lisp/clsql/clsql-6.4.0.ebuild |
19 |
@@ -0,0 +1,103 @@ |
20 |
+# Copyright 1999-2013 Gentoo Foundation |
21 |
+# Distributed under the terms of the GNU General Public License v2 |
22 |
+# $Header: $ |
23 |
+ |
24 |
+EAPI=5 |
25 |
+ |
26 |
+inherit common-lisp-3 flag-o-matic multilib toolchain-funcs |
27 |
+ |
28 |
+DESCRIPTION="A multi-platform SQL interface for Common Lisp" |
29 |
+HOMEPAGE="http://clsql.b9.com/ |
30 |
+ http://www.cliki.net/CLSQL" |
31 |
+SRC_URI="http://files.b9.com/clsql/${P}.tar.gz" |
32 |
+ |
33 |
+LICENSE="LLGPL-2.1" |
34 |
+SLOT="0" |
35 |
+KEYWORDS="~amd64 ~ppc ~sparc ~x86" |
36 |
+IUSE="doc examples mysql odbc oracle postgres sqlite sqlite3" |
37 |
+ |
38 |
+RDEPEND="!dev-lisp/cl-sql |
39 |
+ dev-lisp/md5 |
40 |
+ >=dev-lisp/uffi-2.0.0 |
41 |
+ mysql? ( virtual/mysql ) |
42 |
+ odbc? ( dev-db/unixODBC ) |
43 |
+ oracle? ( dev-db/oracle-instantclient-basic ) |
44 |
+ postgres? ( dev-db/postgresql-base ) |
45 |
+ sqlite? ( dev-db/sqlite:0 ) |
46 |
+ sqlite3? ( dev-db/sqlite:3 )" |
47 |
+ |
48 |
+src_prepare() { |
49 |
+ sed -i "s,/usr/lib,/usr/$(get_libdir),g" "${S}"/${PN}-{mysql,uffi}.asd |
50 |
+ sed -i 's,"usr" "lib","usr" "'$(get_libdir)'",g' "${S}"/${PN}-{mysql,uffi}.asd |
51 |
+} |
52 |
+ |
53 |
+@cc() { |
54 |
+ local cc=$(tc-getCC) |
55 |
+ echo "${cc}" "${@}" |
56 |
+ "${cc}" "${@}" |
57 |
+} |
58 |
+ |
59 |
+src_compile() { |
60 |
+ strip-flags |
61 |
+ @cc uffi/clsql_uffi.c \ |
62 |
+ ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -rdynamic \ |
63 |
+ -fPIC -DPIC -shared -Wl,-soname=clsql_uffi -o uffi/clsql_uffi.so \ |
64 |
+ || die "Cannot build UFFI helper library" |
65 |
+ if use mysql; then |
66 |
+ @cc db-mysql/clsql_mysql.c \ |
67 |
+ ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} $(mysql_config --cflags) -rdynamic \ |
68 |
+ -fPIC -DPIC -shared -Wl,-soname=clsql_mysql -o db-mysql/clsql_mysql.so \ |
69 |
+ || die "Cannot build foreign glue to libmysqlclient" |
70 |
+ fi |
71 |
+} |
72 |
+ |
73 |
+install_clsql_pkg() { |
74 |
+ local pkgname="${1}" |
75 |
+ local libname="${pkgname}/${PN}_${pkgname}.so" |
76 |
+ |
77 |
+ cd "${S}" || die |
78 |
+ common-lisp-install-sources db-${pkgname} |
79 |
+ common-lisp-install-asdf ${PN}-${pkgname} |
80 |
+ if [ -f db-${1}/${PN}_${1}.so ]; then |
81 |
+ exeinto /usr/$(get_libdir)/${PN} ; doexe db-${pkgname}/${PN}_${pkgname}.so |
82 |
+ fi |
83 |
+} |
84 |
+ |
85 |
+install_clsql_postgresql() { |
86 |
+ install_clsql_pkg postgresql-socket |
87 |
+ install_clsql_pkg postgresql-socket3 |
88 |
+ install_clsql_pkg postgresql |
89 |
+} |
90 |
+ |
91 |
+src_install() { |
92 |
+ common-lisp-install-sources sql/*.lisp tests |
93 |
+ common-lisp-install-asdf ${PN} ${PN}-tests |
94 |
+ |
95 |
+ common-lisp-install-sources uffi/*.lisp |
96 |
+ common-lisp-install-asdf ${PN}-{uffi,cffi} |
97 |
+ exeinto /usr/$(get_libdir)/${PN} ; doexe uffi/${PN}_uffi.so |
98 |
+ |
99 |
+ use postgres && install_clsql_postgresql |
100 |
+ for dbtype in mysql odbc oracle sqlite sqlite3; do |
101 |
+ use ${dbtype} && install_clsql_pkg ${dbtype} |
102 |
+ done |
103 |
+ |
104 |
+ # TODO: figure out the dependencies |
105 |
+ install_clsql_pkg aodbc |
106 |
+ install_clsql_pkg db2 |
107 |
+ |
108 |
+ dodoc BUGS CONTRIBUTORS ChangeLog INSTALL LATEST-TEST-RESULTS NEWS README TODO |
109 |
+ if use doc ; then |
110 |
+ dodoc doc/clsql.pdf |
111 |
+ tar xfz doc/html.tar.gz -C "${T}" || die |
112 |
+ dohtml "${T}"/html/* |
113 |
+ docinto notes && dodoc notes/* |
114 |
+ fi |
115 |
+ use examples && docinto examples && dodoc -r examples/* |
116 |
+ |
117 |
+ dodir /etc |
118 |
+ cat > "${D}"/etc/clsql-init.lisp <<-EOF |
119 |
+ (clsql:push-library-path #p"/usr/$(get_libdir)/") |
120 |
+ (clsql:push-library-path #p"/usr/$(get_libdir)/clsql/") |
121 |
+ EOF |
122 |
+} |