Package: neko / 2.0.0-3

soname-strip.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
## soname-strip.diff by Jens Peter Secher <jps@debian.org>
##
## Make it possible to override the stripping of the neko executable
## prior to building rest of compiler tools and introduce a proper
## SONAME for libneko.

Index: b/Makefile
===================================================================
--- a/Makefile
+++ b/Makefile
@@ -14,11 +14,13 @@
 
 CFLAGS = -Wall -O3 -fPIC -fomit-frame-pointer -I vm -D_GNU_SOURCE -I libs/common
 EXTFLAGS = -pthread
-MAKESO = $(CC) -shared -Wl,-Bsymbolic
-LIBNEKO_NAME = libneko.so
+MAJOR=0
+MINOR=1
+MAKESO = $(CC) -shared -Wl,-soname,libneko.so.${MAJOR}
+LIBNEKO_NAME = libneko.so.${MAJOR}.${MINOR}
 LIBNEKO_LIBS = -ldl -lgc -lm
 NEKOVM_FLAGS = -Lbin -lneko
-STD_NDLL_FLAGS = ${NEKOVM_FLAGS} -lrt
+STD_NDLL_FLAGS = -lm -lrt
 INSTALL_FLAGS =
 
 NEKO_EXEC = LD_LIBRARY_PATH=../bin:${LD_LIBRARY_PATH} NEKOPATH=../boot:../bin ../bin/neko
@@ -70,6 +72,8 @@
 	-mkdir bin 2>/dev/null
 
 libneko: bin/${LIBNEKO_NAME}
+	ln -sf ${LIBNEKO_NAME} bin/libneko.so.${MAJOR}
+	ln -sf libneko.so.${MAJOR} bin/libneko.so
 
 libs:
 	(cd src; ${NEKO_EXEC} nekoc tools/install.neko)
@@ -108,6 +112,7 @@
 
 clean:
 	rm -rf bin/${LIBNEKO_NAME} ${LIBNEKO_OBJECTS} ${VM_OBJECTS}
+	rm -rf bin/libneko.so*
 	rm -rf bin/neko bin/nekoc bin/nekoml bin/nekotools
 	rm -rf bin/std bin/*.ndll bin/*.n libs/*/*.o
 	rm -rf src/*.n src/neko/*.n src/nekoml/*.n src/tools/*.n
@@ -115,6 +120,7 @@
 
 install:
 	cp bin/${LIBNEKO_NAME} ${INSTALL_PREFIX}/lib
+	ln -sf ${LIBNEKO_NAME} ${INSTALL_PREFIX}/lib/libneko.so.${MAJOR}
 	cp bin/neko bin/nekoc bin/nekotools bin/nekoml bin/nekoml.std ${INSTALL_PREFIX}/bin
 	-mkdir ${INSTALL_PREFIX}/lib/neko
 	cp bin/*.ndll ${INSTALL_PREFIX}/lib/neko