basis/extra: cleanup uses of add-library.

db4
John Benediktsson 2014-11-13 13:05:14 -08:00
parent 2b32e31ad2
commit de179243ce
26 changed files with 154 additions and 164 deletions

View File

@ -4,18 +4,14 @@ USING: alien alien.libraries alien.syntax combinators
gobject-introspection kernel system vocabs ;
IN: atk.ffi
<<
"gobject.ffi" require
>>
<< "gobject.ffi" require >>
LIBRARY: atk
<<
"atk" {
{ [ os windows? ] [ "libatk-1.0-0.dll" cdecl add-library ] }
{ [ os macosx? ] [ "libatk-1.0.dylib" cdecl add-library ] }
{ [ os unix? ] [ "libatk-1.0.so" cdecl add-library ] }
} cond
>>
<< "atk" {
{ [ os windows? ] [ "libatk-1.0-0.dll" ] }
{ [ os macosx? ] [ "libatk-1.0.dylib" ] }
{ [ os unix? ] [ "libatk-1.0.so" ] }
} cond cdecl add-library >>
GIR: vocab:atk/Atk-1.0.gir

View File

@ -3,16 +3,16 @@
! 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 classes.struct combinators kernel system ;
alien.syntax assocs classes.struct combinators kernel system ;
IN: cairo.ffi
! Adapted from cairo.h, version 1.8.10
<< "cairo" {
{ [ os windows? ] [ "libcairo-2.dll" cdecl add-library ] }
{ [ os macosx? ] [ "libcairo.dylib" cdecl add-library ] }
{ [ os unix? ] [ "libcairo.so" cdecl add-library ] }
} cond >>
{ [ os windows? ] [ "libcairo-2.dll" ] }
{ [ os macosx? ] [ "libcairo.dylib" ] }
{ [ os unix? ] [ "libcairo.so" ] }
} cond cdecl add-library >>
LIBRARY: cairo

View File

@ -1,11 +1,14 @@
! Copyright (C) 2014 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.c-types alien.libraries
alien.libraries.finder alien.syntax classes.struct ;
USE: nested-comments
USING: alien alien.c-types alien.libraries alien.syntax
combinators classes.struct system ;
IN: compression.snappy.ffi
<< "snappy" "snappy" find-library cdecl add-library >>
<< "snappy" {
{ [ os windows? ] [ "snappy.dll" ] }
{ [ os macosx? ] [ "libsnappy.dylib" ] }
{ [ os unix? ] [ "libsnappy.so" ] }
} cond cdecl add-library >>
LIBRARY: snappy

View File

