protobuf_c, libomemo_c: add recipe (#13409)

This commit is contained in:
nilFinx
2025-12-20 15:22:45 +09:00
committed by GitHub
parent 48cbac8db0
commit d355d6755f
2 changed files with 178 additions and 0 deletions

View File

@@ -0,0 +1,94 @@
SUMMARY="Fork of libsignal-protocol-c adding support for OMEMO XEP-0384 0.5.0+"
DESCRIPTION="This is a fork of libsignal-protocol-c, an implementation of Signal's \
ratcheting forward secrecy protocol that works in synchronous and asynchronous messaging. \
The fork adds support for OMEMO as defined in XEP-0384 versions 0.3.0 and later.
- OMEMO version 0.3.0 uses the original libsignal-protocol-c implementation with its protocol versions 2 and 3.
- OMEMO version 0.4.0+ is implemented using a new protocol version 4 internally. In comparison with protocol \
version 3, it changes:
- HKDF info strings
- Protocol buffer encoding
- Signature scheme (uses XEd25519 instead of custom \"Curve25519 signatures\")
- Specification-compliant double ratchet
- Support for Ed25519 public keys
- Various serializations
- Removes unused functionality
"
HOMEPAGE="https://github.com/dino/libomemo-c"
COPYRIGHT="2015-2016 Open Whisper Systems
2020-2025 Dino Team
"
LICENSE="GNU GPL v3"
REVISION="1"
SOURCE_URI="$HOMEPAGE/releases/download/v$portVersion/libomemo-c-$portVersion.tar.gz"
CHECKSUM_SHA256="766827c07ff2cdc4deaf87bd9485474ed4aeea2fa5152593bf49fabe22b5865f"
SOURCE_FILENAME="libomemo-c-$portVersion.tar.gz"
SOURCE_DIR="libomemo-c-$portVersion"
ARCHITECTURES="all ?x86_gcc2"
libVersion="$portVersion"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
libomemo_c = $portVersion
lib:libomemo_c = $libVersionCompat
"
REQUIRES="
haiku
lib:libprotobuf_c
"
PROVIDES_devel="
libomemo_c_devel = $portVersion
devel:libomemo_c = $libVersionCompat
"
REQUIRES_devel="
libomemo_c == $portVersion base
devel:libprotobuf_c
"
BUILD_REQUIRES="
haiku_devel
devel:libprotobuf_c
devel:libcheck
devel:libglib_2.0
devel:libssl
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc
cmd:meson
cmd:pkg_config
"
TEST_REQUIRES="
cmd:meson
"
BUILD()
{
meson setup build \
--buildtype=release \
--prefix=$prefix \
--libdir=$libDir \
--reconfigure
meson compile -C build
}
INSTALL()
{
meson install -C build
prepareInstalledDevelLib \
libomemo-c
fixPkgconfig
packageEntries devel \
$developDir
}
TEST()
{
meson test -C build
}

View File

@@ -0,0 +1,84 @@
SUMMARY="Protocol Buffers implementation in C"
DESCRIPTION="This is protobuf-c, a C implementation of the Google Protocol Buffers data serialization format. \
It includes libprotobuf-c, a pure C library that implements protobuf encoding and decoding, and protoc-gen-c, \
a code generator plugin for protoc that converts Protocol Buffer .proto files to C descriptor code. \
protobuf-c formerly included an RPC implementation; that code has been split out into the protobuf-c-rpc project.
protobuf-c was originally written by Dave Benson and maintained by him through version 0.15 but is now being \
maintained by a new team. Thanks, Dave!"
HOMEPAGE="https://github.com/protobuf-c/protobuf-c"
COPYRIGHT="2008-2025, Dave Benson and the protobuf-c authors"
LICENSE="BSD (2-clause)"
REVISION="1"
SOURCE_URI="$HOMEPAGE/releases/download/v$portVersion/protobuf-c-$portVersion.tar.gz"
CHECKSUM_SHA256="e2c86271873a79c92b58fef7ebf8de1aa0df4738347a8bd5d4e65a80a16d0d24"
SOURCE_FILENAME="protobuf-c-$portVersion.tar.gz"
SOURCE_DIR="protobuf-c-$portVersion"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="?x86"
libVersion="1.0.0"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
protobuf_c = $portVersion
lib:libprotobuf_c = $libVersionCompat
"
REQUIRES="
haiku
"
PROVIDES_devel="
protobuf_c_devel = $portVersion
cmd:protoc_c = $portVersion
cmd:protoc_gen_c = $portVersion
devel:libprotobuf_c = $libVersionCompat
"
REQUIRES_devel="
protobuf_c == $portVersion base
haiku
lib:libprotobuf
"
BUILD_REQUIRES="
haiku_devel
devel:libprotobuf >= 31
"
BUILD_PREREQUIRES="
cmd:awk
cmd:gcc
cmd:make
cmd:pkg_config
"
BUILD()
{
ln -sf "`finddir B_SYSTEM_HEADERS_DIRECTORY`${secondaryArchSubDir}/google"
runConfigure ./configure \
--disable-static \
--enable-shared
make $jobArgs
}
INSTALL()
{
make install
# remove libtool file
rm -rf $libDir/libprotobuf-c.la
prepareInstalledDevelLib \
libprotobuf-c
fixPkgconfig
packageEntries devel \
$developDir \
$binDir
}
TEST()
{
make check
}