Changeset 14302 in project


Ignore:
Timestamp:
04/20/09 04:25:45 (11 years ago)
Author:
Alex Shinn
Message:

iconv for chicken 4

Location:
release/4/iconv
Files:
1 added
2 edited
1 copied

Legend:

Unmodified
Added
Removed
  • release/4/iconv/trunk/iconv.scm

    r6315 r14302  
    1010;; Documentation is available in HTML format.
    1111;;
    12 ;; Version: 1.5
     12;; Version: 1.6
    1313;;
    1414;; Newer versions might be available at:
     
    1616;;    http://anonymous:@afc.no-ip.info:8000/svn/home/src/chicken-eggs/iconv
    1717
    18 (declare
    19   (no-procedure-checks-for-usual-bindings)
    20   (unused
    21     ;stop the warning
    22     iconv_build_result)
    23   (export
    24     iconv-open iconv))
     18(define-external (iconv_build_result (int len)) scheme-object
     19  (make-string len))
     20
     21(module iconv
     22  (iconv-open iconv)
     23
     24(import scheme chicken extras foreigners)
    2525
    2626(declare (foreign-declare "#include <iconv.h>\n#include <errno.h>\n"))
     
    4141    ((cd src invalid) (iconv cd src invalid (* (string-length src) 2)))
    4242    ((cd src invalid dstlen) (iconv-real cd src invalid dstlen))))
    43 
    44 (define-external (iconv_build_result (int len)) scheme-object
    45   (make-string len) )
    4643
    4744(define iconv-real
     
    10097EOF
    10198))
     99
     100)
  • release/4/iconv/trunk/iconv.setup

    r12533 r14302  
    44  (if (or (eq? 'macosx (software-version))
    55          (eq? 'unknown (software-version)))
    6     "-liconv"
    7     ""))
     6      '(-liconv)
     7      '()))
    88
    9 (define has-exports? (string>=? (chicken-version) "2.310"))
     9(compile -s -O2 -d0 -j iconv iconv.scm ,@libiconv)
     10(compile -s -O2 -d0 iconv.import.scm)
    1011
    11 (define (dynld-name fn)
    12   (make-pathname #f fn ##sys#load-dynamic-extension))   
    13 
    14 (compile  -O2 -d0 -s
    15          ,@(if has-exports? '(-check-imports -emit-exports iconv.exports) '())
    16          iconv.scm)
    17 
    18 (install-extension 'iconv
    19                    `(,(dynld-name "iconv")
    20                      ,@(if has-exports? '("iconv.exports") (list)))
    21                    `((version ,(if (file-exists? "version") (with-input-from-file "version" read) "unknown"))
    22                      ,@(if has-exports? `((exports "iconv.exports")) (list))
    23                      (documentation "iconv.html")))
     12(install-extension
     13 'iconv
     14 '("iconv.so" "iconv.import.so" "iconv.html")
     15 '((version 1.6)
     16   (documentation "iconv.html")))
Note: See TracChangeset for help on using the changeset viewer.