@ -1,7 +1,7 @@
! Copyright (C) 2009 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.c-types alien.syntax combinators system
alien.libraries ;
USING: alien alien.c-types alien.libraries alien.syntax
combinators system ;
IN: compression.zlib.ffi
<< "zlib" {

View File

@ -1,8 +1,8 @@
! Copyright (C) 2007, 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
! tested on debian linux with postgresql 8.1
USING: alien alien.c-types alien.syntax combinators system
alien.libraries ;
USING: alien alien.c-types alien.libraries alien.syntax
combinators system ;
IN: db.postgresql.ffi
<< "postgresql" {

View File

@ -2,15 +2,15 @@
! See http://factorcode.org/license.txt for BSD license.
! An interface to the sqlite database. Tested against sqlite v3.1.3.
! Not all functions have been wrapped.
USING: alien compiler kernel math namespaces sequences strings alien.syntax
system combinators alien.c-types alien.libraries ;
USING: alien alien.c-types alien.libraries alien.syntax
combinators system ;
IN: db.sqlite.ffi
<< "sqlite" {
{ [ os windows? ] [ "sqlite3.dll" ] }
{ [ os macosx? ] [ "/usr/lib/libsqlite3.dylib" ] }
{ [ os macosx? ] [ "libsqlite3.dylib" ] }
{ [ os unix? ] [ "libsqlite3.so" ] }
} cond cdecl add-library >>
} cond cdecl add-library >>
! Return values from sqlite functions
CONSTANT: SQLITE_OK 0 ! Successful result

View File

@ -1,24 +1,20 @@
! Copyright (C) 2010 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.c-types alien.data alien.libraries alien.syntax
combinators gio.ffi glib.ffi gobject-introspection
gobject-introspection.standard-types kernel libc
sequences system vocabs ;
USING: alien alien.c-types alien.data alien.libraries
alien.syntax combinators gio.ffi glib.ffi gobject-introspection
gobject-introspection.standard-types kernel libc sequences
system vocabs ;
IN: gdk.pixbuf.ffi
<<
"gio.ffi" require
>>
<< "gio.ffi" require >>
LIBRARY: gdk.pixbuf
<<
"gdk.pixbuf" {
{ [ os windows? ] [ "libgdk_pixbuf-2.0-0.dll" cdecl add-library ] }
{ [ os macosx? ] [ "libgdk_pixbuf-2.0.dylib" cdecl add-library ] }
{ [ os unix? ] [ "libgdk_pixbuf-2.0.so" cdecl add-library ] }
} cond
>>
<< "gdk.pixbuf" {
{ [ os windows? ] [ "libgdk_pixbuf-2.0-0.dll" ] }
{ [ os macosx? ] [ "libgdk_pixbuf-2.0.dylib" ] }
{ [ os unix? ] [ "libgdk_pixbuf-2.0.so" ] }
} cond cdecl add-library >>
GIR: vocab:gdk/pixbuf/GdkPixbuf-2.0.gir

View File

@ -4,18 +4,14 @@ USING: alien alien.libraries alien.syntax combinators
gobject-introspection kernel system vocabs ;
IN: gio.ffi
<<
"gobject.ffi" require
>>
<< "gobject.ffi" require >>
LIBRARY: gio
<<
"gio" {
{ [ os windows? ] [ "libgio-2.0-0.dll" cdecl add-library ] }
{ [ os macosx? ] [ "libgio-2.0.dylib" cdecl add-library ] }
{ [ os unix? ] [ "libgio-2.0.so" cdecl add-library ] }
} cond
>>
<< "gio" {
{ [ os windows? ] [ "libgio-2.0-0.dll" ] }
{ [ os macosx? ] [ "libgio-2.0.dylib" ] }
{ [ os unix? ] [ "libgio-2.0.so" ] }
} cond cdecl add-library >>
GIR: vocab:gio/Gio-2.0.gir

View File

@ -8,13 +8,11 @@ IN: glib.ffi
LIBRARY: glib
<<
"glib" {
{ [ os windows? ] [ "libglib-2.0-0.dll" cdecl add-library ] }
{ [ os macosx? ] [ "libglib-2.0.0.dylib" cdecl add-library ] }
{ [ os unix? ] [ "libglib-2.0.so" cdecl add-library ] }
} cond
>>
<< "glib" {
{ [ os windows? ] [ "libglib-2.0-0.dll" ] }
{ [ os macosx? ] [ "libglib-2.0.0.dylib" ] }
{ [ os unix? ] [ "libglib-2.0.so" ] }
} cond cdecl add-library >>
IMPLEMENT-STRUCTS: GError GPollFD GSource GSourceFuncs ;

View File

@ -4,18 +4,14 @@ USING: alien alien.libraries alien.syntax combinators
gobject-introspection kernel system vocabs ;
IN: gmodule.ffi
<<
"glib.ffi" require
>>
<< "glib.ffi" require >>
LIBRARY: gmodule
<<
"gmodule" {
{ [ os windows? ] [ "libgmodule-2.0-0.dll" cdecl add-library ] }
{ [ os macosx? ] [ drop ] }
{ [ os unix? ] [ "libgmodule-2.0.so" cdecl add-library ] }
} cond
>>
<< "gmodule" {
{ [ os windows? ] [ "libgmodule-2.0-0.dll" ] }
{ [ os macosx? ] [ "libgmodule-2.0.dylib" ] }
{ [ os unix? ] [ "libgmodule-2.0.so" ] }
} cond cdecl add-library >>
GIR: vocab:gmodule/GModule-2.0.gir

View File

@ -1,25 +1,21 @@
! Copyright (C) 2010 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.destructors alien.libraries alien.syntax kernel
USING: alien alien.destructors alien.libraries alien.syntax
combinators gobject-introspection literals math system vocabs ;
IN: gobject.ffi
! these two are needed for the definition of GError and others.
! otherwise we generate GError and some others in this vocab as well.
<<
"glib.ffi" require
>>
<< "glib.ffi" require >>
USE: glib.ffi
LIBRARY: gobject
<<
"gobject" {
{ [ os windows? ] [ "libobject-2.0-0.dll" cdecl add-library ] }
{ [ os macosx? ] [ "libgobject-2.0.dylib" cdecl add-library ] }
{ [ os unix? ] [ "libgobject-2.0.so" cdecl add-library ] }
} cond
>>
<< "gobject" {
{ [ os windows? ] [ "libobject-2.0-0.dll" ] }
{ [ os macosx? ] [ "libgobject-2.0.dylib" ] }
{ [ os unix? ] [ "libgobject-2.0.so" ] }
} cond cdecl add-library >>
IMPLEMENT-STRUCTS: GValue GParamSpecVariant ;

View File

@ -5,18 +5,16 @@
!
! export LD_LIBRARY_PATH=/opt/local/lib
USING: alien alien.c-types alien.syntax combinators kernel system
alien.libraries classes.struct ;
USING: alien alien.c-types alien.libraries alien.syntax
classes.struct combinators system ;
IN: openssl.libcrypto
<<
{
{ [ os windows? ] [ "libcrypto" "libeay32.dll" cdecl add-library ] }
{ [ os macosx? ] [ "libcrypto" "libcrypto.dylib" cdecl add-library ] }
{ [ os unix? ] [ "libcrypto" "libcrypto.so" cdecl add-library ] }
} cond
>>
<< "libcrypto" {
{ [ os windows? ] [ "libeay32.dll" ] }
{ [ os macosx? ] [ "libcrypto.dylib" ] }
{ [ os unix? ] [ "libcrypto.so" ] }
} cond cdecl add-library >>
STRUCT: bio-method
{ type int }

View File

@ -1,9 +1,10 @@
! Copyright (C) 2007 Elie CHAFTARI
! Portions copyright (C) 2008 Slava Pestov
! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.c-types alien.parser alien.syntax classes.struct combinators
kernel openssl.libcrypto system namespaces assocs parser lexer sequences words
quotations math.bitwise alien.libraries literals ;
USING: alien alien.c-types alien.libraries alien.parser
alien.syntax assocs classes.struct combinators kernel lexer
literals namespaces openssl.libcrypto parser quotations
sequences system words ;
IN: openssl.libssl

View File

@ -4,19 +4,15 @@ USING: alien alien.libraries alien.syntax cairo.ffi combinators
kernel gobject-introspection system vocabs ;
IN: pango.cairo.ffi
<<
"pango.ffi" require
>>
<< "pango.ffi" require >>
LIBRARY: pango.cairo
<<
"pango.cairo" {
{ [ os windows? ] [ "libpangocairo-1.0-0.dll" cdecl add-library ] }
{ [ os macosx? ] [ drop ] }
{ [ os unix? ] [ "libpangocairo-1.0.so" cdecl add-library ] }
} cond
>>
<< "pango.cairo" {
{ [ os windows? ] [ "libpangocairo-1.0-0.dll" ] }
{ [ os macosx? ] [ "libpangocairo-1.0.dylib" ] }
{ [ os unix? ] [ "libpangocairo-1.0.so" ] }
} cond cdecl add-library >>
FOREIGN-RECORD-TYPE: cairo.Context cairo_t
FOREIGN-RECORD-TYPE: cairo.ScaledFont cairo_scaled_font_t

View File

@ -1,23 +1,19 @@
! 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 kernel gobject-introspection
alien.syntax combinators gobject-introspection
gobject-introspection.standard-types system vocabs ;
IN: pango.ffi
<<
"gobject.ffi" require
>>
<< "gobject.ffi" require >>
LIBRARY: pango
<<
"pango" {
{ [ os windows? ] [ "libpango-1.0-0.dll" cdecl add-library ] }
{ [ os macosx? ] [ drop ] }
{ [ os unix? ] [ "libpango-1.0.so" cdecl add-library ] }
} cond
>>
<< "pango" {
{ [ os windows? ] [ "libpango-1.0-0.dll" ] }
{ [ os macosx? ] [ "libpango-1.0.dylib" ] }
{ [ os unix? ] [ "libpango-1.0.so" ] }
} cond cdecl add-library >>
IMPLEMENT-STRUCTS: PangoRectangle ;

View File

@ -1,19 +1,17 @@
! Copyright (C) 2008, 2010 Slava Pestov, Jorge Acereda Macia.
! See http://factorcode.org/license.txt for BSD license.
USING: tools.disassembler namespaces combinators alien
alien.syntax alien.c-types lexer parser kernel sequences layouts
math math.order alien.libraries math.parser system make fry
arrays libc destructors tools.memory tools.disassembler.utils
tools.disassembler.private splitting alien.data classes.struct ;
USING: alien alien.c-types alien.libraries alien.syntax arrays
combinators destructors fry kernel layouts libc make math
math.order math.parser namespaces sequences splitting system
tools.disassembler.private tools.disassembler.utils tools.memory
;
IN: tools.disassembler.udis
<<
"libudis86" {
{ [ os macosx? ] [ "libudis86.0.dylib" ] }
{ [ os unix? ] [ "libudis86.so.0" ] }
<< "libudis86" {
{ [ os windows? ] [ "libudis86.dll" ] }
} cond cdecl add-library
>>
{ [ os macosx? ] [ "libudis86.dylib" ] }
{ [ os unix? ] [ "libudis86.so" ] }
} cond cdecl add-library >>
LIBRARY: libudis86

View File

@ -1,10 +1,13 @@
USING: alien alien.c-types alien.enums alien.libraries
alien.libraries.finder alien.syntax classes.struct combinators
kernel math unix.types words ;
alien.syntax classes.struct combinators kernel math
system unix.types words ;
IN: curl.ffi
<< "curl" dup find-library cdecl add-library >>
<< "curl" {
{ [ os macosx? ] [ "libcurl.dylib" ] }
{ [ os unix? ] [ "libcurl.so" ] }
} cond cdecl add-library >>
LIBRARY: curl

View File

@ -2,13 +2,17 @@
! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.c-types alien.destructors alien.libraries
alien.libraries.finder alien.syntax kernel ;
alien.libraries.finder alien.syntax combinators kernel system ;
IN: fftw.ffi
LIBRARY: fftw3
<< "fftw3" { "fftw3" "libfftw3-3" } find-library-from-list cdecl add-library >>
<< "fftw3" {
{ [ os windows? ] [ "libfftw3-3.dll" ] }
{ [ os macosx? ] [ "libfftw3.dylib" ] }
{ [ os unix? ] [ "libfftw3.so" ] }
} cond cdecl add-library >>
TYPEDEF: double[2] fftw_complex

View File

@ -1,14 +1,21 @@
! Copyright (C) 2009 Matthew Willis.
! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.c-types alien.libraries
alien.libraries.finder alien.syntax kernel sequences ;
USING: alien alien.c-types alien.libraries alien.syntax
combinators kernel sequences system ;
IN: llvm.core
<<
: add-llvm-library ( name -- )
dup {
{ [ os macosx? ] [ "lib" ".dylib" surround ] }
{ [ os unix? ] [ "lib" ".so" surround ] }
{ [ os windows? ] [ ".dll" append ] }
} cond cdecl add-library ;
{ "LLVMSystem" "LLVMSupport" "LLVMCore" "LLVMBitReader" }
[ dup find-library cdecl add-library ] each
[ add-llvm-library ] each
>>
! llvm-c/Core.h

View File

@ -1,7 +1,7 @@
! Copyright (C) 2009 Matthew Willis.
! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.c-types alien.libraries
alien.libraries.finder alien.syntax kernel llvm.core sequences ;
USING: alien alien.c-types alien.libraries alien.syntax kernel
llvm.core sequences ;
IN: llvm.engine
<<
@ -10,7 +10,7 @@ IN: llvm.engine
"LLVMTransformUtils" "LLVMScalarOpts" "LLVMCodeGen"
"LLVMAsmPrinter" "LLVMSelectionDAG" "LLVMX86CodeGen"
"LLVMJIT" "LLVMInterpreter"
} [ dup find-library cdecl add-library ] each
} [ add-llvm-library ] each
>>
! llvm-c/ExecutionEngine.h

