Files
haikuports/dev-libs/protobuf-c/protobuf_c-1.5.2.recipe
2025-12-20 07:22:45 +01:00

85 lines
2.0 KiB
Bash

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
}