1SUMMARY="A serialization library" 2DESCRIPTION="An efficient binary serialization format, which lets you exchange \ 3data among multiple languages like JSON, except that it's faster and smaller. \ 4Small integers are encoded into a single byte while typical short strings \ 5require only one extra byte in addition to the strings themselves." 6HOMEPAGE="https://msgpack.org/" 7COPYRIGHT="2008-2015 Furuhashi Sadayuki" 8LICENSE="Boost v1.0" 9REVISION="3" 10SOURCE_URI="https://github.com/msgpack/msgpack-c/archive/cpp-$portVersion.tar.gz" 11CHECKSUM_SHA256="ff865a36bad5c72b8e7ebc4b7cf5f27a820fce4faff9c571c1791e3728355a39" 12SOURCE_DIR="msgpack-c-cpp-$portVersion" 13PATCHES="msgpack_c_cpp-$portVersion.patchset" 14 15ARCHITECTURES="all !x86_gcc2" 16SECONDARY_ARCHITECTURES="x86" 17 18libVersion="2.0.0" 19libVersionCompat="$libVersion compat >= ${libVersion%%.*}" 20 21PROVIDES=" 22 msgpack_c_cpp$secondaryArchSuffix = $portVersion 23 lib:libmsgpackc$secondaryArchSuffix = $libVersionCompat 24 " 25REQUIRES=" 26 haiku$secondaryArchSuffix 27 lib:libz$secondaryArchSuffix 28 " 29 30PROVIDES_devel=" 31 msgpack_c_cpp${secondaryArchSuffix}_devel = $portVersion 32 devel:libmsgpackc$secondaryArchSuffix = $libVersionCompat 33 " 34REQUIRES_devel=" 35 msgpack_c_cpp$secondaryArchSuffix == $portVersion base 36 devel:libz$secondaryArchSuffix 37 " 38 39BUILD_REQUIRES=" 40 haiku${secondaryArchSuffix}_devel 41 devel:libboost_chrono$secondaryArchSuffix 42 devel:libboost_context$secondaryArchSuffix 43 devel:libboost_system$secondaryArchSuffix 44 devel:libboost_timer$secondaryArchSuffix 45 devel:libgtest$secondaryArchSuffix 46 devel:libz$secondaryArchSuffix 47 " 48BUILD_PREREQUIRES=" 49 cmd:cmake 50 cmd:doxygen 51 cmd:gcc$secondaryArchSuffix 52 cmd:ld$secondaryArchSuffix 53 cmd:libtoolize$secondaryArchSuffix 54 cmd:make 55 cmd:pkg_config$secondaryArchSuffix 56 cmd:sed 57 " 58 59defineDebugInfoPackage msgpack_c_cpp$secondaryArchSuffix \ 60 "$libDir"/libmsgpackc.so.$libVersion 61 62PATCH() 63{ 64 sed -i 's/-pthread/-lroot/g' example/cpp03/CMakeLists.txt 65 sed -i "s|-std=c++98|-std=gnu++14|g" CMakeLists.txt 66} 67 68BUILD() 69{ 70 cmake -Bbuild -S. \ 71 -DCMAKE_BUILD_TYPE=Release \ 72 -DCMAKE_INSTALL_PREFIX="$prefix" \ 73 -DCMAKE_INSTALL_LIBDIR="$libDir" \ 74 -DBUILD_SHARED_LIBS=ON \ 75 -DCMAKE_SKIP_RPATH=YES \ 76 -DMSGPACK_BUILD_EXAMPLES=OFF \ 77 -DMSGPACK_CXX11=OFF 78 make -C build $jobArgs 79} 80 81INSTALL() 82{ 83 84 make -C build install 85 86 mkdir -p "$includeDir" 87 mv "$prefix"/include/* "$includeDir" 88 rm -rf "$prefix"/include 89 90 rm -f "$libDir"/*.la 91 92 prepareInstalledDevelLib libmsgpackc 93 fixPkgconfig 94 95 packageEntries devel \ 96 "$developDir" \ 97 "$libDir"/cmake 98} 99 100TEST() 101{ 102 make check 103} 104