File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ ZLIB ?= zlib-ng-2.2.4
1010CURL ?= curl-8.15.0
1111SSH2 ?= libssh2-1.11.1
1212CCACHE ?= ccache-4.11.3
13+ CMAKE ?= cmake-4.1.1
1314
1415R := $(shell dirname $(CURDIR ) )
1516T := $(R ) /dyne/$(ARCH )
2526 $(T ) /lib/libz.a \
2627 $(T ) /lib/libcurl.a \
2728 $(T ) /lib/libssh2.a \
28- $(T ) /bin/ccache
29+ $(T ) /bin/ccache \
30+ $(T ) /bin/cmake
2931
3032$(T ) /lib/libssl.a : $(LIBSSL ) .orig
3133 $(info Building SSL library)
@@ -81,6 +83,16 @@ $(T)/bin/ccache: $(CCACHE).orig
8183 -DREDIS_STORAGE_BACKEND=OFF -DSTATIC_LINK=ON \
8284 && ninja -C build && ninja -C build install
8385
86+ $(T ) /bin/cmake : $(CMAKE ) .orig
87+ $(info Building CMAKE)
88+ mkdir -p $(CMAKE ) .orig/build && cd $(CMAKE ) .orig && \
89+ cmake -G Ninja -S . -B build -DARCH=${ARCH} -DROOT=" $( R) " \
90+ -DCMAKE_TOOLCHAIN_FILE=" ${R} /settings.cmake" -DCMAKE_INSTALL_PREFIX=" ${R} /dyne/${ARCH} " \
91+ -DFORCE_STATIC=1 -DSTATIC_LINK=ON \
92+ -DBUILD_TESTING=OFF -DBUILD_CMAKE_DOCS=OFF \
93+ && ninja -C build && ninja -C build install
94+
95+
8496# upstream: https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/
8597$(LIBSSL ) .tar.gz :
8698 curl -L https://files.dyne.org/? file=musl/sources/$@ --output $@
@@ -100,6 +112,10 @@ $(SSH2).tar.xz:
100112$(CCACHE ) .tar.xz :
101113 curl -L https://files.dyne.org/? file=musl/sources/$@ --output $@
102114
115+ # upstream: https://github.com/Kitware/CMake/releases/download/v4.1.1/cmake-4.1.1.tar.gz
116+ $(CMAKE ) .tar.gz :
117+ curl -L https://files.dyne.org/? file=musl/sources/$@ --output $@
118+
103119clean :
104120 rm -rf * .orig
105121 rm -f \
@@ -108,7 +124,8 @@ clean:
108124 $(T ) /lib/libz.* \
109125 $(T ) /lib/libcurl.* \
110126 $(T ) /lib/libssh2.* \
111- $(T ) /bin/ccache
127+ $(T ) /bin/ccache \
128+ $(T ) /bin/cmake
112129
113130% .orig : % .tar.gz
114131 tar zxf - < $<
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ find dyne/gcc-musl/bin dyne/gcc-musl/lib -type f -exec file {} + \
1515| grep -E ' (LSB exec|pie exec|shared obj|ar archive)' | cut -d: -f1 \
1616| xargs strip -g
1717
18+ rm -rf " dyne/${1} /share/cmake-4.1/"
1819find dyne/${1} -type f -exec file {} + \
1920| grep -E ' (LSB exec|pie exec|shared obj|ar archive)' | cut -d: -f1 \
2021| xargs dyne/gcc-musl/bin/${1} -strip -g
You can’t perform that action at this time.
0 commit comments