Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

community/tclx: remove use of rresvport #849

Closed
wants to merge 13 commits into from
14 changes: 9 additions & 5 deletions community/tclx/APKBUILD
Expand Up @@ -11,7 +11,9 @@ depends="tcl"
depends_dev="tcl-dev"
makedepends="tcl-dev"
subpackages="$pkgname-doc $pkgname-dev"
source="http://downloads.sourceforge.net/project/tclx/TclX/$pkgver/$pkgname$pkgver.tar.bz2"
source="http://downloads.sourceforge.net/project/tclx/TclX/$pkgver/$pkgname$pkgver.tar.bz2
rresvport.patch
"

_major=${pkgver%.*}
builddir="$srcdir"/tclx${_major}
Expand Down Expand Up @@ -40,7 +42,9 @@ package() {
make -j1 DESTDIR="${pkgdir}" install || return 1
}

md5sums="ac983708f23cf645c07058148f48440c tclx8.4.1.tar.bz2"
sha256sums="a9b41f606ec6c1268b9c78512e6e1cb533bd9ae3e786e650d111fc16ffe758ec tclx8.4.1.tar.bz2"
sha512sums="faad58f5d8e0e1e759da639800f354b583fb01418c94f2274924aa07beb0ee9559beb87b3386ed5ae3694700a71dfe5b8ac54ead0ec75c6963507e9d3ead7060 tclx8.4.1.tar.bz2"

md5sums="ac983708f23cf645c07058148f48440c tclx8.4.1.tar.bz2
416342025491a0a58e6d4e04e4d0eb53 rresvport.patch"
sha256sums="a9b41f606ec6c1268b9c78512e6e1cb533bd9ae3e786e650d111fc16ffe758ec tclx8.4.1.tar.bz2
9a9a099da34c9455d9a728af63561a68ea74bf40f9ff86ce07a879adbfb3738a rresvport.patch"
sha512sums="faad58f5d8e0e1e759da639800f354b583fb01418c94f2274924aa07beb0ee9559beb87b3386ed5ae3694700a71dfe5b8ac54ead0ec75c6963507e9d3ead7060 tclx8.4.1.tar.bz2
ab0c63de8c9fd6c6fca7a0901c876e013cfc76b5032f7b6dce7cad9d747d7baffd3b4b7ae6d24a34bc1c1c78dbd2bd8169eac27f9d7ed468675963e847f6917c rresvport.patch"
20 changes: 20 additions & 0 deletions community/tclx/rresvport.patch
@@ -0,0 +1,20 @@
Fixes missing rresvport clib function from BSD.

diff -Naur tclx8.4.orig/unix/tclXunixSock.c tclx8.4/unix/tclXunixSock.c
--- tclx8.4.orig/unix/tclXunixSock.c 2017-02-09 13:26:40.000000000 -0600
+++ tclx8.4/unix/tclXunixSock.c 2017-02-09 13:27:14.000000000 -0600
@@ -198,12 +198,14 @@
/*
* Allocate a reserved port if requested.
*/
+#ifdef HAVE_RRESVPORT
if (getReserved) {
int port;
if (rresvport (&port) < 0)
goto unixError;
local.sin_port = port;
}
+#endif

/*
* Open a socket and bind an address and port to it.