1 # Maintainer: mrshpot <mrshpot at gmail dot com>
2 # Contributor: veox <box 55 [shift-two] mail [dot] ru>
5 _clname=cffi # used in CL scope, not package scope
8 pkgdesc="Common Foreign Function Interface for Common Lisp"
9 arch=('i686' 'x86_64') # 32-bit only? needs gnu/stubs-32.h
10 url="http://common-lisp.net/project/cffi/"
13 # TODO: replace this segment with 'common-lisp' when all provide it.
14 # TODO: compiling 'tests' with 'make' on x86_64 will fail due to the way
15 # tests/GNUmakefile is written: it issues '-m32' to gcc, which
16 # (probably?) requires the 'gcc-multilib' package, without it, only
17 # the 64-bit version can be compiled
18 if pacman -Qq clisp-new-clx &>/dev/null; then
19 depends=('clisp-new-clx' 'cl-asdf' 'cl-alexandria' 'cl-babel' 'cl-trivial-features')
20 elif pacman -Qq clisp-gtk2 &>/dev/null; then
21 depends=('clisp-gtk2' 'cl-asdf' 'cl-alexandria' 'cl-babel' 'cl-trivial-features')
22 elif pacman -Qq sbcl &>/dev/null; then
23 depends=('sbcl' 'cl-alexandria' 'cl-babel' 'cl-trivial-features')
24 elif pacman -Qq clisp &>/dev/null; then
25 depends=('clisp' 'cl-asdf' 'cl-alexandria' 'cl-babel' 'cl-trivial-features')
26 elif pacman -Qq cmucl &>/dev/null; then
27 depends=('cmucl' 'cl-asdf' 'cl-alexandria' 'cl-babel' 'cl-trivial-features')
29 depends=('sbcl' 'cl-alexandria' 'cl-babel' 'cl-trivial-features')
32 install=${pkgname}.install
33 source=("http://common-lisp.net/project/${_clname}/releases/${_clname}_${pkgver}.tar.gz")
34 md5sums=('59f50b4cc5aef078bb18092527bfc994')
38 install -d ${pkgdir}/usr/share/common-lisp/source/${_clname}/examples
39 install -d ${pkgdir}/usr/share/common-lisp/source/${_clname}/grovel
40 install -d ${pkgdir}/usr/share/common-lisp/source/${_clname}/src
41 # install -d ${pkgdir}/usr/share/common-lisp/source/${_clname}/tests
42 install -d ${pkgdir}/usr/share/common-lisp/source/${_clname}/uffi-compat
43 install -d ${pkgdir}/usr/share/common-lisp/systems
44 install -d ${pkgdir}/usr/share/licenses/${pkgname}
46 cd ${srcdir}/${_clname}_${pkgver}
48 install -m 644 -t ${pkgdir}/usr/share/common-lisp/source/${_clname}/examples \
49 ${srcdir}/${_clname}_${pkgver}/examples/*.lisp
50 install -m 644 -t ${pkgdir}/usr/share/common-lisp/source/${_clname}/grovel \
51 ${srcdir}/${_clname}_${pkgver}/grovel/*.lisp
52 install -m 644 -t ${pkgdir}/usr/share/common-lisp/source/${_clname}/src \
53 ${srcdir}/${_clname}_${pkgver}/src/*.lisp
54 # install -m 644 -t ${pkgdir}/usr/share/common-lisp/source/${_clname}/tests \
55 # ${srcdir}/${_clname}_${pkgver}/tests/*
56 install -m 644 -t ${pkgdir}/usr/share/common-lisp/source/${_clname}/uffi-compat \
57 ${srcdir}/${_clname}_${pkgver}/uffi-compat/*.lisp
58 install -m 644 -t ${pkgdir}/usr/share/common-lisp/source/${_clname} \
59 ${srcdir}/${_clname}_${pkgver}/*.asd
61 install -m 644 ${srcdir}/${_clname}_${pkgver}/COPYRIGHT \
62 ${pkgdir}/usr/share/licenses/${pkgname}
64 cd ${pkgdir}/usr/share/common-lisp/systems
65 ln -s ../source/${_clname}/${_clname}.asd .
66 ln -s ../source/${_clname}/${_clname}-examples.asd .
67 ln -s ../source/${_clname}/${_clname}-grovel.asd .
68 # ln -s ../source/${_clname}/${_clname}-tests.asd .
69 ln -s ../source/${_clname}/${_clname}-uffi-compat.asd .
72 # vim:set ts=2 sw=4 et nospell: