Skip to content

Commit

Permalink
Add libressl port
Browse files Browse the repository at this point in the history
  • Loading branch information
rafalmiel committed Nov 10, 2023
1 parent 6e4c1cc commit e562a12
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/toolchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ jobs:
submodules: true

- name: Install Packages
run: apt-fast -y install nasm meson ninja-build bison flex libgmp3-dev libmpc-dev libmpfr-dev texinfo xorriso autotools-dev automake autoconf autoconf-archive gettext pkgconf autopoint gcc-12 g++-12 gperf linux-libc-dev
run: |
add-apt-repository --yes ppa:deadsnakes/ppa
apt-get update
apt-fast -y install nasm meson ninja-build bison flex libgmp3-dev libmpc-dev libmpfr-dev texinfo xorriso autotools-dev automake autoconf autoconf-archive gettext pkgconf autopoint gcc-12 g++-12 gperf linux-libc-dev python3.11
- name: Configure gcc
run: |
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ https://github.com/rafalmiel/cykusz-rs/assets/3881998/afa514a1-f435-4eeb-8c80-20
- [x] less (<https://github.com/rafalmiel/less/tree/cykusz>)
- [x] zstd (<https://github.com/rafalmiel/zstd/tree/cykusz>)
- [x] zlib (<https://github.com/rafalmiel/zlib/tree/cykusz>)
- [x] libressl (<https://github.com/rafalmiel/libressl-portable/tree/cykusz>)
- [x] doom (<https://github.com/rafalmiel/doomgeneric/tree/cykusz>)
- [x] netcat (<https://github.com/rafalmiel/netcat/tree/cykusz>)
- [x] python (<https://github.com/rafalmiel/cpython/tree/cykusz>)
Expand Down
36 changes: 35 additions & 1 deletion sysroot/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ DOOM_SRC_DIR=$SRC_DIR/doomgeneric
COREUTILS_SRC_DIR=$SRC_DIR/coreutils
TZDB_SRC_DIR=$SRC_DIR/tzdb
ZSTD_SRC_DIR=$SRC_DIR/zstd
LIBRESSL_SRC_DIR=$SRC_DIR/libressl-portable
LLVM_SRC_DIR=$SRC_DIR/llvm-project
LESS_SRC_DIR=$SRC_DIR/less
NETCAT_SRC_DIR=$SRC_DIR/netcat
Expand All @@ -34,6 +35,7 @@ NANO_CYKUSZ_BUILD_DIR=$BUILD_DIR/cykusz-nano
BASH_CYKUSZ_BUILD_DIR=$BUILD_DIR/cykusz-bash
COREUTILS_CYKUSZ_BUILD_DIR=$BUILD_DIR/cykusz-coreutils
ZSTD_CYKUSZ_BUILD_DIR=$BUILD_DIR/cykusz-zstd
LIBRESSL_CYKUSZ_BUILD_DIR=$BUILD_DIR/cykusz-libressl
LLVM_CYKUSZ_BUILD_DIR=$BUILD_DIR/cykusz-llvm
LESS_CYKUSZ_BUILD_DIR=$BUILD_DIR/cykusz-less
NETCAT_CYKUSZ_BUILD_DIR=$BUILD_DIR/cykusz-netcat
Expand Down Expand Up @@ -141,6 +143,18 @@ function _prepare_zlib {
fi
}

function _prepare_libressl {
if [ ! -d $LIBRESSL_SRC_DIR ]; then
mkdir -p $SRC_DIR
git clone --depth 1 -b cykusz https://github.com/rafalmiel/libressl-portable.git $LIBRESSL_SRC_DIR

pushd .
cd $LIBRESSL_SRC_DIR
./autogen.sh
popd
fi
}

function _prepare_python {
if [ ! -d $PYTHON_SRC_DIR ]; then
mkdir -p $SRC_DIR
Expand Down Expand Up @@ -532,6 +546,7 @@ function _cykusz_zstd {

popd
}

function _cykusz_zlib {
_prepare_zlib

Expand All @@ -551,6 +566,25 @@ function _cykusz_zlib {
popd
}

function _cykusz_libressl {
_prepare_libressl

mkdir -p $LIBRESSL_CYKUSZ_BUILD_DIR

pushd .

cd $LIBRESSL_CYKUSZ_BUILD_DIR

export CYKUSZ_SYSROOT_DIR=$SYSROOT
export CYKUSZ_ROOT_DIR=$SPATH
cmake -DCMAKE_TOOLCHAIN_FILE=$SPATH/CMakeToolchain-x86_64-cykusz.txt -DBUILD_SHARED_LIBS=ON -DLIBRESSL_APPS=ON -DENABLE_NC=OFF -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release $LIBRESSL_SRC_DIR

VERBOSE=1 make -j12 DESTDIR=$SYSROOT
make DESTDIR=$SYSROOT install

popd
}

function _cykusz_python {
_prepare_python

Expand All @@ -562,7 +596,7 @@ function _cykusz_python {
export CONFIG_SITE=$SPATH/python-config-site
export PKG_CONFIG_SYSROOT_DIR=$SYSROOT
export PKG_CONFIG_LIBDIR=$SYSROOT/usr/lib/pkgconfig:$SYSROOT/usr/share/pkgconfig
$PYTHON_SRC_DIR/configure --with-build-python=python --host=$TRIPLE --build=x86_64-linux-gnu --prefix=/usr --enable-shared --with-system-ffi --with-system-expat --disable-ipv6 --without-ensurepip --without-static-libpython
$PYTHON_SRC_DIR/configure --with-build-python=python3.11 --host=$TRIPLE --build=x86_64-linux-gnu --prefix=/usr --enable-shared --with-system-ffi --with-system-expat --disable-ipv6 --without-ensurepip --without-static-libpython


make -j6 DESTDIR=$SYSROOT
Expand Down

0 comments on commit e562a12

Please sign in to comment.