Commit 36bee9bb authored by Adrien Béraud's avatar Adrien Béraud

build, contrib: remove pcre

Change-Id: Ifc2c224afe9d3de9d52ecc1d66d7d81ccec524ac
parent efdfbe5e
This diff is collapsed.
......@@ -545,20 +545,6 @@ PKG_CHECK_MODULES([GNUTLS], [gnutls >= 3.4.14], [HAVE_GNUTLS=1], [HAVE_GNUTLS=0]
# required dependency(ies): libxpat
AX_PTHREAD
# SDES Key Exchange
# required dependency(ies): libpcre
AC_ARG_WITH([sdes],
[AS_HELP_STRING([--without-sdes], [disable support for sdes key exchange])],
[],
[with_sdes=yes])
AS_IF([test "x$with_sdes" = "xyes"], [
PKG_CHECK_MODULES(PCRE, [libpcre],,AC_MSG_ERROR([libpcre not found]))]);
AC_DEFINE_UNQUOTED([HAVE_SDES], `if test "x$with_sdes" = "xyes"; then echo 1; else echo 0; fi`, [Define if you have sdes support])
AM_CONDITIONAL(BUILD_SDES, test "x$with_sdes" = "xyes" )
dnl Check for libcppunit-dev
CPPUNIT_MIN_VERSION=1.12
PKG_CHECK_MODULES(CPPUNIT, cppunit >= ${CPPUNIT_MIN_VERSION}, AM_CONDITIONAL(BUILD_TEST, test 1 = 1 ), AM_CONDITIONAL(BUILD_TEST, test 0 = 1 ))
......
......@@ -83,7 +83,6 @@ upnp=build\libupnp\build\vs2017\libupnp.vcxproj, ^
secp256k1=build\secp256k1\MSVC\secp256k1.vcxproj, ^
portaudio=build\portaudio\msvc\portaudio.vcxproj, ^
yaml-cpp=build\yaml-cpp\msvc\yaml-cpp.vcxproj, ^
pcre=build\pcre\msvc\pcre.vcxproj
goto startBuild
:win32Projs
......@@ -119,8 +118,7 @@ threadutil=build\libupnp\build\vs2017\threadutil.vcxproj, ^
upnp=build\libupnp\build\vs2017\libupnp.vcxproj, ^
secp256k1=build\secp256k1\MSVC\secp256k1.vcxproj, ^
portaudio=build\portaudio\msvc\portaudio.vcxproj, ^
yaml-cpp=build\yaml-cpp\msvc\yaml-cpp.vcxproj, ^
pcre=build\pcre\msvc\pcre.vcxproj
yaml-cpp=build\yaml-cpp\msvc\yaml-cpp.vcxproj
goto startBuild
......@@ -240,7 +238,7 @@ if /I %1 equ ffmpeg (
:build_restbed
:: build openssl
cd %CONTRIB_DIR%build\restbed\dependency\openssl
cd %CONTRIB_DIR%build\restbed\dependency\openssl
if "%2"=="win32" (
call perl Configure VC-WIN64A
call ms\do_win64a
......
......@@ -32,7 +32,6 @@ nettle, ^
gnutls, ^
opendht, ^
opus, ^
pcre, ^
pjproject, ^
portaudio, ^
pthreads, ^
......@@ -57,7 +56,6 @@ nettle, ^
gnutls, ^
opendht, ^
opus, ^
pcre, ^
pjproject, ^
portaudio, ^
pthreads, ^
......
From a33857636bb0721469bc08173dd196138457fa6c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com>
Date: Tue, 3 Oct 2017 15:52:48 +0200
Subject: [PATCH] build: don't build executables
Disables building pcregrep and pcretest.
---
Makefile.am | 41 -----------------------------------------
1 file changed, 41 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 22b6947..58cc22b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -487,47 +487,6 @@ endif # WITH_PCRE_CPP
# Each unit test is a binary plus a script that runs that binary in various
# ways. We install these test binaries in case folks find it helpful.
-TESTS += RunTest
-dist_noinst_SCRIPTS += RunTest
-EXTRA_DIST += RunTest.bat
-bin_PROGRAMS += pcretest
-pcretest_SOURCES = pcretest.c
-pcretest_CFLAGS = $(AM_CFLAGS)
-pcretest_LDADD = $(LIBREADLINE)
-if WITH_PCRE8
-pcretest_SOURCES += pcre_printint.c
-pcretest_LDADD += libpcre.la libpcreposix.la
-endif # WITH_PCRE8
-if WITH_PCRE16
-pcretest_SOURCES += pcre16_printint.c
-pcretest_LDADD += libpcre16.la
-endif # WITH_PCRE16
-if WITH_PCRE32
-pcretest_SOURCES += pcre32_printint.c
-pcretest_LDADD += libpcre32.la
-endif # WITH_PCRE32
-if WITH_VALGRIND
-pcretest_CFLAGS += $(VALGRIND_CFLAGS)
-endif # WITH_VALGRIND
-if WITH_GCOV
-pcretest_CFLAGS += $(GCOV_CFLAGS)
-pcretest_LDADD += $(GCOV_LIBS)
-endif # WITH_GCOV
-
-if WITH_PCRE8
-TESTS += RunGrepTest
-dist_noinst_SCRIPTS += RunGrepTest
-bin_PROGRAMS += pcregrep
-pcregrep_SOURCES = pcregrep.c
-pcregrep_CFLAGS = $(AM_CFLAGS)
-pcregrep_LDADD = $(LIBZ) $(LIBBZ2)
-pcregrep_LDADD += libpcre.la libpcreposix.la
-if WITH_GCOV
-pcregrep_CFLAGS += $(GCOV_CFLAGS)
-pcregrep_LDADD += $(GCOV_LIBS)
-endif # WITH_GCOV
-endif # WITH_PCRE8
-
EXTRA_DIST += \
testdata/grepbinary \
testdata/grepfilelist \
--
2.13.1
cc9cdbeb98c010fe4f093a019bebfb91965dae4c6a48f8e49c38ec8df7d9da7f0d32c12fc58f22c51f1c2f010e72b65bcbf8bbf180060e93edf464fa9a7c3551 pcre-8.41.tar.bz2
set BUILD=%SRC%..\build
set PCRE_VERSION=8.42
set PCRE_URL=ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre
set PCRE_NAME=pcre
mkdir %BUILD%
if %USE_CACHE%==1 (
copy %CACHE_DIR%\%PCRE_NAME%-%PCRE_VERSION%.tar.bz2 %cd%
) else (
%WGET_CMD% %PCRE_URL%/%PCRE_NAME%-%PCRE_VERSION%.tar.bz2
)
7z -y x %PCRE_NAME%-%PCRE_VERSION%.tar.bz2 && 7z -y x %PCRE_NAME%-%PCRE_VERSION%.tar -o%BUILD%
del %PCRE_NAME%-%PCRE_VERSION%.tar && del %PCRE_NAME%-%PCRE_VERSION%.tar.bz2
rename %BUILD%\%PCRE_NAME%-%PCRE_VERSION% %PCRE_NAME%
cd %BUILD%\%PCRE_NAME%
mkdir msvc && cd msvc
setlocal
set PATH=C:\\Program Files\\CMake\\bin\\;%PATH%
cmake .. -G "Visual Studio 15 2017 Win64"
endlocal
cd %SRC%
\ No newline at end of file
# Perl Compatible Regular Expression
PCRE_VERSION := 8.41
PCRE_URL := https://ftp.pcre.org/pub/pcre/pcre-$(PCRE_VERSION).tar.bz2
PKGS += pcre
# OS X ships with improperly packaged libpcre, so we can't rely on pkg-config
ifndef HAVE_MACOSX
ifeq ($(call need_pkg,"libpcre"),)
PKGS_FOUND += pcre
endif
endif
$(TARBALLS)/pcre-$(PCRE_VERSION).tar.bz2:
$(call download,$(PCRE_URL))
.sum-pcre: pcre-$(PCRE_VERSION).tar.bz2
pcre: pcre-$(PCRE_VERSION).tar.bz2 .sum-pcre
$(UNPACK)
$(APPLY) $(SRC)/pcre/0001-build-don-t-build-executables.patch
$(MOVE)
.pcre: pcre
$(RECONF)
cd $< && $(HOSTVARS) ./configure --disable-cpp $(HOSTCONF)
cd $< && $(MAKE) install
touch $@
......@@ -28,7 +28,6 @@ RUN apt-get update && \
libpulse-dev \
libasound2-dev \
libexpat1-dev \
libpcre3-dev \
libyaml-cpp-dev \
libboost-dev \
libxext-dev \
......
......@@ -60,7 +60,6 @@ libring_la_LDFLAGS = \
@ZLIB_LIBS@ \
@LIBSSL_LIBS@ \
@LIBCRYPTO_LIBS@ \
$(PCRE_LIBS) \
@LIBS@
if HAVE_WIN32
......
......@@ -26,9 +26,5 @@ libsiplink_la_SOURCES+=sippresence.cpp \
pres_sub_client.cpp\
pres_sub_client.h
if BUILD_SDES
libsiplink_la_SOURCES+= sdes_negotiator.cpp \
sdes_negotiator.h
libsiplink_la_CXXFLAGS += @PCRE_CFLAGS@
endif
......@@ -19,8 +19,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __SDES_NEGOTIATOR_H__
#define __SDES_NEGOTIATOR_H__
#pragma once
#include "media/media_codec.h"
......@@ -87,39 +86,36 @@ static std::vector<CryptoSuiteDefinition> CryptoSuites = {
};
class SdesNegotiator {
/**
* Constructor for an SDES crypto attributes
* negotiator.
*
* @param attribute
* A vector of crypto attributes as defined in
* RFC4568. This string will be parsed
* and a crypto context will be created
* from it.
*/
public:
SdesNegotiator() {}
SdesNegotiator(const std::vector<CryptoSuiteDefinition>& capabilites);
ring::CryptoAttribute
negotiate(const std::vector<std::string>& attributes) const;
inline explicit operator bool() const {
return not localCapabilities_.empty();
}
private:
static std::vector<CryptoAttribute>
parse(const std::vector<std::string>& attributes);
/**
* A vector list containing the remote attributes.
* Multiple crypto lines can be sent, and the
* preferred method is then chosen from that list.
*/
std::vector<CryptoSuiteDefinition> localCapabilities_;
public:
SdesNegotiator() {}
/**
* Constructor for an SDES crypto attributes
* negotiator.
*
* @param capabilites
* A vector of crypto attributes as defined in
* RFC4568. This string will be parsed
* and a crypto context will be created
* from it.
*/
SdesNegotiator(const std::vector<CryptoSuiteDefinition>& capabilites);
CryptoAttribute negotiate(const std::vector<std::string>& attributes) const;
inline explicit operator bool() const {
return not localCapabilities_.empty();
}
private:
static std::vector<CryptoAttribute> parse(const std::vector<std::string>& attributes);
/**
* A vector list containing the remote attributes.
* Multiple crypto lines can be sent, and the
* preferred method is then chosen from that list.
*/
std::vector<CryptoSuiteDefinition> localCapabilities_;
};
} // namespace ring
#endif // __SDES_NEGOTIATOR_H__
......@@ -20,8 +20,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef SDP_H_
#define SDP_H_
#pragma once
#include "noncopyable.h"
#include "sdes_negotiator.h"
......@@ -326,5 +325,3 @@ class Sdp {
};
} // namespace ring
#endif
......@@ -27,7 +27,6 @@
#include "sipaccount.h" // for SIPAccount::ACCOUNT_TYPE
#include "sipaccountbase.h"
#include "sipvoiplink.h"
#include "sdes_negotiator.h"
#include "logger.h" // for _debug
#include "sdp.h"
#include "manager.h"
......
......@@ -35,9 +35,6 @@
#include "ringdht/ringaccount.h"
#include "manager.h"
#if HAVE_SDES
#include "sdes_negotiator.h"
#endif
#include "im/instant_messaging.h"
#include "system_codec_container.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment