mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
capnproto: add new recipe, version 0.10.2 (#7311)
* capnproto: add new recipe, version 0.10.2 * misc recipe cleanup, move cmds to devel, and add lib compat versioning Co-authored-by: augiedoggie
This commit is contained in:
110
dev-libs/capnproto/capnproto-0.10.2.recipe
Normal file
110
dev-libs/capnproto/capnproto-0.10.2.recipe
Normal file
@@ -0,0 +1,110 @@
|
||||
SUMMARY="A Data Serialization Format"
|
||||
DESCRIPTION="Cap'n Proto is a binary data interchange format and capability-based \
|
||||
RPC system."
|
||||
HOMEPAGE="https://capnproto.org"
|
||||
COPYRIGHT="2017 Cloudflare, Inc. and contributors"
|
||||
LICENSE="MIT"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/capnproto/capnproto/archive/refs/tags/v${portVersion}.tar.gz"
|
||||
CHECKSUM_SHA256="756262841fa66260c9969e900701cc86720c2548584fb96c8153348fd7edfe69"
|
||||
PATCHES="capnproto-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
libVersion="$portVersion"
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%.*}"
|
||||
|
||||
PROVIDES="
|
||||
capnproto$secondaryArchSuffix = $portVersion
|
||||
lib:libcapnp$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libcapnpc$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libcapnp_json$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libcapnp_rpc$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libcapnp_websocket$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libkj$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libkj_async$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libkj_gzip$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libkj_http$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libkj_test$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libkj_tls$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libssl$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
capnproto${secondaryArchSuffix}_devel = $portVersion
|
||||
cmd:capnp$secondaryArchSuffix
|
||||
cmd:capnpc$secondaryArchSuffix
|
||||
cmd:capnpc_c++$secondaryArchSuffix
|
||||
cmd:capnpc_capnp$secondaryArchSuffix
|
||||
devel:libcapnp$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libcapnpc$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libcapnp_json$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libcapnp_rpc$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libcapnp_websocket$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libkj$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libkj_async$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libkj_gzip$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libkj_http$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libkj_test$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libkj_tls$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES_devel="
|
||||
capnproto$secondaryArchSuffix == $portVersion base
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libssl$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cmake \
|
||||
-B build -S . \
|
||||
$cmakeDirArgs \
|
||||
-DCMAKE_CXX_FLAGS="-std=c++11" \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DWITH_OPENSSL=ON \
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
|
||||
make -C build $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make -C build install
|
||||
|
||||
prepareInstalledDevelLibs \
|
||||
libcapnp \
|
||||
libcapnpc \
|
||||
libcapnp-json \
|
||||
libcapnp-rpc \
|
||||
libcapnp-websocket \
|
||||
libkj \
|
||||
libkj-async \
|
||||
libkj-gzip \
|
||||
libkj-http \
|
||||
libkj-test \
|
||||
libkj-tls
|
||||
|
||||
fixPkgconfig
|
||||
|
||||
packageEntries devel \
|
||||
$binDir \
|
||||
$developDir \
|
||||
$libDir/cmake
|
||||
}
|
||||
47
dev-libs/capnproto/patches/capnproto-0.10.2.patchset
Normal file
47
dev-libs/capnproto/patches/capnproto-0.10.2.patchset
Normal file
@@ -0,0 +1,47 @@
|
||||
From 3aa998fadddc8dbe4df4c7c8d1c905c87ba27bde Mon Sep 17 00:00:00 2001
|
||||
From: Han Pengfei <pengphei@qq.com>
|
||||
Date: Thu, 20 Oct 2022 02:46:51 +0000
|
||||
Subject: Fix missing pwritev
|
||||
|
||||
Signed-off-by: Han Pengfei <pengphei@qq.com>
|
||||
|
||||
diff --git a/c++/src/kj/filesystem-disk-unix.c++ b/c++/src/kj/filesystem-disk-unix.c++
|
||||
index cc19878..8f6d348 100644
|
||||
--- a/c++/src/kj/filesystem-disk-unix.c++
|
||||
+++ b/c++/src/kj/filesystem-disk-unix.c++
|
||||
@@ -403,7 +403,7 @@ public:
|
||||
|
||||
static const byte ZEROS[4096] = { 0 };
|
||||
|
||||
-#if __APPLE__ || __CYGWIN__ || (defined(__ANDROID__) && __ANDROID_API__ < 24)
|
||||
+#if __APPLE__ || __CYGWIN__ || (defined(__ANDROID__) && __ANDROID_API__ < 24) || defined(__HAIKU__)
|
||||
// Mac & Cygwin & Android API levels 23 and lower doesn't have pwritev().
|
||||
while (size > sizeof(ZEROS)) {
|
||||
write(offset, ZEROS);
|
||||
--
|
||||
2.37.3
|
||||
|
||||
|
||||
From 534327ca766b0ad64689b8df00e2d028884b467a Mon Sep 17 00:00:00 2001
|
||||
From: Han Pengfei <pengphei@qq.com>
|
||||
Date: Fri, 28 Oct 2022 02:12:30 +0000
|
||||
Subject: message: fix sizeof assert for areaspace
|
||||
|
||||
Signed-off-by: Han Pengfei <pengphei@qq.com>
|
||||
|
||||
diff --git a/c++/src/capnp/message.h b/c++/src/capnp/message.h
|
||||
index 55a8b2e..a6bfeac 100644
|
||||
--- a/c++/src/capnp/message.h
|
||||
+++ b/c++/src/capnp/message.h
|
||||
@@ -127,7 +127,7 @@ public:
|
||||
private:
|
||||
ReaderOptions options;
|
||||
|
||||
-#if defined(__EMSCRIPTEN__)
|
||||
+#if defined(__EMSCRIPTEN__) || defined(__HAIKU__)
|
||||
static constexpr size_t arenaSpacePadding = 19;
|
||||
#else
|
||||
static constexpr size_t arenaSpacePadding = 18;
|
||||
--
|
||||
2.37.3
|
||||
|
||||
Reference in New Issue
Block a user