Do not clobber bindresvport, and install headers to includedir
authorYaakov Selkowitz <yselkowi@redhat.com>
Wed, 7 Feb 2018 18:24:27 +0000 (12:24 -0600)
committerYaakov Selkowitz <yselkowi@redhat.com>
Wed, 7 Feb 2018 18:24:27 +0000 (12:24 -0600)
Wrt bindresvport: https://cygwin.com/ml/cygwin/2018-02/msg00009.html

$includedir/tirpc was necessary only to avoid conflicting with glibc
(and, for a little while, newlib) deprecated headers.

0.2.4-cygwin-bindresvport.patch [deleted file]
1.0.2-cygwin-bindresvport.patch [new file with mode: 0644]
1.0.2-includedir.patch [new file with mode: 0644]
libtirpc.cygport

diff --git a/0.2.4-cygwin-bindresvport.patch b/0.2.4-cygwin-bindresvport.patch
deleted file mode 100644 (file)
index ab921cf..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- origsrc/libtirpc-0.2.4/src/bindresvport.c  2013-12-09 14:59:51.000000000 -0600
-+++ src/libtirpc-0.2.4/src/bindresvport.c      2014-06-09 17:08:43.121134900 -0500
-@@ -61,7 +61,7 @@ bindresvport(sd, sin)
-         return bindresvport_sa(sd, (struct sockaddr *)sin);
- }
--#ifdef __linux__
-+#if defined(__linux__) || defined(__CYGWIN__)
- #define STARTPORT 600
- #define LOWPORT 512
diff --git a/1.0.2-cygwin-bindresvport.patch b/1.0.2-cygwin-bindresvport.patch
new file mode 100644 (file)
index 0000000..83bf338
--- /dev/null
@@ -0,0 +1,38 @@
+--- origsrc/libtirpc-1.0.2/configure.ac        2018-02-06 21:45:15.467634500 -0600
++++ src/libtirpc-1.0.2/configure.ac    2018-02-07 10:27:54.897376400 -0600
+@@ -92,7 +92,7 @@ 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 features.h gssapi/gssapi_ext.h])
+ AC_CHECK_LIB([pthread], [pthread_create])
+-AC_CHECK_FUNCS([getrpcbyname getrpcbynumber setrpcent endrpcent getrpcent])
++AC_CHECK_FUNCS([bindresvport getrpcbyname getrpcbynumber setrpcent endrpcent getrpcent])
+ AC_CONFIG_FILES([Makefile src/Makefile man/Makefile doc/Makefile])
+ AC_OUTPUT(libtirpc.pc)
+--- origsrc/libtirpc-1.0.2/src/bindresvport.c  2018-02-06 21:45:16.038017400 -0600
++++ src/libtirpc-1.0.2/src/bindresvport.c      2018-02-07 10:29:18.679180800 -0600
+@@ -32,6 +32,10 @@
+  *
+  * Portions Copyright(C) 1996, Jason Downs.  All rights reserved.
+  */
++
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#endif
+ #include <sys/types.h>
+ #include <sys/socket.h>
+@@ -49,6 +53,8 @@
+ #include <string.h>
+ #include <reentrant.h>
++#if !HAVE_BINDRESVPORT
++
+ extern pthread_mutex_t port_lock;
+ /*
+@@ -246,3 +252,4 @@ bindresvport_sa(sd, sa)
+       return (error);
+ }
+ #endif
++#endif /* !HAVE_BINDRESVPORT */
diff --git a/1.0.2-includedir.patch b/1.0.2-includedir.patch
new file mode 100644 (file)
index 0000000..ebbeb89
--- /dev/null
@@ -0,0 +1,115 @@
+--- origsrc/libtirpc-1.0.2/Makefile.am 2017-07-05 10:02:23.000000000 -0500
++++ src/libtirpc-1.0.2/Makefile.am     2018-02-06 21:58:49.569565500 -0600
+@@ -1,50 +1,6 @@
+-SUBDIRS = src man doc
++SUBDIRS = tirpc src man doc
+ ACLOCAL_AMFLAGS = -I m4
+-noinst_HEADERS               = tirpc/reentrant.h \
+-                       tirpc/getpeereid.h \
+-                       tirpc/libc_private.h \
+-                       tirpc/un-namespace.h
+-
+-nobase_include_HEADERS = tirpc/netconfig.h \
+-                       tirpc/rpcsvc/crypt.x \
+-                       tirpc/rpcsvc/crypt.h \
+-                       tirpc/rpc/xdr.h \
+-                       tirpc/rpc/types.h \
+-                       tirpc/rpc/svc_soc.h \
+-                       tirpc/rpc/svc.h \
+-                       tirpc/rpc/svc_dg.h \
+-                       tirpc/rpc/svc_auth.h \
+-                       tirpc/rpc/svc_mt.h \
+-                       tirpc/rpc/rpc_msg.h \
+-                       tirpc/rpc/rpc.h \
+-                       tirpc/rpc/rpcent.h \
+-                       tirpc/rpc/rpc_com.h \
+-                       tirpc/rpc/rpcb_prot.x \
+-                       tirpc/rpc/rpcb_prot.h \
+-                       tirpc/rpc/rpcb_clnt.h \
+-                       tirpc/rpc/raw.h \
+-                       tirpc/rpc/pmap_rmt.h \
+-                       tirpc/rpc/pmap_prot.h \
+-                       tirpc/rpc/pmap_clnt.h \
+-                       tirpc/rpc/nettype.h \
+-                       tirpc/rpc/key_prot.h \
+-                       tirpc/rpc/des.h \
+-                       tirpc/rpc/des_crypt.h \
+-                       tirpc/rpc/clnt_stat.h \
+-                       tirpc/rpc/clnt_soc.h \
+-                       tirpc/rpc/clnt.h \
+-                       tirpc/rpc/auth_unix.h \
+-                       tirpc/rpc/auth_des.h \
+-                       tirpc/rpc/auth.h
+-
+-if GSS
+-nobase_include_HEADERS += \
+-                       tirpc/rpc/rpcsec_gss.h \
+-                       tirpc/rpc/auth_gss.h \
+-                       tirpc/rpc/svc_auth_gss.h
+-endif
+-
+ pkgconfigdir=$(libdir)/pkgconfig
+ pkgconfig_DATA = libtirpc.pc
+--- origsrc/libtirpc-1.0.2/configure.ac        2018-02-06 21:45:15.467634500 -0600
++++ src/libtirpc-1.0.2/configure.ac    2018-02-06 21:59:51.687928500 -0600
+@@ -96,3 +96,3 @@ AC_CHECK_HEADERS([arpa/inet.h fcntl.h li
+-AC_CONFIG_FILES([Makefile src/Makefile man/Makefile doc/Makefile])
++AC_CONFIG_FILES([Makefile tirpc/Makefile src/Makefile man/Makefile doc/Makefile])
+ AC_OUTPUT(libtirpc.pc)
+--- origsrc/libtirpc-1.0.2/libtirpc.pc.in      2017-07-05 10:02:23.000000000 -0500
++++ src/libtirpc-1.0.2/libtirpc.pc.in  2018-02-06 21:53:20.587043700 -0600
+@@ -9,4 +9,4 @@ Requires:
+ Version: @PACKAGE_VERSION@
+ Libs: -L@libdir@ -ltirpc
+ Libs.private: -lpthread
+-Cflags: -I@includedir@/tirpc
++Cflags: -I@includedir@
+--- origsrc/libtirpc-1.0.2/tirpc/Makefile.am   1969-12-31 18:00:00.000000000 -0600
++++ src/libtirpc-1.0.2/tirpc/Makefile.am       2018-02-06 21:59:10.087938200 -0600
+@@ -0,0 +1,43 @@
++noinst_HEADERS               = reentrant.h \
++                       getpeereid.h \
++                       libc_private.h \
++                       un-namespace.h
++
++nobase_include_HEADERS = netconfig.h \
++                       rpcsvc/crypt.x \
++                       rpcsvc/crypt.h \
++                       rpc/xdr.h \
++                       rpc/types.h \
++                       rpc/svc_soc.h \
++                       rpc/svc.h \
++                       rpc/svc_dg.h \
++                       rpc/svc_auth.h \
++                       rpc/svc_mt.h \
++                       rpc/rpc_msg.h \
++                       rpc/rpc.h \
++                       rpc/rpcent.h \
++                       rpc/rpc_com.h \
++                       rpc/rpcb_prot.x \
++                       rpc/rpcb_prot.h \
++                       rpc/rpcb_clnt.h \
++                       rpc/raw.h \
++                       rpc/pmap_rmt.h \
++                       rpc/pmap_prot.h \
++                       rpc/pmap_clnt.h \
++                       rpc/nettype.h \
++                       rpc/key_prot.h \
++                       rpc/des.h \
++                       rpc/des_crypt.h \
++                       rpc/clnt_stat.h \
++                       rpc/clnt_soc.h \
++                       rpc/clnt.h \
++                       rpc/auth_unix.h \
++                       rpc/auth_des.h \
++                       rpc/auth.h
++
++if GSS
++nobase_include_HEADERS += \
++                       rpc/rpcsec_gss.h \
++                       rpc/auth_gss.h \
++                       rpc/svc_auth_gss.h
++endif
index 2e67aa71913be25a0f61dbb11efb31ed7c74d6be..04a05373e9ad306c6d5aa38af53fe624a7cfdf53 100644 (file)
@@ -1,6 +1,6 @@
 NAME="libtirpc"
 VERSION=1.0.2
-RELEASE=1
+RELEASE=2
 CATEGORY="Libs"
 SUMMARY="A port of Sun's Transport-Independent RPC library"
 DESCRIPTION="TI-RPC provides a library that implements Transport Independent
@@ -13,13 +13,14 @@ PATCH_URI="
        0.3.2-no-undefined.patch
        0.2.4-cygwin-rpc-types.patch
        0.2.4-cygwin-pthread.patch
-       0.2.4-cygwin-bindresvport.patch
+       1.0.2-cygwin-bindresvport.patch
        0.2.4-cygwin-ipv6.patch
        0.2.4-cygwin-poll.patch
        0.3.2-cygwin-rpcent.patch
+       1.0.2-includedir.patch
 "
 
-PKG_NAMES="${NAME}3 ${NAME}-common ${NAME}-devel"
+PKG_NAMES="${NAME}3 ${NAME}-common ${NAME}-devel ${NAME}-doc"
 libtirpc3_REQUIRES="libtirpc-common"
 libtirpc3_CONTENTS="usr/bin/cygtirpc-3.dll"
 libtirpc_common_CONTENTS="
@@ -28,9 +29,12 @@ libtirpc_common_CONTENTS="
        usr/share/man/man5/
 "
 libtirpc_devel_CONTENTS="
-       usr/include/tirpc/
+       usr/include/
        usr/lib/libtirpc.dll.a
        usr/lib/pkgconfig/libtirpc.pc
+"
+libtirpc_doc_CATEGORY="Doc"
+libtirpc_doc_CONTENTS="
        usr/share/man/man3/
 "
 
@@ -38,6 +42,10 @@ CYGCONF_ARGS="--enable-gssapi"
 
 src_install () {
        cd ${B}
-       cyginstall
+       cyginstall BIND_MANS=
        make_etc_defaults /etc/netconfig
+
+#      dodir /usr/include/tirpc
+#      ln -s ../rpc /usr/include/tirpc/rpc
+#      ln -s ../rpcsvc /usr/include/tirpc/rpcsvc
 }
This page took 0.032243 seconds and 5 git commands to generate.