Changeset 27337 in project for release/4/sdl-ttf/trunk/sdl-ttf.setup


Ignore:
Timestamp:
08/30/12 12:17:32 (9 years ago)
Author:
megane
Message:

sdl-ttf: - supports whatever the sdl egg supported + some functionality to extract glyph metrics

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/sdl-ttf/trunk/sdl-ttf.setup

    r27336 r27337  
    11;;;; sdl.setup -*- Scheme -*-
    2 
    3 
    4 (define (check-depends)
    5      
    6   (let* ((lib-fun-pack '(("SDL" "SDL_Init" "libsdl1.2-dev")
    7                          ("SDL_gfx" "polygonColor" "libsdl-gfx1.2-dev")
    8                          ("SDL_net" "SDLNet_Init" "libsdl-net1.2-dev")
    9                          ("SDL_ttf" "TTF_Init" "libsdl-ttf2.0-dev")
    10                          ("SDL_image" "IMG_Init" "libsdl-image1.2-dev")))
    11          (missing (filter (lambda (lib-fun)
    12                             (not (find-library (first lib-fun) (second lib-fun))))
    13                           lib-fun-pack)))
    14     (for-each
    15      (lambda (lib-fun)
    16        (print "\nWARNING: You seem to be missing the library " (first lib-fun) "!"))
    17      missing)
    18     (cond-expand
    19      (linux
    20       (unless (null? missing)
    21         (print "\nSuggested package(s) to install: " (map third missing))))
    22      (else #f))))
    23 
    24 (check-depends)
    252
    263(let* ((escape-flags (lambda (fs)
     
    3512                          (escape-flags
    3613                           (with-input-from-pipe "sdl-config --cflags" read-line))))
    37        (sdl-lflags (apply string-append
    38                           ;; sdl-config doesn't give these
    39                           " -lSDL_gfx -lSDL_net -lSDL_ttf -lSDL_image"
    40                           (escape-flags
    41                            (with-input-from-pipe "sdl-config --libs" read-line))))
     14       
    4215       (types? (version>=? (chicken-version) "4.7.4"))
    43        (files (append '("sdl.so"
    44                         "sdl.import.so"
    45                         "sdl-foreign-types-include.scm")
    46                       (if types? '("sdl.types") '()))))
    47   (compile ,@(if types? '(-emit-type-file sdl.types) '())
    48            -s -O3 -d1 sdl.scm -j sdl -lSDL ,sdl-cflags ,sdl-lflags)
    49   (compile -s -O3 -d0 sdl.import.scm ,sdl-cflags ,sdl-lflags)
     16       (files (append '("sdl-ttf.so"
     17                        "sdl-ttf.import.so")
     18                      (if types? '("sdl-ttf.types") '()))))
     19  (compile ,@(if types? '(-emit-type-file sdl-ttf.types) '())
     20           -I ,(repository-path)
     21           -s -O3 -v -d1 sdl-ttf.scm -j sdl-ttf ,sdl-cflags -lSDL_ttf)
     22  (compile -s -O3 -d0 sdl-ttf.import.scm)
    5023
    51   (install-extension 'sdl files '((version "0.5.5"))))
     24  (install-extension 'sdl-ttf files '((version "0.1"))))
    5225
Note: See TracChangeset for help on using the changeset viewer.