From 031a13aefb7fabc539345503f943709ee2c36bc1 Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Tue, 23 Dec 2014 05:55:24 +0000 Subject: [PATCH] librsync: Update version Also addresses Adrien's request of using the full Git commit hash, which unfortunately is still needed although in the Git history it seems the version has already been released. Signed-off-by: Timothy Gu --- ...-1.0.0pre.recipe => librsync-1.0.0.recipe} | 30 +++++++++++-------- .../librsync/patches/librsync-1.0.0.patchset | 28 +++++++++++++++++ 2 files changed, 46 insertions(+), 12 deletions(-) rename net-libs/librsync/{librsync-1.0.0pre.recipe => librsync-1.0.0.recipe} (64%) create mode 100644 net-libs/librsync/patches/librsync-1.0.0.patchset diff --git a/net-libs/librsync/librsync-1.0.0pre.recipe b/net-libs/librsync/librsync-1.0.0.recipe similarity index 64% rename from net-libs/librsync/librsync-1.0.0pre.recipe rename to net-libs/librsync/librsync-1.0.0.recipe index f50168be7..1153bc485 100644 --- a/net-libs/librsync/librsync-1.0.0pre.recipe +++ b/net-libs/librsync/librsync-1.0.0.recipe @@ -7,10 +7,20 @@ design similar to that of zlib with the aim of allowing it to be embedded \ into many different applications." HOMEPAGE="http://librsync.sourcefrog.net" -GIT_HASH='ad8d065bfd' -SRC_URI="git://github.com/librsync/librsync.git#$GIT_HASH" -#CHECKSUM_SHA256="" + +# Unfortunately the maintainer of librsync did not publish a tag or released +# tarball for the 1.0.0 release (yet?). Use a static tarball with Git hash +# for now (which comparing to directly cloning allows for double-checking +# correctness of the source). +GIT_HASH='02f1cc19182845d37cfb6a893f54af220a294ce7' +# Attach the $GIT_HASH to the file name just in case upstream publishes an +# official release tarball. +SRC_FILENAME="librsync-${portVersion}-${GIT_HASH}.tar.gz" +SRC_URI="https://github.com/librsync/librsync/archive/${GIT_HASH}.tar.gz" +CHECKSUM_SHA256='25d046a8cbc6e075cc68925b5070c1f0e731e3a018446f6bda20ec9723a5631a' REVISION="1" +SOURCE_DIR="librsync-${GIT_HASH}" + ARCHITECTURES="x86_gcc2 x86 x86_64" SECONDARY_ARCHITECTURES="x86_gcc2 x86" LICENSE="GNU LGPL v2.1" @@ -53,17 +63,11 @@ BUILD_PREREQUIRES=" PROVIDES=" $portName = $portVersion cmd:rdiff$secondaryArchSuffix = $portVersion - lib:librsync$secondaryArchSuffix = 1.0.2 compat >= 1 + lib:librsync$secondaryArchSuffix = 2.0.0 compat >= 2 " -PATCH() -{ - sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g' configure.ac -} - BUILD() { - mkdir -p m4 autoreconf -fi runConfigure ./configure \ --enable-shared @@ -84,9 +88,11 @@ TEST() make check } +# Although the librsync soname is bumped to 2.0.0, it is purely an ABI change, +# so the compat level for the devel package remains at 1. PROVIDES_devel=" - ${portName}_devel = $portVersion - devel:librsync$secondaryArchSuffix = 1.0.2 compat >= 1 + ${portName}_devel = $portVersion compat >= 1 + devel:librsync$secondaryArchSuffix = 2.0.0 compat >= 1 " REQUIRES_devel=" librsync$secondaryArchSuffix == $portVersion base diff --git a/net-libs/librsync/patches/librsync-1.0.0.patchset b/net-libs/librsync/patches/librsync-1.0.0.patchset new file mode 100644 index 000000000..70a04f5bd --- /dev/null +++ b/net-libs/librsync/patches/librsync-1.0.0.patchset @@ -0,0 +1,28 @@ +From 6fdcdff86e215e06817462c0fe4d63a0ca64cf21 Mon Sep 17 00:00:00 2001 +From: Timothy Gu +Date: Tue, 23 Dec 2014 06:15:47 +0000 +Subject: blake2b: Separate declaration and code + +Fixes old compilers like gcc 2.95.3. + +Signed-off-by: Timothy Gu + +diff --git a/blake2b-ref.c b/blake2b-ref.c +index bcf81da..43cf4c1 100644 +--- a/blake2b-ref.c ++++ b/blake2b-ref.c +@@ -149,10 +149,10 @@ static inline int blake2b_init0( blake2b_state *S ) + /* init xors IV with input parameter block */ + int blake2b_init_param( blake2b_state *S, const blake2b_param *P ) + { +- blake2b_init0( S ); + uint8_t *p = ( uint8_t * )( P ); + size_t i; + ++ blake2b_init0( S ); + /* IV XOR ParamBlock */ + for( i = 0; i < 8; ++i ) + S->h[i] ^= load64( p + sizeof( S->h[i] ) * i ); +-- +1.8.3.4 +