Skip to content

Commit

Permalink
feat: add cmake
Browse files Browse the repository at this point in the history
This brings in CMake, a tool to build projects.

It is required by `libjson-c` which in turn is required by `cryptsetup`
(in `pkgs`).

Signed-off-by: Andrey Smirnov <[email protected]>
  • Loading branch information
smira committed Aug 26, 2020
1 parent 7e14b0a commit 546446a
Show file tree
Hide file tree
Showing 8 changed files with 147 additions and 3 deletions.
42 changes: 42 additions & 0 deletions cmake/pkg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: cmake
dependencies:
- stage: base
- stage: bzip2
- stage: curl
- stage: expat
- stage: libuv
- stage: ncurses
- stage: rhash
- stage: xz
- stage: zlib
steps:
- sources:
- url: https://www.cmake.org/files/v3.18/cmake-3.18.1.tar.gz
destination: cmake.tar.gz
sha256: c0e3338bd37e67155b9d1e9526fec326b5c541f74857771b7ffed0c46ad62508
sha512: e0591d5fb234f3e7b74d6d2aad44fbf3e19e69547bd428681ba6ad0461d4f3d2a154605808b4733531d2c66f0e91eb39a179ae0d89a37e92a3f20e9cae691468
env:
CC: gcc
CXX: g++
LD_LIBRARY_PATH: /toolchain/lib
prepare:
- |
tar -xzf cmake.tar.gz --strip-components=1
./bootstrap \
--prefix=${TOOLCHAIN} \
--system-libs \
--no-system-jsoncpp \
--no-system-libarchive \
--parallel=$(nproc) \
-- -DCMAKE_BUILD_TYPE:STRING=Release \
-DCMAKE_INSTALL_RPATH=/toolchain/lib
- |
make -j $(nproc)
install:
- |
make DESTDIR=/rootfs install
finalize:
- from: /rootfs
to: /
# || (cat Bootstrap.cmk/cmake_bootstrap.log; exit 1)
Binary file modified deps.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions expat/pkg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: expat
dependencies:
- stage: base
steps:
- sources:
- url: https://github.com/libexpat/libexpat/releases/download/R_2_2_9/expat-2.2.9.tar.bz2
destination: expat.tar.bz2
sha256: f1063084dc4302a427dabcca499c8312b3a32a29b7d2506653ecc8f950a9a237
sha512: 8ea4b89a171dfda8267c8b7a0295516d169bf7f46587ebe460fe0ae7a31478a119ae2a7eaa09b3ce46b107ec7cd2274ea66d91c08b8a4ad6b98ba984cdd4e15b
prepare:
- |
tar -xjf expat.tar.bz2 --strip-components=1
./configure \
--prefix="${TOOLCHAIN}" \
--enable-static
build:
- |
make -j $(nproc)
install:
- |
make DESTDIR=/rootfs install
finalize:
- from: /rootfs
to: /
6 changes: 3 additions & 3 deletions expect/pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ dependencies:
- stage: tcl
steps:
- sources:
- url: https://downloads.sourceforge.net/project/expect/Expect/5.45.4/expect5.45.4.tar.gz
- url: http://deb.debian.org/debian/pool/main/e/expect/expect_5.45.4.orig.tar.gz
destination: expect.tar.gz
sha256: 49a7da83b0bdd9f46d04a04deec19c7767bb9a323e40c4781f89caf760b92c34
sha512: a8dc25e8175f67e029e15cbcfca1705165c1c4cb2dd37eaaaebffb61e3ba132d9519cd73ca5add4c3358a2b0b7a91e878279e8d0b72143ff2c287fce07e4659a
sha256: d082bf340fdb7a85b1e4e5df4d967d0140835db34a8a035c3102abb5eb62d450
sha512: 89ee8da2bfefc2baa5b0213c0d93be9a9eff1c3a1f437800c48395737ef359f3975f3355399be4494d491c080479e2b82bf9edbc9711ef1f6d3f3ae2ef613336
prepare:
- |
tar -xzf expect.tar.gz --strip-components=1
Expand Down
29 changes: 29 additions & 0 deletions libuv/pkg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: libuv
dependencies:
- stage: base
- stage: autoconf
- stage: automake
- stage: libtool
steps:
- sources:
- url: https://dist.libuv.org/dist/v1.37.0/libuv-v1.37.0.tar.gz
destination: libuv.tar.gz
sha256: 6f2794313c9603388ed4b7b818b3bed5f784f886ae3ce5b3424b331813f6a391
sha512: dc5f616871d8ea10d7d5f66f5b1044eb1deeab7714a5fb515a40ca9a45d01efea310c182b74a4152da26c9de9ca75b0ba13b103eb0e63361144216aac408223a
prepare:
- |
tar -xzf libuv.tar.gz --strip-components=1
sh autogen.sh
./configure \
--prefix="${TOOLCHAIN}"
build:
- |
make CFLAGS="$CFLAGS -D__USE_MISC" BUILDTYPE=Release -j $(nproc)
install:
- |
make DESTDIR=/rootfs install
finalize:
- from: /rootfs
to: /
13 changes: 13 additions & 0 deletions rhash/patches/byteorder.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/librhash/byte_order.h b/librhash/byte_order.h
index 1ea1096..b248b57 100644
--- a/librhash/byte_order.h
+++ b/librhash/byte_order.h
@@ -4,7 +4,7 @@
#include "ustd.h"
#include <stdlib.h>

-#if defined(__GLIBC__)
+#if defined(__linux__)
# include <endian.h>
#endif
#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__APPLE__)
31 changes: 31 additions & 0 deletions rhash/pkg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: rhash
dependencies:
- stage: base
- stage: libressl
steps:
- sources:
- url: http://deb.debian.org/debian/pool/main/r/rhash/rhash_1.4.0.orig.tar.gz
destination: rhash.tar.gz
sha256: 2ea39540f5c580da0e655f7b483c19e0d31506aed4202d88e8459fa7aeeb8861
sha512: 2f02487fffe8d1bc70c4454829bbd250a15fbd09db5ef85c54d3e8ad1008e84616ea54483292deae45047a27964e27b26d9b3da8447e7c37dac1e2ce18a63a07
prepare:
- |
tar -xzf rhash.tar.gz --strip-components=1
patch -p1 < /pkg/patches/byteorder.patch
./configure \
--prefix="${TOOLCHAIN}" \
--enable-openssl \
--disable-openssl-runtime
build:
- |
make -j $(nproc)
install:
- |
make DESTDIR=/rootfs install
make DESTDIR=/rootfs install-lib-headers install-lib-shared install-lib-so-link
finalize:
- from: /rootfs
to: /
4 changes: 4 additions & 0 deletions tools/pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ dependencies:
- stage: bison
- stage: bzip2
- stage: ca-certificates
- stage: cmake
- stage: coreutils
- stage: cpio
- stage: curl
- stage: dejagnu
- stage: diffutils
- stage: dtc
- stage: elfutils
- stage: expat
- stage: expect
- stage: file
- stage: findutils
Expand All @@ -33,6 +35,7 @@ dependencies:
- stage: kmod
- stage: libressl
- stage: libtool
- stage: libuv
- stage: m4
- stage: make
- stage: musl-fts
Expand All @@ -45,6 +48,7 @@ dependencies:
- stage: protobuf
- stage: protoc-gen-go
- stage: python2
- stage: rhash
- stage: sed
- stage: squashfs-tools
- stage: swig
Expand Down

0 comments on commit 546446a

Please sign in to comment.