instructions and script for building 3rd-party OS X libraries
This commit is contained in:
parent
44847f8278
commit
5bef90e197
40
src/mac/README.txt
Normal file
40
src/mac/README.txt
Normal file
|
@ -0,0 +1,40 @@
|
|||
Information on building 3rd-party libraries needed for
|
||||
Mac OS X GRacket.
|
||||
|
||||
Get these packages (or newer, if compatible):
|
||||
pkg-config-0.23.tar.gz
|
||||
gettext-0.17.tar.gz
|
||||
libpng-1.4.0.tar.gz
|
||||
pixman-0.17.14.tar.gz
|
||||
cairo-1.9.6.tar.gz
|
||||
glib-2.22.4.tar.gz
|
||||
pango-1.28.0.tar.gz
|
||||
libjpeg62 (maybe in binary form)
|
||||
|
||||
Patches:
|
||||
cairo/src/cairo-quartz-font.c:656:
|
||||
if (width < 1) width = 1;
|
||||
if (height < 1) height = 1;
|
||||
glib/glib/gconvert.c:54:
|
||||
#if !(defined(__APPLE__) && defined(__LP64__)) && !defined(USE_LIBICONV_GNU) && defined (_LIBICONV_H)
|
||||
pango/pango/modules.c:573:
|
||||
// read_modules ();
|
||||
|
||||
Configures (where <dest> is some temporary area):
|
||||
pkg-config: --prefix=<dest>
|
||||
gettext: --prefix=<dest>
|
||||
libpng: --prefix=<dest>
|
||||
pixman: --prefix=<dest>
|
||||
Cairo: PATH=<dest>/bin --disable-xlib --disable-ft --disable-fc --prefix=<dest>
|
||||
glib: PATH=<dest>/bin CFLAGS=-I<dest>/include LDFLAGS=-L<dest>/lib --prefix=<dest>
|
||||
Pango: PATH=<dest>/bin --without-x --with-included-modules=yes --with-dynamic-modules=no
|
||||
|
||||
Note: PATH above ensures that pkg-config binaries are used to find
|
||||
things in <dest> rather than some other area, such as /opt/local.
|
||||
|
||||
Install:
|
||||
racket install-libs.rkt <dest>/lib
|
||||
* using `racket' for the target installation
|
||||
* do not include a trailing slash
|
||||
* double-check installed libraries to ensure that they do not
|
||||
have <dest> in their shared-library paths
|
38
src/mac/install-libs.rkt
Normal file
38
src/mac/install-libs.rkt
Normal file
|
@ -0,0 +1,38 @@
|
|||
#lang scheme
|
||||
(require scheme/system)
|
||||
|
||||
(define from (vector-ref (current-command-line-arguments) 0))
|
||||
(define to (path->string (simplify-path (build-path (collection-path "scheme") 'up 'up "lib/") #f)))
|
||||
|
||||
(define libs
|
||||
'("libgio-2.0.0"
|
||||
"libgmodule-2.0.0"
|
||||
"libgthread-2.0.0"
|
||||
"libglib-2.0.0"
|
||||
"libgobject-2.0.0"
|
||||
"libintl.8"
|
||||
"libpango-1.0.0"
|
||||
"libpangocairo-1.0.0"
|
||||
"libcairo.2"
|
||||
"libpixman-1.0"
|
||||
"libpng14.14"
|
||||
"libjpeg.62"))
|
||||
|
||||
(define (fixup p p-new)
|
||||
(printf "Fixing ~s\n" p-new)
|
||||
(system (format "install_name_tool -id ~a ~a" p-new p-new))
|
||||
(for-each (lambda (s)
|
||||
(system (format "install_name_tool -change ~a @loader_path/~a ~a"
|
||||
(format "~a/~a.dylib" from s)
|
||||
(format "~a.dylib" s)
|
||||
p-new)))
|
||||
libs))
|
||||
|
||||
(define (install p)
|
||||
(let* ([p (format "~a.dylib" p)]
|
||||
[dest (string-append to p)])
|
||||
(when (file-exists? dest) (delete-file dest))
|
||||
(copy-file (build-path from p) dest)
|
||||
(fixup p dest)))
|
||||
|
||||
(for-each install libs)
|
Loading…
Reference in New Issue
Block a user