diff --git a/build/abseil/build.sh b/build/abseil/build.sh new file mode 100755 index 000000000..c3585638c --- /dev/null +++ b/build/abseil/build.sh @@ -0,0 +1,44 @@ +#!/usr/bin/bash +# +# {{{ CDDL HEADER +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# }}} + +# Copyright 2025 Oxide Computer Company + +. ../../lib/build.sh + +PROG=abseil +VER=20240116.3 +PKG=ooce/library/abseil +SUMMARY="abseil" +DESC="Collection of c++ libraries from google" + +set_builddir $PROG-cpp-$VER + +CONFIGURE_OPTS=" + -DCMAKE_BUILD_TYPE=Release + -DCMAKE_INSTALL_PREFIX=$PREFIX +" + +CONFIGURE_OPTS[i386]="-DCMAKE_INSTALL_LIBDIR=$PREFIX/${LIBDIRS[i386]}" +CONFIGURE_OPTS[amd64]="-DCMAKE_INSTALL_LIBDIR=$PREFIX/${LIBDIRS[amd64]}" + +init +download_source abseil $PROG-cpp-$VER +patch_source +prep_build cmake +build -noctf # C++ +make_package +clean_up + +# Vim hints +# vim:ts=4:sw=4:et:fdm=marker diff --git a/build/abseil/local.mog b/build/abseil/local.mog new file mode 100644 index 000000000..e4d2e458f --- /dev/null +++ b/build/abseil/local.mog @@ -0,0 +1,13 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. + +# Copyright 2025 Oxide Computer Company + +license LICENSE license=Apache2 diff --git a/build/boost/build.sh b/build/boost/build.sh new file mode 100755 index 000000000..c1923ff2e --- /dev/null +++ b/build/boost/build.sh @@ -0,0 +1,51 @@ +#!/usr/bin/bash +# +# {{{ CDDL HEADER +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# }}} + +# Copyright 2025 Oxide Computer Company + +. ../../lib/build.sh + +PROG=boost +VER=1.87.0 +PKG=ooce/library/boost +SUMMARY="boost" +DESC="Widely used collection of c++ libraries" + +SKIP_LICENCES=bsl + +OPREFIX=$PREFIX +PREFIX+="/$PROG" + +VERNAME=${VER//./_} +set_arch 64 +set_builddir boost_$VERNAME + +build() { + pushd $TMPDIR/$BUILDDIR >/dev/null \ + || logerr "Cannot change to $TMPDIR/$BUILDDIR" + logcmd ./bootstrap.sh --prefix=$DESTDIR/$PREFIX || logerr "bootstrap failed" + logcmd ./b2 link=static runtime-link=static install || logerr "build failed" + popd >/dev/null +} + +init +download_source boost boost_$VERNAME +patch_source +prep_build +build +make_package +clean_up + +# Vim hints +# vim:ts=4:sw=4:et:fdm=marker diff --git a/build/boost/local.mog b/build/boost/local.mog new file mode 100644 index 000000000..fc2d46357 --- /dev/null +++ b/build/boost/local.mog @@ -0,0 +1,13 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. + +# Copyright 2025 Oxide Computer Company + +license LICENSE_1_0.txt license=bsl diff --git a/build/boost/patches/illumos.patch b/build/boost/patches/illumos.patch new file mode 100644 index 000000000..9e54e2353 --- /dev/null +++ b/build/boost/patches/illumos.patch @@ -0,0 +1,31 @@ +This was fixed upstream in +https://github.com/boostorg/process/commit/bb375f50bd5b362b087aab326df158a + +This patch can be removed once we have updated past that. + +diff --git a/libs/process/src/ext/cwd.cpp b/libs/process/src/ext/cwd.cpp +index 6aee83de1..32042ce4e 100644 +--- a/libs/process/src/ext/cwd.cpp ++++ b/libs/process/src/ext/cwd.cpp +@@ -124,7 +124,7 @@ filesystem::path cwd(boost::process::v2::pid_type pid, boost::system::error_code + filesystem::path("/proc") / std::to_string(pid) / "cwd", ec + ); + #elif defined(__sun) +- return fileystem::canonical( ++ return filesystem::canonical( + filesystem::path("/proc") / std::to_string(pid) / "path/cwd", ec + ); + #endif +diff --git a/libs/process/src/ext/exe.cpp b/libs/process/src/ext/exe.cpp +index 0f05f8ab0..0d0d95ada 100644 +--- a/libs/process/src/ext/exe.cpp ++++ b/libs/process/src/ext/exe.cpp +@@ -138,7 +138,7 @@ filesystem::path exe(boost::process::v2::pid_type pid, boost::system::error_code + filesystem::path("/proc") / std::to_string(pid) / "exe", ec + ); + #elif defined(__sun) +- return fileystem::canonical( ++ return filesystem::canonical( + filesystem::path("/proc") / std::to_string(pid) / "path/a.out", ec + ); + #endif diff --git a/build/boost/patches/series b/build/boost/patches/series new file mode 100644 index 000000000..77f8d19db --- /dev/null +++ b/build/boost/patches/series @@ -0,0 +1 @@ +illumos.patch diff --git a/build/meta/extra-build-tools.p5m b/build/meta/extra-build-tools.p5m index 244d82d93..e9ad42e0f 100644 --- a/build/meta/extra-build-tools.p5m +++ b/build/meta/extra-build-tools.p5m @@ -21,6 +21,7 @@ depend fmri=ooce/developer/yasm type=require depend fmri=ooce/developer/zig type=require depend fmri=ooce/editor/emacs type=require depend fmri=ooce/fonts/liberation type=require +depend fmri=ooce/library/abseil type=require depend fmri=ooce/library/apr type=require depend fmri=ooce/library/cairo type=require depend fmri=ooce/library/fcgi2 type=require diff --git a/build/protobuf/build.sh b/build/protobuf/build.sh index 965439cf3..19a5d870e 100755 --- a/build/protobuf/build.sh +++ b/build/protobuf/build.sh @@ -30,9 +30,14 @@ CONFIGURE_OPTS=" -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_POSITION_INDEPENDENT_CODE=ON -Dprotobuf_BUILD_TESTS=OFF + -Dprotobuf_ABSL_PROVIDER=package + -DCMAKE_PREFIX_PATH=$PREFIX " CONFIGURE_OPTS[i386]="-DCMAKE_INSTALL_LIBDIR=$PREFIX/${LIBDIRS[i386]}" -CONFIGURE_OPTS[amd64]="-DCMAKE_INSTALL_LIBDIR=$PREFIX/${LIBDIRS[amd64]}" +CONFIGURE_OPTS[amd64]=" + -DCMAKE_INSTALL_LIBDIR=$PREFIX/${LIBDIRS[amd64]} + -DCMAKE_LIBRARY_ARCHITECTURE=amd64 +" init clone_github_source $PROG "$GITHUB/protocolbuffers/$PROG" v$VER diff --git a/doc/baseline b/doc/baseline index bdfa59615..508d592ce 100644 --- a/doc/baseline +++ b/doc/baseline @@ -116,9 +116,11 @@ extra.omnios ooce/file/acltool extra.omnios ooce/file/lsof extra.omnios ooce/file/tree extra.omnios ooce/fonts/liberation +extra.omnios ooce/library/abseil extra.omnios ooce/library/apr extra.omnios ooce/library/apr-util extra.omnios ooce/library/bdw-gc +extra.omnios ooce/library/boost extra.omnios ooce/library/cairo extra.omnios ooce/library/fcgi2 extra.omnios ooce/library/fontconfig diff --git a/doc/packages.md b/doc/packages.md index 876bebc6f..637d61981 100644 --- a/doc/packages.md +++ b/doc/packages.md @@ -92,9 +92,11 @@ | ooce/file/lsof | 4.95.0 | https://github.com/lsof-org/lsof/releases | [omniosorg](https://github.com/omniosorg) | ooce/file/tree | 2.1.1 | http://mama.indstate.edu/users/ice/tree/ | [omniosorg](https://github.com/omniosorg) | ooce/fonts/liberation | 2.1.5 | https://github.com/liberationfonts/liberation-fonts/releases | [omniosorg](https://github.com/omniosorg) +| ooce/library/abseil | 20240116.3 | https://github.com/abseil/abseil-cpp/releases/ | [oxidecomputer](https://github.com/oxidecomputer) | ooce/library/apr | 1.7.4 | https://downloads.apache.org/apr/ | [omniosorg](https://github.com/omniosorg) | ooce/library/apr-util | 1.6.3 | https://downloads.apache.org/apr/ | [omniosorg](https://github.com/omniosorg) | ooce/library/bdw-gc | 8.2.2 | https://www.hboehm.info/gc/gc_source/ | [omniosorg](https://github.com/omniosorg) +| ooce/library/boost | 1.87.0 | https://archives.boost.io/release | [oxidecomputer](https://github.com/oxidecomputer) | ooce/library/cairo | 1.16.0 | https://cairographics.org/releases/ | [omniosorg](https://github.com/omniosorg) | ooce/library/fcgi2 | 2.4.2 | https://github.com/FastCGI-Archives/fcgi2/releases | [omniosorg](https://github.com/omniosorg) | ooce/library/fontconfig | 2.14.2 | https://www.freedesktop.org/software/fontconfig/release/ https://www.freedesktop.org/wiki/Software/fontconfig/ | [omniosorg](https://github.com/omniosorg)