source: project/release/4/cairo/trunk/cairo.setup @ 31288

Last change on this file since 31288 was 31288, checked in by Christian Kellermann, 7 years ago

Add support for blend mode operators, brought to you by Matt Gushee

File size: 1.0 KB
Line 
1;;;; -*- Scheme -*-
2(use srfi-1)
3(use srfi-13)
4
5;;; on some systems cairo is compiled with pthread support using the
6;;; option '-pthread'. We need to parse the pkgconfig output to prefix
7;;; any non-include directives with '-C' so that csc passes them through
8;;; to the c-compiler.
9(define mark-compiler-options 
10  (lambda (m s)
11    (reduce (lambda (s1 s2) (string-append s1 " " s2))
12            ""
13            (map (lambda (option)
14                   (if (string-prefix? "-I" option)
15                       option
16                       (string-append m " " option)))
17                 (string-tokenize s)))))
18
19(let ((pkg-cflags (mark-compiler-options "-C" (with-input-from-pipe "pkg-config --cflags cairo" read-line)))
20      (pkg-lflags (mark-compiler-options "-L" (with-input-from-pipe "pkg-config --libs cairo" read-line))))
21      (compile -s -O2 cairo.scm -j cairo -lcairo ,pkg-cflags ,pkg-lflags)
22      (compile -c -O2 cairo.scm -unit cairo ,pkg-cflags ,pkg-lflags)
23      (compile -s -O2 cairo.import.scm ,pkg-cflags ,pkg-lflags))
24
25(install-extension 
26 'cairo
27 '("cairo.so" "cairo.import.so" "cairo.o") 
28 '((version 0.1.15)))
Note: See TracBrowser for help on using the repository browser.