diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2016-10-27 15:25:00 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2016-10-27 15:25:00 +0000 |
commit | 24f6a62b592ce88df64469ca5370f338669e8b95 (patch) | |
tree | 5175628da9a64a5468159a51e48ffda867ac5f47 /main/protobuf | |
parent | 56b64ff614a9fe38cb860c944fd78709dc6d4f6f (diff) | |
download | aports-24f6a62b592ce88df64469ca5370f338669e8b95.tar.bz2 aports-24f6a62b592ce88df64469ca5370f338669e8b95.tar.xz |
main/protobuf: fix headers for musl
musl provides byteswap.h (and so does android apparently). so we assume
its there if we are on linux.
Diffstat (limited to 'main/protobuf')
-rw-r--r-- | main/protobuf/APKBUILD | 15 | ||||
-rw-r--r-- | main/protobuf/musl-fix.patch | 24 |
2 files changed, 34 insertions, 5 deletions
diff --git a/main/protobuf/APKBUILD b/main/protobuf/APKBUILD index 7507d8520a..642e5cfe0c 100644 --- a/main/protobuf/APKBUILD +++ b/main/protobuf/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=protobuf pkgver=3.1.0 -pkgrel=0 +pkgrel=1 pkgdesc="Library for extensible, efficient structure packing" url="https://github.com/google/protobuf" arch="all" @@ -11,7 +11,9 @@ depends="" depends_dev="zlib-dev" makedepends="$depends_dev autoconf automake libtool" subpackages="$pkgname-dev $pkgname-vim" -source="$pkgname-$pkgver.tar.gz::https://github.com/google/$pkgname/archive/v$pkgver.tar.gz" +source="$pkgname-$pkgver.tar.gz::https://github.com/google/$pkgname/archive/v$pkgver.tar.gz + musl-fix.patch + " builddir="$srcdir/$pkgname-$pkgver" prepare() { @@ -49,6 +51,9 @@ vim() { "$subpkgdir"/usr/share/vim/vimfiles/syntax/proto.vim } -md5sums="14a532a7538551d5def317bfca41dace protobuf-3.1.0.tar.gz" -sha256sums="0a0ae63cbffc274efb573bdde9a253e3f32e458c41261df51c5dbc5ad541e8f7 protobuf-3.1.0.tar.gz" -sha512sums="8d3289a16944c255bd1cceab696e515e52467f2bfe1cc10f6b32fabdf082d5acdc248ec9cadc572223a24d04d431f75921076153109cea2f90ee533f502ab47a protobuf-3.1.0.tar.gz" +md5sums="14a532a7538551d5def317bfca41dace protobuf-3.1.0.tar.gz +c5dc07b41fc2423352f37d03d1b32484 musl-fix.patch" +sha256sums="0a0ae63cbffc274efb573bdde9a253e3f32e458c41261df51c5dbc5ad541e8f7 protobuf-3.1.0.tar.gz +88b62bfdd8f81825b06e71a27aff887f79db7a7c12f36fe2c11d96ac4cdd8dbf musl-fix.patch" +sha512sums="8d3289a16944c255bd1cceab696e515e52467f2bfe1cc10f6b32fabdf082d5acdc248ec9cadc572223a24d04d431f75921076153109cea2f90ee533f502ab47a protobuf-3.1.0.tar.gz +66b430c81f34f49a86dfca50edbb517e4ad1a5ea922625b6266410c5feacfb621fe583c2998ac8994c6de45470652d2408c6c731d9746b74891a627564ca01f0 musl-fix.patch" diff --git a/main/protobuf/musl-fix.patch b/main/protobuf/musl-fix.patch new file mode 100644 index 0000000000..d7ab194a93 --- /dev/null +++ b/main/protobuf/musl-fix.patch @@ -0,0 +1,24 @@ +seems like both musl libc and android has byteswap.h + +diff --git a/src/google/protobuf/stubs/port.h b/src/google/protobuf/stubs/port.h +index 376be5f..21223f4 100644 +--- a/src/google/protobuf/stubs/port.h ++++ b/src/google/protobuf/stubs/port.h +@@ -87,7 +87,7 @@ + #include <stdlib.h> // NOLINT(build/include) + #elif defined(__APPLE__) + #include <libkern/OSByteOrder.h> +-#elif defined(__GLIBC__) || defined(__CYGWIN__) ++#elif defined(__linux__) || defined(__CYGWIN__) + #include <byteswap.h> // IWYU pragma: export + #endif + +@@ -299,7 +299,7 @@ inline void GOOGLE_UNALIGNED_STORE64(void *p, uint64 v) { + #define bswap_32(x) OSSwapInt32(x) + #define bswap_64(x) OSSwapInt64(x) + +-#elif !defined(__GLIBC__) && !defined(__CYGWIN__) ++#elif !defined(__linux__) && !defined(__CYGWIN__) + + static inline uint16 bswap_16(uint16 x) { + return static_cast<uint16>(((x & 0xFF) << 8) | ((x & 0xFF00) >> 8)); |