@@ -11,6 +11,7 @@ CURL ?= curl-8.15.0
1111SSH2 ?= libssh2-1.11.1
1212CCACHE ?= ccache-4.11.3
1313NCURSES ?= ncurses-6.6
14+ KYOTOCAB ?= kyotocabinet-1.2.80
1415# files.dyne.org URLs
1516SOURCES_URL := https://files.dyne.org/musl/sources/
1617
2930 $(T ) /lib/libcurl.a \
3031 $(T ) /lib/libssh2.a \
3132 $(T ) /lib/libncursesw.a \
33+ $(T ) /lib/libkyotocabinet.a \
3234 $(T ) /bin/ccache
3335
3436$(T ) /lib/libssl.a : $(LIBSSL ) .orig
@@ -76,8 +78,11 @@ $(T)/lib/libssh2.a: $(SSH2).orig
7678
7779$(T ) /lib/libncursesw.a : $(NCURSES ) .orig
7880 $(info Building ncurses library)
79- cd $(NCURSES ) .orig && \
80- ./configure --enable-static --disable-dynamic \
81+ cd $(NCURSES ) .orig \
82+ && CC=" $( CC) " CXX=" $( CXX) " AR=" $( AR) " \
83+ CFLAGS=" -static -g0 -Os -fstack-protector-all -D_FORTIFY_SOURCE=2 -fno-strict-overflow" \
84+ ./configure --prefix=$(T ) --build=x86_64-linux-musl --host=$(ARCH ) \
85+ --enable-static --disable-shared --without-cxx-binding \
8186 && make && make install
8287
8388# -DCMAKE_INSTALL_PREFIX="${PREFIX}/${ARCH}"
@@ -91,6 +96,14 @@ $(T)/bin/ccache: $(CCACHE).orig
9196 -DREDIS_STORAGE_BACKEND=OFF -DSTATIC_LINK=ON \
9297 && ninja -C build && ninja -C build install
9398
99+ $(T ) /lib/libkyotocabinet.a : $(KYOTOCAB ) .orig
100+ $(info Building Kyoto Cabinet DBM)
101+ cd $(KYOTOCAB ) .orig && \
102+ CC=" $( CC) " CXX=" $( CXX) " AR=" $( AR) " \
103+ CFLAGS=" -static -g0 -Os -fstack-protector-all -D_FORTIFY_SOURCE=2 -fno-strict-overflow" \
104+ ./configure --prefix=$(T ) --build=x86_64-linux-musl --host=$(ARCH ) \
105+ --enable-static --disable-shared --disable-zlib \
106+ && make && make install
94107
95108# upstream: https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/
96109$(LIBSSL ) .tar.gz :
@@ -115,6 +128,10 @@ $(CCACHE).tar.xz:
115128$(NCURSES ) .tar.gz :
116129 curl -L ${SOURCES_URL} /$@ --output $@
117130
131+ # upstream: https://dbmx.net/kyotocabinet/pkg/
132+ $(KYOTOCAB ) .tar.gz :
133+ curl -L ${SOURCES_URL} /$@ --output $@
134+
118135clean :
119136 rm -rf * .orig
120137 rm -f \
0 commit comments