View File

@ -9,7 +9,8 @@ IN: lua
{ [ os windows? ] [ "lua5.1.dll" ] }
{ [ os macosx? ] [ "liblua5.1.dylib" ] }
{ [ os unix? ] [ "liblua5.1.so" ] }
} cond cdecl add-library >>
} cond cdecl add-library >>
LIBRARY: liblua5.1
! luaconf.h

View File

@ -2,11 +2,14 @@
! See http://factorcode.org/license.txt for BSD license
USING: alien alien.c-types alien.destructors alien.libraries
alien.libraries.finder alien.syntax kernel literals ;
alien.syntax combinators kernel literals system ;
IN: magic.ffi
<< "magic" dup find-library cdecl add-library >>
<< "magic" {
{ [ os macosx? ] [ "libmagic.dylib" ] }
{ [ os unix? ] [ "libmagic.so" ] }
} cond cdecl add-library >>
LIBRARY: magic

View File

@ -1,6 +1,6 @@
USING:
alien alien.c-types alien.data
alien.libraries alien.libraries.finder
alien.libraries
alien.syntax
classes.struct
combinators
@ -8,7 +8,11 @@ USING:
system ;
IN: pcre.ffi
<< "pcre" dup find-library cdecl add-library >>
<< "pcre" {
{ [ os windows? ] [ "pcre3.dll" ] }
{ [ os macosx? ] [ "libpcre.dylib" ] }
{ [ os unix? ] [ "libpcre.so" ] }
} cond cdecl add-library >>
LIBRARY: pcre

