tor-alpha: update to 0.2.4.20
[packages.git] / net / tor-alpha / Makefile
index 05a6614..a796ea7 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2008-2012 OpenWrt.org
+# Copyright (C) 2008-2013 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,13 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=tor-alpha
-PKG_VERSION:=0.2.3.15-alpha
+PKG_VERSION:=0.2.4.20
 PKG_RELEASE:=1
 
 PKG_SOURCE:=tor-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.torproject.org/dist \
-       https://archive.torproject.org/tor-package-archive
-PKG_MD5SUM:=80c6019b6cfa5106282e46ae81c9b59c
+       https://archive.torproject.org/tor-package-archive \
+       http://tor.mirror.tn/dist
+PKG_MD5SUM:=a8cd8e3b3a3f6a7770f2c22d280f19b8
 
 PKG_BUILD_DEPENDS:=libminiupnpc libnatpmp
 PKG_BUILD_DIR:=$(BUILD_DIR)/tor-$(PKG_VERSION)
@@ -39,7 +40,7 @@ endef
 define Package/tor-alpha
 $(call Package/tor-alpha/Default)
   TITLE:=An anonymous Internet communication system
-  DEPENDS:=+libevent2 +libevent2-openssl +libpthread +librt
+  DEPENDS:=+libevent2 +libopenssl +libpthread +librt +SSP_SUPPORT:libssp
 endef
 
 define Package/tor-alpha/description
@@ -80,16 +81,23 @@ CONFIGURE_ARGS += \
        --with-libminiupnpc-dir="$(STAGING_DIR)/usr" \
        --enable-nat-pmp \
        --with-libnatpmp-dir="$(STAGING_DIR)/usr" \
-       --enable-bufferevents \
-       --disable-asciidoc
+       --disable-asciidoc \
+       --disable-threads
+
+ifneq ($(CONFIG_SSP_SUPPORT),y)
+       CONFIGURE_ARGS += \
+               --disable-gcc-hardening
+       MAKE_FLAGS += \
+               CFLAGS="$(TARGET_CFLAGS)"
+else
+       MAKE_FLAGS += \
+               CFLAGS="$(TARGET_CFLAGS) -fPIC"
+
+endif
 
 CONFIGURE_VARS += \
        CROSS_COMPILE="yes"
 
-# pass CFLAGS again to override -O2 set by configure
-MAKE_FLAGS += \
-       CFLAGS="$(TARGET_CFLAGS)"
-
 define Package/tor-alpha/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tor $(1)/usr/sbin/