zeromq: Updated to version 4.2.1 (#2160)

This commit is contained in:
qme
2017-02-10 05:22:37 +01:00
committed by Алексей
parent 113340f2a4
commit bb8ee998b8
4 changed files with 4 additions and 126 deletions

View File

@@ -3,7 +3,7 @@
_realname=zeromq
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=4.1.4
pkgver=4.2.1
pkgrel=1
pkgdesc="Fast messaging system built on sockets, C and C++ bindings. aka 0MQ, ZMQ (mingw-w64)"
arch=('any')
@@ -11,22 +11,9 @@ url="http://www.zeromq.org"
license=("LGPL")
depends=("${MINGW_PACKAGE_PREFIX}-libsodium")
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc")
options=('staticlibs' '!strip' '!buildflags')
source=("http://download.zeromq.org/${_realname}-${pkgver}.tar.gz"
winxp-compatibility.patch
includes-consistent.patch
mingw-w64-cmake.patch)
sha256sums=('e99f44fde25c2e4cb84ce440f87ca7d3fe3271c2b8cfbc67d55e4de25e6fe378'
'1c8f0ff16474dfdcf721769e23d91789d9faceac59fd12eb252a7c2d7bf00200'
'4cda5346087bd9f9d2f15249741e7b4593e2b2617177a1ba5a623f3e39485127'
'dd7360847b9e15d44ba0d6b96ee3bafaa96d0823c8c3240edbff6ab869481621')
prepare() {
cd ${_realname}-${pkgver}
patch -p1 -i ${srcdir}/winxp-compatibility.patch
patch -p1 -i ${srcdir}/includes-consistent.patch
patch -p1 -i ${srcdir}/mingw-w64-cmake.patch
}
options=('staticlibs' 'strip' '!buildflags')
source=("https://github.com/zeromq/libzmq/releases/download/v${pkgver}/${_realname}-${pkgver}.tar.gz")
sha256sums=('27d1e82a099228ee85a7ddb2260f40830212402c605a4a10b5e5498a7e0e9d03')
build() {
[[ -d "${srcdir}"/build-${CARCH} ]] && rm -rf "${srcdir}"/build-${CARCH}

View File

@@ -1,70 +0,0 @@
From 25ce52e4492d286a2d99df7ba401fe7fb344d9c5 Mon Sep 17 00:00:00 2001
From: Pieter Hintjens <ph@imatix.com>
Date: Fri, 12 Feb 2016 11:01:52 +0100
Subject: [PATCH] Problem: tcp_address.cpp has messy include usage
It's all over the place.
Solution: remove duplicates and try to move main includes to start
of source. Also, include net/if.h always, so that the code will
compile if ZMQ_HAVE_IFADDRS isn't defined.
---
src/tcp_address.cpp | 17 ++++-------------
1 file changed, 4 insertions(+), 13 deletions(-)
diff --git a/src/tcp_address.cpp b/src/tcp_address.cpp
index 73770b9..e896b37 100644
--- a/src/tcp_address.cpp
+++ b/src/tcp_address.cpp
@@ -32,26 +32,23 @@
#include <sstream>
#include "tcp_address.hpp"
-#include "platform.hpp"
#include "stdint.hpp"
#include "err.hpp"
#include "ip.hpp"
-#ifdef ZMQ_HAVE_WINDOWS
-#include "windows.hpp"
-#else
+#ifndef ZMQ_HAVE_WINDOWS
#include <sys/types.h>
#include <arpa/inet.h>
#include <netinet/tcp.h>
+#include <net/if.h>
#include <netdb.h>
+#include <ctype.h>
+#include <unistd.h>
+#include <stdlib.h>
#endif
#ifdef ZMQ_HAVE_SOLARIS
-
#include <sys/sockio.h>
-#include <net/if.h>
-#include <unistd.h>
-#include <stdlib.h>
// On Solaris platform, network interface name can be queried by ioctl.
int zmq::tcp_address_t::resolve_nic_name (const char *nic_, bool ipv6_, bool is_src_)
@@ -116,11 +112,7 @@ int zmq::tcp_address_t::resolve_nic_name (const char *nic_, bool ipv6_, bool is_
}
#elif defined ZMQ_HAVE_AIX || defined ZMQ_HAVE_HPUX || defined ZMQ_HAVE_ANDROID
-
-#include <sys/types.h>
-#include <unistd.h>
#include <sys/ioctl.h>
-#include <net/if.h>
int zmq::tcp_address_t::resolve_nic_name (const char *nic_, bool ipv6_, bool is_src_)
{
@@ -182,7 +174,6 @@ int zmq::tcp_address_t::resolve_nic_name (const char *nic_, bool ipv6_, bool is_
&& defined ZMQ_HAVE_IFADDRS)
#include <ifaddrs.h>
-#include <net/if.h>
// On these platforms, network interface name can be queried
// using getifaddrs function.

View File

@@ -1,11 +0,0 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,7 +9,7 @@
option(ZMQ_BUILD_FRAMEWORK "Build as OS X framework" ON)
endif()
-if(WIN32)
+if(MSVC)
option(WITH_TWEETNACL "Build with tweetnacl" OFF)
else()
option(WITH_TWEETNACL "Build with tweetnacl" ON)

View File

@@ -1,28 +0,0 @@
diff --git a/src/tcp_address.cpp b/src/tcp_address.cpp
index e987eb8..53e93c6 100644
--- a/src/tcp_address.cpp
+++ b/src/tcp_address.cpp
@@ -450,13 +450,23 @@ int zmq::tcp_address_t::resolve (const char *name_, bool local_, bool ipv6_, boo
std::string if_str = addr_str.substr(pos + 1);
addr_str = addr_str.substr(0, pos);
if (isalpha (if_str.at (0)))
+#if _WIN32_WINNT >= 0x0600
zone_id = if_nametoindex(if_str.c_str());
+#else
+ // The function 'if_nametoindex' is not supported on Windows XP.
+ // If we are targeting XP using a vxxx_xp toolset then fail.
+ // This is brutal as this code could be run on later windows clients
+ // meaning the IPv6 zone_id cannot have an interface name.
+ // This could be fixed with a runtime check.
+ zone_id = 0;
+#endif
else
zone_id = (uint32_t) atoi (if_str.c_str ());
if (zone_id == 0) {
errno = EINVAL;
return -1;
}
+
}
// Allow 0 specifically, to detect invalid port error in atoi if not