MSGPACK-C-CPP recipe (#836)

* Msgpack recipe

Squashed msgpack recipe

MSGPACK-C-CPP recipe

Boost Licence

Recipe fix

Hash fix

Fixed recipe, thanks for fbrosson

* Update msgpack_c_cpp-2.0.0.recipe
This commit is contained in:
miqlas
2016-12-26 21:23:44 +01:00
committed by waddlesplash
parent e9f70a5d2f
commit 4b29b0a56b
2 changed files with 117 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
Boost Software License - Version 1.0 - August 17th, 2003
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:
The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

View File

@@ -0,0 +1,94 @@
SUMMARY="A serialization library"
DESCRIPTION="An efficient binary serialization format, which lets you exchange \
data among multiple languages like JSON, except that it's faster and smaller. \
Small integers are encoded into a single byte while typical short strings \
require only one extra byte in addition to the strings themselves."
HOMEPAGE="http://msgpack.org/"
COPYRIGHT="2010-2016 MessagePack Developers"
LICENSE="Boost v1.0"
REVISION="1"
SOURCE_URI="https://github.com/msgpack/msgpack-c/archive/cpp-$portVersion.tar.gz"
SOURCE_DIR="msgpack-c-cpp-$portVersion"
CHECKSUM_SHA256="eb20b4bf15f20bad149ec82fffac74f16de2a8a797e321a3f8189d63263a511e"
ARCHITECTURES="x86_gcc2 x86 ?x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
msgpack_c_cpp$secondaryArchSuffix = $portVersion
lib:libmsgpackc$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_devel="
msgpack_c_cpp${secondaryArchSuffix}_devel = $portVersion
devel:libmsgpackc$secondaryArchSuffix = $portVersion
"
REQUIRES_devel="
msgpack_c_cpp$secondaryArchSuffix == $portVersion
devel:libz${secondaryArchSuffix}
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libz${secondaryArchSuffix}
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:doxygen
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:sed
"
PATCH()
{
sed -i 's/-pthread/-lroot/g' example/cpp03/CMakeLists.txt
}
BUILD()
{
export LDFLAGS="-lnetwork -lbsd"
export CFLAGS="-D_BSD_SOURCE"
mkdir -p build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$prefix \
-DCMAKE_SKIP_RPATH=YES \
..
make $jobArgs
}
INSTALL()
{
mkdir -p $includeDir
mkdir -p $libDir
cd build
make install
mv $libDir/../libmsgpackc.* $libDir
mv $libDir/../pkgconfig $libDir
mv $prefix/include/* $includeDir
rm -rf $prefix/include
rm -f $libDir/*.la
prepareInstalledDevelLib libmsgpackc
fixPkgconfig
packageEntries devel \
$developDir
}
TEST()
{
make check
}