85 lines
2.2 KiB
Bash
85 lines
2.2 KiB
Bash
SUMMARY="An efficient method of encoding structured data"
|
||
DESCRIPTION="Protocol buffers are Google's language-neutral, platform-neutral, \
|
||
extensible mechanism for serializing structured data – think XML, but smaller, \
|
||
faster, and simpler. You define how you want your data to be structured once, \
|
||
then you can use special generated source code to easily write and read your \
|
||
structured data to and from a variety of data streams and using a variety of \
|
||
languages – Java, C++, or Python."
|
||
HOMEPAGE="https://github.com/google/protobuf"
|
||
COPYRIGHT="2008-2018 Google"
|
||
LICENSE="Apache v2"
|
||
REVISION="2"
|
||
SOURCE_URI="$HOMEPAGE/archive/v$portVersion.tar.gz"
|
||
CHECKSUM_SHA256="9b4ee22c250fe31b16f1a24d61467e40780a3fbb9b91c3b65be2a376ed913a1a"
|
||
PATCHES="protobuf-$portVersion.patchset"
|
||
|
||
ARCHITECTURES="all !x86_gcc2"
|
||
SECONDARY_ARCHITECTURES="x86"
|
||
|
||
libVersion="24.0.0"
|
||
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
||
|
||
PROVIDES="
|
||
protobuf$secondaryArchSuffix = $portVersion
|
||
cmd:protoc$secondaryArchSuffix = $portVersion
|
||
lib:libprotobuf$secondaryArchSuffix = $libVersionCompat
|
||
lib:libprotobuf_lite$secondaryArchSuffix = $libVersionCompat
|
||
lib:libprotoc$secondaryArchSuffix = $libVersionCompat
|
||
"
|
||
REQUIRES="
|
||
haiku$secondaryArchSuffix
|
||
"
|
||
|
||
PROVIDES_devel="
|
||
protobuf${secondaryArchSuffix}_devel = $portVersion
|
||
devel:libprotobuf$secondaryArchSuffix = $libVersionCompat
|
||
devel:libprotobuf_lite$secondaryArchSuffix = $libVersionCompat
|
||
devel:libprotoc$secondaryArchSuffix = $libVersionCompat
|
||
"
|
||
REQUIRES_devel="
|
||
protobuf$secondaryArchSuffix == $portVersion base
|
||
"
|
||
|
||
BUILD_REQUIRES="
|
||
haiku${secondaryArchSuffix}_devel
|
||
devel:libgmock$secondaryArchSuffix
|
||
"
|
||
BUILD_PREREQUIRES="
|
||
cmd:autoreconf
|
||
cmd:gcc$secondaryArchSuffix
|
||
cmd:libtoolize$secondaryArchSuffix
|
||
cmd:make
|
||
"
|
||
|
||
TEST_REQUIRES="
|
||
lib:libgmock$secondaryArchSuffix
|
||
"
|
||
|
||
defineDebugInfoPackage protobuf$secondaryArchSuffix \
|
||
$libDir/libprotobuf.so.$libVersion \
|
||
$libDir/libprotoc.so.$libVersion \
|
||
$libDir/libprotobuf-lite.so.$libVersion
|
||
|
||
BUILD()
|
||
{
|
||
./autogen.sh
|
||
runConfigure ./configure
|
||
make $jobArgs
|
||
}
|
||
|
||
INSTALL()
|
||
{
|
||
make install
|
||
|
||
rm $libDir/lib*.la $libDir/lib*.a
|
||
|
||
prepareInstalledDevelLibs libprotobuf-lite libprotobuf libprotoc
|
||
fixPkgconfig
|
||
packageEntries devel $developDir
|
||
}
|
||
|
||
TEST()
|
||
{
|
||
make check
|
||
}
|