1################################################################################ 2# 3# tor 4# 5################################################################################ 6 7TOR_VERSION = 0.4.6.8 8TOR_SITE = https://dist.torproject.org 9TOR_LICENSE = BSD-3-Clause 10TOR_LICENSE_FILES = LICENSE 11TOR_CPE_ID_VENDOR = torproject 12TOR_SELINUX_MODULES = tor 13TOR_DEPENDENCIES = libevent openssl zlib 14TOR_AUTORECONF = YES 15 16TOR_CONF_OPTS = \ 17 --disable-gcc-hardening \ 18 --disable-unittests \ 19 --with-libevent-dir=$(STAGING_DIR)/usr \ 20 --with-openssl-dir=$(STAGING_DIR)/usr \ 21 --with-zlib-dir=$(STAGING_DIR)/usr 22 23ifeq ($(BR2_STATIC_LIBS),y) 24TOR_CONF_OPTS += \ 25 --enable-static-libevent \ 26 --enable-static-openssl \ 27 --enable-static-tor \ 28 --enable-static-zlib 29endif 30 31ifeq ($(BR2_PACKAGE_LIBCAP),y) 32TOR_DEPENDENCIES += libcap 33endif 34 35ifeq ($(BR2_PACKAGE_SYSTEMD),y) 36TOR_CONF_OPTS += --enable-systemd 37TOR_DEPENDENCIES += host-pkgconf systemd 38else 39TOR_CONF_OPTS += --disable-systemd 40endif 41 42ifeq ($(BR2_PACKAGE_XZ),y) 43TOR_CONF_OPTS += --enable-lzma 44TOR_DEPENDENCIES += host-pkgconf xz 45else 46TOR_CONF_OPTS += --disable-lzma 47endif 48 49ifeq ($(BR2_PACKAGE_ZSTD),y) 50TOR_CONF_OPTS += --enable-zstd 51TOR_DEPENDENCIES += host-pkgconf zstd 52else 53TOR_CONF_OPTS += --disable-zstd 54endif 55 56ifeq ($(BR2_arm)$(BR2_armeb)$(BR2_i386)$(BR2_x86_64)$(BR2_PACKAGE_LIBSECCOMP),yy) 57TOR_CONF_OPTS += --enable-seccomp 58TOR_DEPENDENCIES += libseccomp 59else 60TOR_CONF_OPTS += --disable-seccomp 61endif 62 63# uses gnu extensions 64TOR_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99' 65 66ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) 67TOR_CONF_ENV += LIBS=-latomic 68endif 69 70define TOR_INSTALL_CONF 71 $(INSTALL) -D -m 644 $(@D)/src/config/torrc.minimal \ 72 $(TARGET_DIR)/etc/tor/torrc 73endef 74 75TOR_POST_INSTALL_TARGET_HOOKS += TOR_INSTALL_CONF 76 77$(eval $(autotools-package)) 78