Download raw body.
lang/sbcl - building and installing libsbcl.so ?
Dear all,
sbcl can be packaged into a dynamic library, something one needs for
e.g. calling Lisp from C or Python,
via sbcl-librarian https://github.com/quil-lang/sbcl-librarian
Currently sbcl port does not build and install it, while it's quite easy
at least in theory. Here is my incomplete attempt to fix the port;
I do get libsbcl.so built, but not installed.
(after "make install" it's left in /usr/ports/pobj/sbcl-2.4.3/fake-amd64/usr/local/lib)
Could someone tell me what's missing?
Thanks
Dima
#--------------------------- # some magic is missing still?
#
--- a/lang/sbcl/Makefile
+++ b/lang/sbcl/Makefile
@@ -10,6 +10,8 @@ PKGNAME = sbcl-${V}
CATEGORIES = lang
+SHARED_LIBS += sbcl 0.0
+
HOMEPAGE = https://www.sbcl.org/
MAINTAINER = Sebastien Marie <semarie@kapouay.eu.org>
@@ -116,6 +118,8 @@ do-build:
--with-sb-core-compression \
--with-sb-xref-for-internals \
${EXTRA_PARAMS}
+ umask 022 && cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
+ /bin/sh ./make-shared-library.sh
umask 022 && cd ${WRKSRC}/doc/manual/ && ${SETENV} ${MAKE_ENV} \
${GMAKE} info
# add missing $(LDFLAGS) in $CC call in the Makefile
#
--- a/lang/sbcl/patches/patch-src_runtime_GNUmakefile
+++ b/lang/sbcl/patches/patch-src_runtime_GNUmakefile
@@ -13,3 +13,12 @@ Index: src/runtime/GNUmakefile
ASFLAGS += $(CFLAGS)
CPPFLAGS += -I.
+@@ -133,7 +133,7 @@ libsbcl.a: $(OBJS)
+
+ PIC_OBJS = $(subst .o,.pic.o,$(OBJS))
+ libsbcl.so: $(PIC_OBJS)
+- $(CC) -shared -o $@ $^ $(LIBS) $(SOFLAGS)
++ $(CC) -shared -o $@ $^ $(LDFLAGS) $(LIBS) $(SOFLAGS)
+ # for this to work, you must have with-gcc-tls in your build features already.
+ # can't define it here because then it conflicts if you have it in both places.
+ %.pic.o: %.c
lang/sbcl - building and installing libsbcl.so ?