View File

@ -1,17 +1,16 @@
! Copyright (C) 2010 Erik Charlebois
! See http:// factorcode.org/license.txt for BSD license.
USING: alien alien.c-types kernel alien.syntax classes.struct
accessors libc math make unix.types namespaces system
combinators alien.libraries ;
USING: accessors alien alien.c-types alien.libraries
alien.syntax classes.struct combinators kernel libc math
namespaces system unix.types ;
IN: readline.ffi
<<
"readline" {
<< "readline" {
{ [ os windows? ] [ "readline.dll" ] }
{ [ os macosx? ] [ "libreadline.dylib" ] }
{ [ os unix? ] [ "libreadline.so" ] }
} cond cdecl add-library
>>
} cond cdecl add-library >>
LIBRARY: readline
TYPEDEF: void* histdata_t

View File

@ -1,8 +1,7 @@
! Copyright (C) 2011 Erik Charlebois.
! See http://factorcode.org/license.txt for BSD license.
USING: alien.strings destructors io.encodings.utf8 kernel libc
sequences macros quotations words compiler.units fry
alien.data alien.libraries ;
USING: alien.data alien.libraries alien.strings compiler.units
destructors fry io.encodings.utf8 kernel libc sequences words ;
QUALIFIED: readline.ffi
IN: readline

View File

@ -2,16 +2,16 @@
! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.accessors alien.c-types alien.data
alien.libraries alien.syntax byte-arrays classes.struct
alien.libraries alien.syntax assocs byte-arrays classes.struct
combinators kernel literals math system ;
IN: zeromq.ffi
<< "zmq" {
{ [ os windows? ] [ "libzmq.dll" cdecl add-library ] }
{ [ os macosx? ] [ "libzmq.dylib" cdecl add-library ] }
{ [ os unix? ] [ "libzmq.so" cdecl add-library ] }
} cond >>
{ [ os windows? ] [ "libzmq.dll" ] }
{ [ os macosx? ] [ "libzmq.dylib" ] }
{ [ os unix? ] [ "libzmq.so" ] }
} cond cdecl add-library >>
LIBRARY: zmq