ettercap: remove libressl patch, CMAKE_BUILD_TYPE=None

This commit is contained in:
Đoàn Trần Công Danh 2021-03-17 07:35:19 +07:00
parent d626b78877
commit 36d0789b03
3 changed files with 31 additions and 33 deletions

View File

@ -0,0 +1,24 @@
Index: ettercap-0.8.3.1/CMakeLists.txt
===================================================================
--- ettercap-0.8.3.1.orig/CMakeLists.txt
+++ ettercap-0.8.3.1/CMakeLists.txt
@@ -22,19 +22,6 @@ option(LIBRARY_BUILD "Build for libetter
option(INSTALL_DESKTOP "Install ettercap desktop files" ON)
-set(VALID_BUILD_TYPES Debug Release RelWithDebInfo)
-
-if(NOT CMAKE_BUILD_TYPE)
- # Default to using "Release" as our build type.
- set(CMAKE_BUILD_TYPE "Release" CACHE STRING
- "Choose the type of build, options are: ${VALID_BUILD_TYPES}." FORCE)
-endif()
-list(FIND VALID_BUILD_TYPES ${CMAKE_BUILD_TYPE} contains_valid)
-if(contains_valid EQUAL -1)
- message(FATAL_ERROR "Unknown CMAKE_BUILD_TYPE: '${CMAKE_BUILD_TYPE}'. Valid options are: ${VALID_BUILD_TYPES}")
-endif()
-unset(contains_valid)
-
include(CMakeDependentOption)
# If SYSTEM_LIBS is set to off, then all SYSTEM_* options will be

View File

@ -1,31 +0,0 @@
From b2f7634c9dbc0ef68640f0571787d92300e9f9f9 Mon Sep 17 00:00:00 2001
From: Stefan Strogin <stefan@steils.org>
Date: Sat, 15 Aug 2020 07:18:31 +0300
Subject: [PATCH] ec_sslwrap: fix compilation with LibreSSL
Disable taking over SNI extension from ClientHello and SSL configuration
operations until LibreSSL supports the required API.
Fixes: https://github.com/Ettercap/ettercap/issues/1068
---
src/ec_sslwrap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git src/ec_sslwrap.c src/ec_sslwrap.c
index b9f26a142..1e4c24fc1 100644
--- src/ec_sslwrap.c
+++ src/ec_sslwrap.c
@@ -71,11 +71,11 @@
#define TLS_server_method SSLv23_server_method
#endif
-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
#define HAVE_OPENSSL_1_1_0
#endif
-#if (OPENSSL_VERSION_NUMBER >= 0x10101000L)
+#if (OPENSSL_VERSION_NUMBER >= 0x10101000L) && !defined(LIBRESSL_VERSION_NUMBER)
#define HAVE_OPENSSL_1_1_1
#endif

View File

@ -3,8 +3,8 @@ pkgname=ettercap
version=0.8.3.1
revision=2
build_style=cmake
configure_args="-DENABLE_GTK=OFF"
hostmakedepends="flex"
configure_args="-DENABLE_GTK=OFF -DBUNDLED_LIBS=OFF"
hostmakedepends="flex pkg-config"
makedepends="geoip-devel ncurses-devel openssl-devel libcurl-devel
libltdl-devel libnet-devel libpcap-devel pcre-devel"
conf_files="/etc/${pkgname}/etter.conf"
@ -15,5 +15,10 @@ homepage="http://ettercap.github.com/ettercap/"
distfiles="https://github.com/Ettercap/ettercap/archive/v${version}.tar.gz"
checksum=d0c3ef88dfc284b61d3d5b64d946c1160fd04276b448519c1ae4438a9cdffaf3
lib32disabled=yes
patch_args=-Np1
CFLAGS="-fcommon"
post_extract() {
rm -rf bundled_deps
}