diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2014-04-24 09:34:28 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-04-24 09:36:08 +0200 |
commit | 675ba816c59aa240f7c8e1f34a209ce11b82e806 (patch) | |
tree | c0480ff993b26f4e95af6eaa9087e039da798deb /main | |
parent | ada387392dd892bcc8ff3f3c1ed912ef377cf8dc (diff) | |
download | aports-675ba816c59aa240f7c8e1f34a209ce11b82e806.tar.bz2 aports-675ba816c59aa240f7c8e1f34a209ce11b82e806.tar.xz |
main/libtirpc: make sure we provide getrpcbynumber
rework the patches a bit
Diffstat (limited to 'main')
-rw-r--r-- | main/libtirpc/0001-Provide-getrpcbynumber-and-getrpcbyname-if-those-are.patch | 85 | ||||
-rw-r--r-- | main/libtirpc/0002-Misc-header-fixes.patch | 67 | ||||
-rw-r--r-- | main/libtirpc/APKBUILD | 29 | ||||
-rw-r--r-- | main/libtirpc/musl-compliance.patch | 41 |
4 files changed, 167 insertions, 55 deletions
diff --git a/main/libtirpc/0001-Provide-getrpcbynumber-and-getrpcbyname-if-those-are.patch b/main/libtirpc/0001-Provide-getrpcbynumber-and-getrpcbyname-if-those-are.patch new file mode 100644 index 0000000000..3708638a43 --- /dev/null +++ b/main/libtirpc/0001-Provide-getrpcbynumber-and-getrpcbyname-if-those-are.patch @@ -0,0 +1,85 @@ +From d3b5ffed6d7d49cc93b2343afcf0e4502a3e54ce Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Thu, 24 Apr 2014 09:19:45 +0200 +Subject: [PATCH 1/2] Provide getrpcbynumber and getrpcbyname if those are + missing + +We enable the config.h again and check fi getrpcbynumber and +getrpcbyname exists on the building patform. If it does not exist, then +provide those functions. + +This is needed for musl libc. +--- + configure.ac | 6 ++++-- + src/getrpcent.c | 10 ++++++++-- + 2 files changed, 12 insertions(+), 4 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 10d17ea..0180801 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -24,14 +24,16 @@ if test "x$enable_ipv6" != xno; then + fi + + AC_PROG_CC +-m4_pattern_allow(AM_CONFIG_HEADERS(config.h)) ++AC_CONFIG_HEADERS([config.h]) + AC_PROG_LIBTOOL + AC_HEADER_DIRENT + AC_PREFIX_DEFAULT(/usr) + AC_CHECK_HEADERS([arpa/inet.h fcntl.h libintl.h limits.h locale.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h unistd.h]) + AC_CHECK_LIB([pthread], [pthread_create]) + AC_CHECK_LIB([nsl], [yp_get_default_domain]) +- ++AC_CHECK_FUNCS([getrpcbyname getrpcbynumber]) + + AC_CONFIG_FILES([Makefile src/Makefile man/Makefile doc/Makefile]) + AC_OUTPUT(libtirpc.pc) ++ ++ +diff --git a/src/getrpcent.c b/src/getrpcent.c +index 1b54b6d..6da006a 100644 +--- a/src/getrpcent.c ++++ b/src/getrpcent.c +@@ -50,6 +50,10 @@ + #include <libc_private.h> + #endif + ++#if HAVE_CONFIG_H ++#include "config.h" ++#endif ++ + /* + * Internet version. + */ +@@ -89,7 +93,7 @@ _rpcdata() + return (d); + } + +-#ifdef GQ ++#if !HAVE_GETRPCBYNYMBER + struct rpcent * + getrpcbynumber(number) + int number; +@@ -135,7 +139,9 @@ no_yp: + endrpcent(); + return (p); + } ++#endif /* !HAVE_GETRPCBYNUMBER */ + ++#if !HAVE_GETRPCBYNAME + struct rpcent * + getrpcbyname(name) + const char *name; +@@ -158,7 +164,7 @@ done: + endrpcent(); + return (rpc); + } +-#endif /* GQ */ ++#endif /* !HAVE_GETRPCBYNAME */ + + void + setrpcent(f) +-- +1.9.2 + diff --git a/main/libtirpc/0002-Misc-header-fixes.patch b/main/libtirpc/0002-Misc-header-fixes.patch new file mode 100644 index 0000000000..08c277b5d3 --- /dev/null +++ b/main/libtirpc/0002-Misc-header-fixes.patch @@ -0,0 +1,67 @@ +From ed6dc31ed1092baf42f99278ef9c5c297805c3d0 Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Thu, 24 Apr 2014 08:58:20 +0200 +Subject: [PATCH 2/2] Misc header fixes + +src/bindresvport.c: IPPORT_RESERVED needs netdb.h + +Misc fixes for building on musl libc +--- + src/bindresvport.c | 1 + + tirpc/netconfig.h | 1 + + tirpc/rpc/rpcent.h | 2 +- + tirpc/rpc/types.h | 1 + + 4 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/bindresvport.c b/src/bindresvport.c +index d6d9c14..5a7a1a9 100644 +--- a/src/bindresvport.c ++++ b/src/bindresvport.c +@@ -37,6 +37,7 @@ + #include <sys/types.h> + #include <sys/socket.h> + ++#include <netdb.h> + #include <netinet/in.h> + + #include <errno.h> +diff --git a/tirpc/netconfig.h b/tirpc/netconfig.h +index 7d6c2bc..2922e6f 100644 +--- a/tirpc/netconfig.h ++++ b/tirpc/netconfig.h +@@ -2,6 +2,7 @@ + #define _NETCONFIG_H_ + + #include <features.h> ++#include <sys/cdefs.h> + + #define NETCONFIG "/etc/netconfig" + #define NETPATH "NETPATH" +diff --git a/tirpc/rpc/rpcent.h b/tirpc/rpc/rpcent.h +index c865e51..a36cf91 100644 +--- a/tirpc/rpc/rpcent.h ++++ b/tirpc/rpc/rpcent.h +@@ -47,7 +47,7 @@ + __BEGIN_DECLS + + /* These are defined in /usr/include/rpc/netdb.h */ +-#if 0 ++#if !defined(__GLIBC__) + struct rpcent { + char *r_name; /* name of server for this rpc program */ + char **r_aliases; /* alias list */ +diff --git a/tirpc/rpc/types.h b/tirpc/rpc/types.h +index 52c30a2..d967271 100644 +--- a/tirpc/rpc/types.h ++++ b/tirpc/rpc/types.h +@@ -39,6 +39,7 @@ + #define _TIRPC_TYPES_H + + #include <sys/types.h> ++#include <sys/cdefs.h> + + typedef int32_t bool_t; + typedef int32_t enum_t; +-- +1.9.2 + diff --git a/main/libtirpc/APKBUILD b/main/libtirpc/APKBUILD index 5a6e42f036..4406f7eb29 100644 --- a/main/libtirpc/APKBUILD +++ b/main/libtirpc/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=libtirpc pkgver=0.2.4 -pkgrel=2 +pkgrel=3 pkgdesc="Transport Independent RPC library (SunRPC replacement)" url="http://libtirpc.sourceforge.net/" arch="all" @@ -9,11 +9,12 @@ license="GPL2" depends= depends_dev="krb5-dev" makedepends="$depends_dev autoconf automake libtool" -subpackages="$pkgname-dev $pkgname-doc" +subpackages="$pkgname-dev $pkgname-doc $pkgname-dbg" source="http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.bz2 - nis.h + 0001-Provide-getrpcbynumber-and-getrpcbyname-if-those-are.patch + 0002-Misc-header-fixes.patch libtirpc-no-des.patch - musl-compliance.patch + nis.h " prepare() { @@ -23,9 +24,6 @@ prepare() { mkdir src/rpcsvc cp "$srcdir"/nis.h src/rpcsvc/ - # -DGQ makes tirpc implement getrpcbynumber - [ "$CLIBC" == musl ] && export CFLAGS="$CFLAGS -DGQ" - for i in $source; do case $i in *.patch) @@ -35,7 +33,7 @@ prepare() { esac done - libtoolize --force && aclocal -I m4 && autoconf \ + libtoolize --force && aclocal -I m4 && autoheader && autoconf \ && automake --add-missing || return 1 } @@ -58,14 +56,17 @@ package() { } md5sums="847995e8d002cbf1387bda05947be086 libtirpc-0.2.4.tar.bz2 -082dff1bc78bdcbac6d305c1534fe3c0 nis.h +f21a33e797dfe14c9efade5c8fd5a4b0 0001-Provide-getrpcbynumber-and-getrpcbyname-if-those-are.patch +62aada9c8fa7e197000846815a02541c 0002-Misc-header-fixes.patch 80e8f54aab0f5bed37e58ad79fe4ff2b libtirpc-no-des.patch -03346638e924d4c811a55d0cbeee7320 musl-compliance.patch" +082dff1bc78bdcbac6d305c1534fe3c0 nis.h" sha256sums="45c3e21dfc23a5ba501f9dfc6671678316fdfdb8355a1ec404ae2aa2f81943a1 libtirpc-0.2.4.tar.bz2 -7149d53da167168cbad9e75cbab302768f659e59e208763b1bf5df2a6ff3bfdb nis.h +9ff042aa7ba870d2d581f2815eee9cae7620df6b3a725da4c4d555325a08a05d 0001-Provide-getrpcbynumber-and-getrpcbyname-if-those-are.patch +1565e46325a5321638511d8637686ac02f039c4a99e1c0bcc2ec40f213ff73e3 0002-Misc-header-fixes.patch 5b7c8f6d19f17541902dfd1b1132f2b07e4cc0987152d4e8007243e776d4d47f libtirpc-no-des.patch -9f7b24fe9297af917826c1d3fba4909d76f2ddb0a66db417ae8026a39715cc49 musl-compliance.patch" +7149d53da167168cbad9e75cbab302768f659e59e208763b1bf5df2a6ff3bfdb nis.h" sha512sums="8b7fec13d34ad0ddfa3832f4a4955607d94f6a691fedcc81a98554345f6c6e64d5f289490a10a80600cebf5b53cfad99c0d78007b88f8f2fbc60cbb8680fc87f libtirpc-0.2.4.tar.bz2 -15edac1e30cc1aa65ca495bae14c6c7455d65ca539b7e5c865c3fbd5a51c76966b37dd34e9a6483aadcaea3602aefb0b48cdb46f877dae1c65dfa6840dfd8c54 nis.h +e60fc98c9efaa4675d08e85b669d8dea07b2c7e7b268344e06e172f5751baf6fae7f354149d738f4bbe139ff5b964f1d80d0bfa91a1c9ca94f9ab9489618166d 0001-Provide-getrpcbynumber-and-getrpcbyname-if-those-are.patch +0e40b26c7b71e14ca5481975892795346043f8193a4af233268b3af7b74acac9cff483f9cb6d4bb1b581741ec87e8d6abd536f3d0942ba0f14257c31d22349c9 0002-Misc-header-fixes.patch 9a984a7741deb943f92cd8a9f23d1a0e09a01e91aa88268456ccbb7998b24f50ad431e26400def3a8ba9d6cd345e5abccf5acf9c59708ce8f0653275c2ea5d61 libtirpc-no-des.patch -5df2a92838a6c15ff26dc0a75b0599c42f95b6fbda7dd407b975118e79519e6bdbc77307aa6c4bda33c5a2e4cacabf996900220f140b1e121ece198c33d21b13 musl-compliance.patch" +15edac1e30cc1aa65ca495bae14c6c7455d65ca539b7e5c865c3fbd5a51c76966b37dd34e9a6483aadcaea3602aefb0b48cdb46f877dae1c65dfa6840dfd8c54 nis.h" diff --git a/main/libtirpc/musl-compliance.patch b/main/libtirpc/musl-compliance.patch deleted file mode 100644 index a6d69accfd..0000000000 --- a/main/libtirpc/musl-compliance.patch +++ /dev/null @@ -1,41 +0,0 @@ ---- libtirpc-0.2.4.orig/src/bindresvport.c -+++ libtirpc-0.2.4/src/bindresvport.c -@@ -37,6 +37,7 @@ - #include <sys/types.h> - #include <sys/socket.h> - -+#include <netdb.h> - #include <netinet/in.h> - - #include <errno.h> ---- libtirpc-0.2.4.orig/tirpc/rpc/rpcent.h -+++ libtirpc-0.2.4/tirpc/rpc/rpcent.h -@@ -47,7 +47,7 @@ - __BEGIN_DECLS - - /* These are defined in /usr/include/rpc/netdb.h */ --#if 0 -+#if !defined(__GLIBC__) - struct rpcent { - char *r_name; /* name of server for this rpc program */ - char **r_aliases; /* alias list */ ---- libtirpc-0.2.4.orig/tirpc/rpc/types.h -+++ libtirpc-0.2.4/tirpc/rpc/types.h -@@ -39,6 +39,7 @@ - #define _TIRPC_TYPES_H - - #include <sys/types.h> -+#include <sys/cdefs.h> - - typedef int32_t bool_t; - typedef int32_t enum_t; ---- libtirpc-0.2.4.orig/tirpc/netconfig.h -+++ libtirpc-0.2.4/tirpc/netconfig.h -@@ -2,6 +2,7 @@ - #define _NETCONFIG_H_ - - #include <features.h> -+#include <sys/cdefs.h> - - #define NETCONFIG "/etc/netconfig" - #define NETPATH "NETPATH" |