1 | # $Id: Portfile,v 1.7 2008/05/01 01:46:50 lonstein Exp $# |
---|
2 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name cl-ppcre |
---|
7 | version 1.3.2 |
---|
8 | categories devel |
---|
9 | maintainers rlonstein@pobox.com |
---|
10 | |
---|
11 | description Portable Perl-compatible regular expressions for Common Lisp |
---|
12 | |
---|
13 | long_description CL-PPCRE is a fast, portable, thread-safe regular expression library \ |
---|
14 | for Common Lisp compatible with Perl under a BSD license. |
---|
15 | |
---|
16 | homepage http://weitz.de/cl-ppcre/ |
---|
17 | platforms darwin |
---|
18 | master_sites http://weitz.de/files/ |
---|
19 | |
---|
20 | distfiles ${name}${extract.suffix} |
---|
21 | distname ${name}-${version} |
---|
22 | |
---|
23 | checksums md5 23ceea63cb306ead203f5c4f41a4f1d2 \ |
---|
24 | sha1 4e2fb7e7bf732cbb07b0a87bab5b5d107b48ff69 \ |
---|
25 | rmd160 2b308153af31386bcd566e9cd2e63ac509b76e8a |
---|
26 | |
---|
27 | universal_variant no |
---|
28 | |
---|
29 | variant asdf_binary_locations description {Keep compiled Lisp files organized} { |
---|
30 | depends_lib port:asdf-binary-locations |
---|
31 | } |
---|
32 | |
---|
33 | variant sbcl description {Compile using Steel Bank Common Lisp} { |
---|
34 | depends_build port:sbcl |
---|
35 | } |
---|
36 | |
---|
37 | |
---|
38 | extract {} |
---|
39 | configure {} |
---|
40 | build {} |
---|
41 | |
---|
42 | set destroot-lisp "${destroot}${prefix}/share/common-lisp/" |
---|
43 | set lisp-system-path "#p\"${prefix}/share/common-lisp/systems/\"" |
---|
44 | |
---|
45 | destroot { |
---|
46 | xinstall -m 0755 -d ${destroot-lisp}/src |
---|
47 | xinstall -m 0755 -d ${destroot-lisp}/systems |
---|
48 | system "cd ${destroot-lisp}/src && \ |
---|
49 | ${extract.cmd} ${extract.pre_args} ${distpath}/${distfile} ${extract.post_args}" |
---|
50 | system "find ${destroot-lisp}/src/${name}-${version} -type d -exec chmod 755 {} \\;" |
---|
51 | system "find ${destroot-lisp}/src/${name}-${version} -type f -exec chmod 644 {} \\;" |
---|
52 | |
---|
53 | foreach f [glob -dir ${destroot-lisp}/src/${name}-${version} -tails *.asd] { |
---|
54 | ln -sf ../src/${name}-${version}/$f ${destroot-lisp}/systems/$f |
---|
55 | } |
---|
56 | } |
---|
57 | |
---|
58 | post-destroot { |
---|
59 | proc asdf-load {lisp lisp-system-path destroot-system name} { |
---|
60 | set loadops "${lisp} --no-userinit \ |
---|
61 | --eval '(require \"asdf\")' \ |
---|
62 | --eval '(in-package :cl-user)' \ |
---|
63 | --eval '(setf asdf:*central-registry* (list* (quote *default-pathname-defaults*) ${lisp-system-path} ${destroot-system} asdf:*central-registry*))'" |
---|
64 | if {[variant_isset asdf_binary_locations]} { |
---|
65 | append loadops " --eval '(asdf:operate (quote asdf:load-op) (quote asdf-binary-locations))'" |
---|
66 | } |
---|
67 | append loadops " --eval '(asdf:operate (quote asdf:load-op) (quote ${name}))'" |
---|
68 | system "${loadops}" |
---|
69 | } |
---|
70 | |
---|
71 | if {[variant_isset sbcl]} { |
---|
72 | set destroot-system "#p\"${destroot-lisp}/systems/\"" |
---|
73 | asdf-load "/opt/local/bin/sbcl" ${lisp-system-path} ${destroot-system} ${name} |
---|
74 | } |
---|
75 | |
---|
76 | } |
---|