From d6fe7f4c283fe079b19d0c5799aef1c42999aadf Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Sun, 27 Feb 2011 16:36:01 -0600 Subject: [PATCH] On Unix, link VM with GTK libraries instead of loading them dynamically --- basis/atk/ffi/ffi.factor | 3 +-- basis/gdk/ffi/ffi.factor | 3 +-- basis/gdk/gl/ffi/ffi.factor | 8 -------- basis/gdk/pixbuf/ffi/ffi.factor | 3 +-- basis/gio/ffi/ffi.factor | 3 +-- basis/glib/ffi/ffi.factor | 6 +++--- basis/gobject/ffi/ffi.factor | 5 ++--- basis/gtk/ffi/ffi.factor | 3 +-- basis/pango/cairo/ffi/ffi.factor | 6 +++--- basis/pango/ffi/ffi.factor | 5 ++--- vm/Config.unix | 2 +- 11 files changed, 16 insertions(+), 31 deletions(-) diff --git a/basis/atk/ffi/ffi.factor b/basis/atk/ffi/ffi.factor index 1f2c5b4926..147a7e4909 100644 --- a/basis/atk/ffi/ffi.factor +++ b/basis/atk/ffi/ffi.factor @@ -13,8 +13,7 @@ LIBRARY: atk << "atk" { { [ os winnt? ] [ "libatk-1.0-0.dll" cdecl add-library ] } - { [ os macosx? ] [ drop ] } - { [ os unix? ] [ "libatk-1.0.so" cdecl add-library ] } + { [ os unix? ] [ drop ] } } cond >> diff --git a/basis/gdk/ffi/ffi.factor b/basis/gdk/ffi/ffi.factor index 42d901407c..689193a8d9 100644 --- a/basis/gdk/ffi/ffi.factor +++ b/basis/gdk/ffi/ffi.factor @@ -16,8 +16,7 @@ LIBRARY: gdk << "gdk" { { [ os winnt? ] [ "libgdk-win32-2.0-0.dll" cdecl add-library ] } - { [ os macosx? ] [ drop ] } - { [ os unix? ] [ "libgdk-x11-2.0.so" cdecl add-library ] } + { [ os unix? ] [ drop ] } } cond >> diff --git a/basis/gdk/gl/ffi/ffi.factor b/basis/gdk/gl/ffi/ffi.factor index 27ea883919..d1f93cf62a 100644 --- a/basis/gdk/gl/ffi/ffi.factor +++ b/basis/gdk/gl/ffi/ffi.factor @@ -10,12 +10,4 @@ IN: gdk.gl.ffi LIBRARY: gdk.gl -<< -"gdk.gl" { - { [ os winnt? ] [ drop ] } - { [ os macosx? ] [ drop ] } - { [ os unix? ] [ "libgdkglext-x11-1.0.so" cdecl add-library ] } -} cond ->> - GIR: vocab:gdk/gl/GdkGLExt-1.0.gir diff --git a/basis/gdk/pixbuf/ffi/ffi.factor b/basis/gdk/pixbuf/ffi/ffi.factor index ecc73bd5d4..113cf8d0c8 100644 --- a/basis/gdk/pixbuf/ffi/ffi.factor +++ b/basis/gdk/pixbuf/ffi/ffi.factor @@ -13,8 +13,7 @@ LIBRARY: gdk.pixbuf << "gdk.pixbuf" { { [ os winnt? ] [ "libgdk_pixbuf-2.0-0.dll" cdecl add-library ] } - { [ os macosx? ] [ drop ] } - { [ os unix? ] [ "libgdk_pixbuf-2.0.so" cdecl add-library ] } + { [ os unix? ] [ drop ] } } cond >> diff --git a/basis/gio/ffi/ffi.factor b/basis/gio/ffi/ffi.factor index e2247e8a9e..3eb09c5105 100644 --- a/basis/gio/ffi/ffi.factor +++ b/basis/gio/ffi/ffi.factor @@ -13,8 +13,7 @@ LIBRARY: gio << "gio" { { [ os winnt? ] [ "libgio-2.0-0.dll" cdecl add-library ] } - { [ os macosx? ] [ drop ] } - { [ os unix? ] [ "libgio-2.0.so" cdecl add-library ] } + { [ os unix? ] [ drop ] } } cond >> diff --git a/basis/glib/ffi/ffi.factor b/basis/glib/ffi/ffi.factor index 0fd972f226..860d34bb8d 100644 --- a/basis/glib/ffi/ffi.factor +++ b/basis/glib/ffi/ffi.factor @@ -1,8 +1,8 @@ ! Copyright (C) 2010 Anton Gorenko. ! See http://factorcode.org/license.txt for BSD license. USING: alien alien.destructors alien.libraries alien.syntax -combinators gobject-introspection gobject-introspection.standard-types -system ; +combinators kernel gobject-introspection +gobject-introspection.standard-types system ; IN: glib.ffi LIBRARY: glib @@ -11,7 +11,7 @@ LIBRARY: glib "glib" { { [ os winnt? ] [ "libglib-2.0-0.dll" cdecl add-library ] } { [ os macosx? ] [ "/opt/local/lib/libglib-2.0.0.dylib" cdecl add-library ] } - { [ os unix? ] [ "libglib-2.0.so" cdecl add-library ] } + { [ os unix? ] [ drop ] } } cond >> diff --git a/basis/gobject/ffi/ffi.factor b/basis/gobject/ffi/ffi.factor index 070a2c5dea..705adedb7e 100644 --- a/basis/gobject/ffi/ffi.factor +++ b/basis/gobject/ffi/ffi.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2010 Anton Gorenko. ! See http://factorcode.org/license.txt for BSD license. -USING: alien alien.destructors alien.libraries alien.syntax +USING: alien alien.destructors alien.libraries alien.syntax kernel combinators gobject-introspection literals math system vocabs.loader ; IN: gobject.ffi @@ -13,8 +13,7 @@ LIBRARY: gobject << "gobject" { { [ os winnt? ] [ "libobject-2.0-0.dll" cdecl add-library ] } - { [ os macosx? ] [ "/opt/local/lib/libgobject-2.0.0.dylib" cdecl add-library ] } - { [ os unix? ] [ "libgobject-2.0.so" cdecl add-library ] } + { [ os unix? ] [ drop ] } } cond >> diff --git a/basis/gtk/ffi/ffi.factor b/basis/gtk/ffi/ffi.factor index 1a4c3ebca0..a2d6e7be32 100644 --- a/basis/gtk/ffi/ffi.factor +++ b/basis/gtk/ffi/ffi.factor @@ -16,8 +16,7 @@ LIBRARY: gtk << "gtk" { { [ os winnt? ] [ "libgtk-win32-2.0-0.dll" cdecl add-library ] } - { [ os macosx? ] [ drop ] } - { [ os unix? ] [ "libgtk-x11-2.0.so" cdecl add-library ] } + { [ os unix? ] [ drop ] } } cond >> diff --git a/basis/pango/cairo/ffi/ffi.factor b/basis/pango/cairo/ffi/ffi.factor index 1b19ba6ab7..4cb61326e2 100644 --- a/basis/pango/cairo/ffi/ffi.factor +++ b/basis/pango/cairo/ffi/ffi.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2010 Anton Gorenko. ! See http://factorcode.org/license.txt for BSD license. USING: alien alien.libraries alien.syntax cairo.ffi combinators -gobject-introspection system vocabs.loader ; +kernel gobject-introspection system vocabs.loader ; IN: pango.cairo.ffi << @@ -13,8 +13,8 @@ LIBRARY: pango.cairo << "pango.cairo" { { [ os winnt? ] [ "libpangocairo-1.0-0.dll" cdecl add-library ] } - { [ os macosx? ] [ "/opt/local/lib/libpangocairo-1.0.0.dylib" cdecl add-library ] } - { [ os unix? ] [ "libpangocairo-1.0.so" cdecl add-library ] } + { [ os macosx? ] [ drop ] } + { [ os unix? ] [ drop ] } } cond >> diff --git a/basis/pango/ffi/ffi.factor b/basis/pango/ffi/ffi.factor index 4e05226edc..fb3cb3cdbf 100644 --- a/basis/pango/ffi/ffi.factor +++ b/basis/pango/ffi/ffi.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2010 Anton Gorenko. ! See http://factorcode.org/license.txt for BSD license. USING: alien alien.c-types alien.destructors alien.libraries -alien.syntax combinators gobject-introspection +alien.syntax combinators kernel gobject-introspection gobject-introspection.standard-types system vocabs.loader ; IN: pango.ffi @@ -14,8 +14,7 @@ LIBRARY: pango << "pango" { { [ os winnt? ] [ "libpango-1.0-0.dll" cdecl add-library ] } - { [ os macosx? ] [ "/opt/local/lib/libpango-1.0.0.dylib" cdecl add-library ] } - { [ os unix? ] [ "libpango-1.0.so" cdecl add-library ] } + { [ os unix? ] [ drop ] } } cond >> diff --git a/vm/Config.unix b/vm/Config.unix index d7214a622b..9289ae0ad4 100644 --- a/vm/Config.unix +++ b/vm/Config.unix @@ -14,7 +14,7 @@ PLAF_EXE_OBJS += vm/main-unix.o ifdef NO_UI X11_UI_LIBS = else - X11_UI_LIBS = -lpango-1.0 -lpangocairo-1.0 -lcairo -lglib-2.0 -lgobject-2.0 -lGL -lX11 + X11_UI_LIBS = -lpango-1.0 -lpangocairo-1.0 -lcairo -lglib-2.0 -lgobject-2.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -lgdk_pixbuf-2.0 -lgtkglext-x11-1.0 -latk-1.0 -lgio-2.0 -lgdkglext-x11-1.0 -lGL endif # CFLAGS += -fPIC