alien.libraries.finder: find-library for gtk libs
This should make the code find the correct .so's when compiling Factor yourself.factor-shell
parent
2424a77507
commit
3a7c1ead3b
|
@ -40,13 +40,8 @@ CONSTANT: mach-map {
|
||||||
: ldconfig-matches? ( lib triple -- ? )
|
: ldconfig-matches? ( lib triple -- ? )
|
||||||
{ [ name-matches? ] [ arch-matches? ] } 2&& ;
|
{ [ name-matches? ] [ arch-matches? ] } 2&& ;
|
||||||
|
|
||||||
: ldconfig-find-soname ( lib -- seq )
|
|
||||||
load-ldconfig-cache [ ldconfig-matches? ] with filter
|
|
||||||
[ third ] map ;
|
|
||||||
|
|
||||||
PRIVATE>
|
PRIVATE>
|
||||||
|
|
||||||
M: linux find-library*
|
M: linux find-library*
|
||||||
"lib" prepend ldconfig-find-soname [
|
"lib" prepend load-ldconfig-cache
|
||||||
{ [ exists? ] [ file-info regular-file? ] } 1&&
|
[ ldconfig-matches? ] with find nip ?first ;
|
||||||
] find nip ;
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
! Copyright (C) 2010 Anton Gorenko.
|
! Copyright (C) 2010 Anton Gorenko.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: alien alien.libraries alien.syntax combinators
|
USING: alien alien.libraries alien.libraries.finder alien.syntax
|
||||||
gobject-introspection kernel system vocabs vocabs.loader ;
|
combinators gobject-introspection kernel system vocabs ;
|
||||||
IN: gdk.gl.ffi
|
IN: gdk.gl.ffi
|
||||||
|
|
||||||
<<
|
<<
|
||||||
|
@ -14,7 +14,7 @@ LIBRARY: gdk.gl
|
||||||
"gdk.gl" {
|
"gdk.gl" {
|
||||||
{ [ os windows? ] [ "libgdkglext-win32-1.0-0.dll" cdecl add-library ] }
|
{ [ os windows? ] [ "libgdkglext-win32-1.0-0.dll" cdecl add-library ] }
|
||||||
{ [ os macosx? ] [ drop ] }
|
{ [ os macosx? ] [ drop ] }
|
||||||
{ [ os unix? ] [ "libgdkglext-x11-1.0.so" cdecl add-library ] }
|
{ [ os unix? ] [ "gdkglext-x11-1.0" find-library cdecl add-library ] }
|
||||||
} cond
|
} cond
|
||||||
>>
|
>>
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
! Copyright (C) 2010 Anton Gorenko.
|
! Copyright (C) 2010 Anton Gorenko.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: alien alien.c-types alien.destructors alien.libraries
|
USING: alien alien.c-types alien.destructors alien.libraries
|
||||||
alien.syntax combinators gobject-introspection
|
alien.libraries.finder alien.syntax combinators gobject-introspection
|
||||||
gobject-introspection.standard-types kernel pango.ffi system
|
gobject-introspection.standard-types kernel pango.ffi system vocabs ;
|
||||||
vocabs ;
|
|
||||||
IN: gtk.ffi
|
IN: gtk.ffi
|
||||||
|
|
||||||
<<
|
<<
|
||||||
|
@ -16,7 +15,7 @@ LIBRARY: gtk
|
||||||
<<
|
<<
|
||||||
"gtk" {
|
"gtk" {
|
||||||
{ [ os windows? ] [ "libgtk-win32-2.0-0.dll" cdecl add-library ] }
|
{ [ os windows? ] [ "libgtk-win32-2.0-0.dll" cdecl add-library ] }
|
||||||
{ [ os linux? ] [ "libgtk-x11-2.0.so" cdecl add-library ] }
|
{ [ os linux? ] [ "gtk-x11-2.0" find-library cdecl add-library ] }
|
||||||
[ drop ]
|
[ drop ]
|
||||||
} cond
|
} cond
|
||||||
>>
|
>>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
! Copyright (C) 2010 Anton Gorenko.
|
! Copyright (C) 2010 Anton Gorenko.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: alien alien.libraries alien.syntax combinators
|
USING: alien alien.libraries alien.libraries.finder alien.syntax
|
||||||
gobject-introspection kernel system vocabs ;
|
combinators gobject-introspection kernel system vocabs ;
|
||||||
IN: gtk.gl.ffi
|
IN: gtk.gl.ffi
|
||||||
|
|
||||||
<<
|
<<
|
||||||
|
@ -15,7 +15,7 @@ LIBRARY: gtk.gl
|
||||||
"gtk.gl" {
|
"gtk.gl" {
|
||||||
{ [ os windows? ] [ drop ] }
|
{ [ os windows? ] [ drop ] }
|
||||||
{ [ os macosx? ] [ drop ] }
|
{ [ os macosx? ] [ drop ] }
|
||||||
{ [ os unix? ] [ "libgtkglext-x11-1.0.so" cdecl add-library ] }
|
{ [ os unix? ] [ "gtkglext-x11-1.0" find-library cdecl add-library ] }
|
||||||
} cond
|
} cond
|
||||||
>>
|
>>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue