summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris Nagaev <bnagaev@gmail.com>2017-04-30 23:28:26 (GMT)
committerBoris Nagaev <bnagaev@gmail.com>2017-05-18 23:59:05 (GMT)
commit6f2f49743025449aa03266d3c4778454324b60a2 (patch)
treec321ce1184aa0e2dde747125ff1705a47801b374
parenteba574d6068279b401ef788278ec769712d8b7b6 (diff)
downloadmxe-6f2f49743025449aa03266d3c4778454324b60a2.zip
mxe-6f2f49743025449aa03266d3c4778454324b60a2.tar.gz
mxe-6f2f49743025449aa03266d3c4778454324b60a2.tar.bz2
tor: update to 0.3.0.7
The patch "do not use mman-win32" needed updating compat.h as well. Instead I added sed command that undefines HAVE_SYS_MMAN_H in orconfig.h and removed the patch.
-rw-r--r--plugins/apps/tor-1-fixes.patch49
-rw-r--r--plugins/apps/tor.mk5
2 files changed, 3 insertions, 51 deletions
diff --git a/plugins/apps/tor-1-fixes.patch b/plugins/apps/tor-1-fixes.patch
deleted file mode 100644
index b305e8a..0000000
--- a/plugins/apps/tor-1-fixes.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-This file is part of MXE. See LICENSE.md for licensing information.
-
-Contains ad hoc patches for cross building.
-
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Boris Nagaev <bnagaev@gmail.com>
-Date: Sun, 21 Feb 2016 22:51:30 +0300
-Subject: [PATCH] do not use mman-win32
-
-tor can be compiled without mman-win32, because it has own
-implementation of mmap using Windows API. But if mman-win32
-is installed, tor tries to use it resulting in linking errors.
-(In MXE mman-win32 installs DLLs even for static targets!)
-
-diff --git a/src/common/compat.c b/src/common/compat.c
-index 1111111..2222222 100644
---- a/src/common/compat.c
-+++ b/src/common/compat.c
-@@ -116,7 +116,7 @@ SecureZeroMemory(PVOID ptr, SIZE_T cnt)
- #ifdef HAVE_SIGNAL_H
- #include <signal.h>
- #endif
--#ifdef HAVE_SYS_MMAN_H
-+#if 0
- #include <sys/mman.h>
- #endif
- #ifdef HAVE_SYS_SYSLIMITS_H
-@@ -204,7 +204,7 @@ tor_rename(const char *path_old, const char *path_new)
- sandbox_intern_string(path_new));
- }
-
--#if defined(HAVE_SYS_MMAN_H) || defined(RUNNING_DOXYGEN)
-+#if 0
- /** Try to create a memory mapping for <b>filename</b> and return it. On
- * failure, return NULL. Sets errno properly, using ERANGE to mean
- * "empty file". */
-diff --git a/src/common/compat.h b/src/common/compat.h
-index 1111111..2222222 100644
---- a/src/common/compat.h
-+++ b/src/common/compat.h
-@@ -311,7 +311,7 @@ typedef struct tor_mmap_t {
- size_t size; /**< Size of the file. */
-
- /* None of the fields below should be accessed from outside compat.c */
--#ifdef HAVE_SYS_MMAN_H
-+#if 0
- size_t mapping_size; /**< Size of the actual mapping. (This is this file
- * size, rounded up to the nearest page.) */
- #elif defined _WIN32
diff --git a/plugins/apps/tor.mk b/plugins/apps/tor.mk
index d660221..e789ba0 100644
--- a/plugins/apps/tor.mk
+++ b/plugins/apps/tor.mk
@@ -2,8 +2,8 @@
PKG := tor
$(PKG)_IGNORE :=
-$(PKG)_VERSION := 0.2.9.9
-$(PKG)_CHECKSUM := 33325d2b250fd047ba2ddc5d11c2190c4e2951f4b03ec48ebd8bf0666e990d43
+$(PKG)_VERSION := 0.3.0.7
+$(PKG)_CHECKSUM := 9640c4448ef3cad7237c68ed6984e705db8fb2b9d6bb74c8815d01bb06527d02
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz
$(PKG)_URL := https://torproject.org/dist/$($(PKG)_FILE)
@@ -22,6 +22,7 @@ define $(PKG)_BUILD
LIBS="`'$(TARGET)-pkg-config' --libs-only-l openssl`" \
./configure \
$(MXE_CONFIGURE_OPTS)
+ $(SED) 's@#define HAVE_SYS_MMAN_H 1@// Disabled in MXE #define HAVE_SYS_MMAN_H 1@' -i '$(1)/orconfig.h'
$(MAKE) -C '$(1)' -j '$(JOBS)' install $(MXE_DISABLE_DOCS)
endef