diff --git a/src/mac/README.txt b/src/mac/README.txt new file mode 100644 index 0000000000..05f9509cbc --- /dev/null +++ b/src/mac/README.txt @@ -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 is some temporary area): + pkg-config: --prefix= + gettext: --prefix= + libpng: --prefix= + pixman: --prefix= + Cairo: PATH=/bin --disable-xlib --disable-ft --disable-fc --prefix= + glib: PATH=/bin CFLAGS=-I/include LDFLAGS=-L/lib --prefix= + Pango: PATH=/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 rather than some other area, such as /opt/local. + +Install: + racket install-libs.rkt /lib + * using `racket' for the target installation + * do not include a trailing slash + * double-check installed libraries to ensure that they do not + have in their shared-library paths diff --git a/src/mac/install-libs.rkt b/src/mac/install-libs.rkt new file mode 100644 index 0000000000..c0bad7dbca --- /dev/null +++ b/src/mac/install-libs.rkt @@ -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)