summaryrefslogtreecommitdiff
path: root/pcr/cl-ppcre
diff options
context:
space:
mode:
Diffstat (limited to 'pcr/cl-ppcre')
-rw-r--r--pcr/cl-ppcre/LICENSE25
-rw-r--r--pcr/cl-ppcre/PKGBUILD41
-rw-r--r--pcr/cl-ppcre/cl-ppcre.install73
3 files changed, 139 insertions, 0 deletions
diff --git a/pcr/cl-ppcre/LICENSE b/pcr/cl-ppcre/LICENSE
new file mode 100644
index 000000000..8f122e6eb
--- /dev/null
+++ b/pcr/cl-ppcre/LICENSE
@@ -0,0 +1,25 @@
+Copyright (c) 2002-2007, Dr. Edmund Weitz. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials
+ provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
+OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/pcr/cl-ppcre/PKGBUILD b/pcr/cl-ppcre/PKGBUILD
new file mode 100644
index 000000000..b136c4ac9
--- /dev/null
+++ b/pcr/cl-ppcre/PKGBUILD
@@ -0,0 +1,41 @@
+# Maintainer: mrshpot <mrshpot at gmail dot com>
+# Contributor: veox <cy at wre dot ath dot cx>
+# Contributor: joyfulgirl <joyfulgirl (at) archlinux.us>
+# Contributor: Jonathan Friedman <jonf@gojon.com>
+# Maintainer : Parabola GNU / Linux-libre <aurelien@cwb.io>
+
+pkgname=cl-ppcre
+pkgver=2.0.3
+pkgrel=2
+pkgdesc="Perl-compatible, portable regexp library for Common Lisp"
+arch=('i686' 'x86_64')
+url="http://www.weitz.de/cl-ppcre/"
+license=('BSD')
+
+depends=('common-lisp' 'cl-asdf')
+
+install=cl-ppcre.install
+source=('http://weitz.de/files/cl-ppcre.tar.gz' 'LICENSE')
+md5sums=('bd5648fd3c8b6f89eea43f5b82b99aa1'
+ 'c6aa01dce26b45aa916329701a448d11')
+
+build() {
+ install -d ${pkgdir}/usr/share/common-lisp/source/${pkgname}
+ install -d ${pkgdir}/usr/share/common-lisp/systems
+ install -d ${pkgdir}/usr/share/licenses/${pkgname}
+
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ install -m 644 -t ${pkgdir}/usr/share/common-lisp/source/${pkgname} \
+ ${srcdir}/${pkgname}-${pkgver}/*.lisp
+ install -m 644 -t ${pkgdir}/usr/share/common-lisp/source/${pkgname} \
+ ${srcdir}/${pkgname}-${pkgver}/*.asd
+ install -m 644 ${srcdir}/LICENSE \
+ ${pkgdir}/usr/share/licenses/${pkgname}
+
+ cd ${pkgdir}/usr/share/common-lisp/systems
+ ln -s ../source/${pkgname}/${pkgname}.asd .
+ ln -s ../source/${pkgname}/${pkgname}-unicode.asd .
+}
+
+# vim:set ts=2 sw=4 et nospell:
diff --git a/pcr/cl-ppcre/cl-ppcre.install b/pcr/cl-ppcre/cl-ppcre.install
new file mode 100644
index 000000000..9ad84d1e1
--- /dev/null
+++ b/pcr/cl-ppcre/cl-ppcre.install
@@ -0,0 +1,73 @@
+_pkgname=cl-ppcre
+_compile_log=n
+_lisp=()
+
+if pacman -Qq clisp &>/dev/null ||
+ pacman -Qq clisp-gtk2 &>/dev/null ||
+ pacman -Qq clisp-new-clx &>/dev/null; then
+ _lisp=(${_lisp[@]} 'clisp')
+fi
+if pacman -Qq sbcl &>/dev/null; then
+ _lisp=(${_lisp[@]} 'sbcl')
+fi
+if pacman -Qq cmucl &> /dev/null; then
+ _lisp=(${_lisp[@]} 'cmucl')
+fi
+
+_compile_sbcl() {
+ sbcl --noinform --no-sysinit --no-userinit \
+ --eval "(require :asdf)" \
+ --eval "(pushnew #p\"/usr/share/common-lisp/systems/\" asdf:*central-registry* :test #'equal)" \
+ --eval "(asdf:operate 'asdf:compile-op '${_pkgname})" \
+ --eval "(quit)" &> ${_compile_log_file} || return 1
+}
+_compile_clisp() {
+ clisp --silent -norc -x \
+ "(load #p\"/usr/share/common-lisp/source/asdf/asdf.lisp\")
+ (pushnew #p\"/usr/share/common-lisp/systems/\" asdf:*central-registry* :test #'equal)
+ (asdf:operate 'asdf:compile-op '${_pkgname})
+ (quit)" &> ${_compile_log_file} || return 1
+}
+_compile_cmucl() {
+ cmucl -quiet -nositeinit -noinit -eval \
+ "(load #p\"/usr/share/common-lisp/source/asdf/asdf.lisp\")
+ (pushnew #p\"/usr/share/common-lisp/systems/\" asdf:*central-registry* :test #'equal)
+ (asdf:operate 'asdf:compile-op '${_pkgname})
+ (quit)" &> ${_compile_log_file} || return 1
+}
+
+post_install() {
+ for _lispiter in ${_lisp[@]}; do
+ echo "---> Compiling lisp files using ${_lispiter} <---"
+ if [ $_compile_log = 'y' ]; then
+ _compile_log_file=/tmp/${_pkgname}_${_lispiter}.log
+ else
+ _compile_log_file=/dev/null
+ fi
+ _compile_${_lispiter}
+ echo "---> Done compiling lisp files (using ${_lispiter}) <---"
+ done
+
+ cat << EOM
+
+ To load this library, load asdf and then run the following lines
+ (or their equivalent for your lisp of choice):
+
+ (push #p"/usr/share/common-lisp/systems/" asdf:*central-registry*)
+ (asdf:operate 'asdf:load-op '${_pkgname})
+EOM
+}
+
+post_upgrade() {
+ post_install
+}
+
+pre_remove() {
+ rm -f /usr/share/common-lisp/source/${_pkgname}/{*.fas,*.fasl,*.lib,*.x86f}
+}
+
+pre_upgrade() {
+ pre_remove
+}
+
+# End of file