Skip to content

Commit 3640921

Browse files
authored
Merge pull request #2858 from signalwire/upgrade_to_pcre2
[Core] Upgrade FreeSWITCH to use PCRE2 library. Be aware of breaking changes.
2 parents b2f5b66 + 9092470 commit 3640921

File tree

44 files changed

+508
-296
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+508
-296
lines changed

.github/workflows/macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
lua \
4141
opus \
4242
ossp-uuid \
43-
pcre \
43+
pcre2 \
4444
pkgconf \
4545
sofia-sip \
4646
speex \

.github/workflows/scan-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ jobs:
5454
shell: bash
5555
working-directory: freeswitch
5656
run: |
57+
DEBIAN_FRONTEND=noninteractive apt-get install -y libpcre2-dev libsphinxbase-dev libpocketsphinx-dev
5758
./ci.sh -t scan-build -a configure -c sofia-sip -p "$GITHUB_WORKSPACE/sofia-sip"
5859
./ci.sh -t scan-build -a build -c sofia-sip -p "$GITHUB_WORKSPACE/sofia-sip"
5960
./ci.sh -t scan-build -a install -c sofia-sip -p "$GITHUB_WORKSPACE/sofia-sip"

.github/workflows/unit-test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ jobs:
8787
shell: bash
8888
working-directory: freeswitch
8989
run: |
90+
DEBIAN_FRONTEND=noninteractive apt-get install -y libpcre2-dev libsphinxbase-dev libpocketsphinx-dev
9091
./ci.sh -t unit-test -a configure -c sofia-sip -p "$GITHUB_WORKSPACE/sofia-sip"
9192
./ci.sh -t unit-test -a build -c sofia-sip -p "$GITHUB_WORKSPACE/sofia-sip"
9293
./ci.sh -t unit-test -a install -c sofia-sip -p "$GITHUB_WORKSPACE/sofia-sip"

Makefile.am

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,9 @@ CORE_LIBS+=libfreeswitch_libyuv.la
231231
endif
232232

233233
lib_LTLIBRARIES = libfreeswitch.la
234-
libfreeswitch_la_CFLAGS = $(CORE_CFLAGS) $(SQLITE_CFLAGS) $(GUMBO_CFLAGS) $(FVAD_CFLAGS) $(FREETYPE_CFLAGS) $(CURL_CFLAGS) $(PCRE_CFLAGS) $(SPEEX_CFLAGS) $(LIBEDIT_CFLAGS) $(openssl_CFLAGS) $(SOFIA_SIP_CFLAGS) $(AM_CFLAGS) $(TPL_CFLAGS)
234+
libfreeswitch_la_CFLAGS = $(CORE_CFLAGS) $(SQLITE_CFLAGS) $(GUMBO_CFLAGS) $(FVAD_CFLAGS) $(FREETYPE_CFLAGS) $(CURL_CFLAGS) $(PCRE2_CFLAGS) $(SPEEX_CFLAGS) $(LIBEDIT_CFLAGS) $(openssl_CFLAGS) $(SOFIA_SIP_CFLAGS) $(AM_CFLAGS) $(TPL_CFLAGS)
235235
libfreeswitch_la_LDFLAGS = -version-info 1:0:0 $(AM_LDFLAGS) $(PLATFORM_CORE_LDFLAGS) -no-undefined
236-
libfreeswitch_la_LIBADD = $(CORE_LIBS) $(APR_LIBS) $(SQLITE_LIBS) $(GUMBO_LIBS) $(FVAD_LIBS) $(FREETYPE_LIBS) $(CURL_LIBS) $(PCRE_LIBS) $(SPEEX_LIBS) $(LIBEDIT_LIBS) $(SYSTEMD_LIBS) $(openssl_LIBS) $(PLATFORM_CORE_LIBS) $(TPL_LIBS) $(SPANDSP_LIBS) $(SOFIA_SIP_LIBS)
236+
libfreeswitch_la_LIBADD = $(CORE_LIBS) $(APR_LIBS) $(SQLITE_LIBS) $(GUMBO_LIBS) $(FVAD_LIBS) $(FREETYPE_LIBS) $(CURL_LIBS) $(PCRE2_LIBS) $(SPEEX_LIBS) $(LIBEDIT_LIBS) $(SYSTEMD_LIBS) $(openssl_LIBS) $(PLATFORM_CORE_LIBS) $(TPL_LIBS) $(SPANDSP_LIBS) $(SOFIA_SIP_LIBS)
237237
libfreeswitch_la_DEPENDENCIES = $(BUILT_SOURCES)
238238

239239
if HAVE_PNG

build/Makefile.centos5

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ DOWNLOAD=http://files.freeswitch.org/downloads/libs
1313
JPEG=v8d
1414
OPENSSL=1.0.1l
1515
SQLITE=autoconf-3080403
16-
PCRE=8.35
16+
PCRE2=10.42
1717
CURL=7.40.0
1818
SPEEX=1.2rc1
1919
LIBEDIT=20140618-3.1
@@ -45,7 +45,7 @@ has-git:
4545
@git --version || (echo "please install git by running 'make install-git'" && false)
4646

4747
clean:
48-
@rm -rf openssl* ldns* jpeg* pcre* perl* pkg-config* speex* sqlite* libedit* curl* *~
48+
@rm -rf openssl* ldns* jpeg* pcre2* perl* pkg-config* speex* sqlite* libedit* curl* *~
4949
(cd freeswitch.git && git clean -fdx && git reset --hard HEAD && git pull)
5050

5151
libjpeg: jpeg-8d/.done
@@ -66,9 +66,9 @@ sqlite-$(SQLITE):
6666
(test -d $@) || (wget -4 -O $@.tar.gz $(DOWNLOAD)/$@.tar.gz && tar zxfv $@.tar.gz)
6767
(cd $@ && ./configure --prefix=$(PREFIX) && make && sudo make install && touch .done_sqlite && touch .done)
6868

69-
pcre: pcre-$(PCRE)/.done
70-
pcre-$(PCRE)/.done: pcre-$(PCRE)
71-
pcre-$(PCRE):
69+
pcre2: pcre2-$(PCRE2)/.done
70+
pcre2-$(PCRE2)/.done: pcre2-$(PCRE2)
71+
pcre2-$(PCRE2):
7272
(test -d $@) || (wget -4 -O $@.tar.gz $(DOWNLOAD)/$@.tar.gz && tar zxfv $@.tar.gz)
7373
(cd $@ && ./configure --prefix=$(PREFIX) && make && sudo make install && touch .done)
7474

@@ -96,4 +96,4 @@ ldns-$(LDNS):
9696
(test -d $@) || (wget -4 -O $@.tar.gz $(DOWNLOAD)/$@.tar.gz && tar zxfv $@.tar.gz)
9797
(cd $@ && ./configure --with-ssl=$(PREFIX) --prefix=$(PREFIX) && make && sudo make install && touch .done)
9898

99-
deps: libjpeg openssl sqlite pcre curl speex libedit ldns
99+
deps: libjpeg openssl sqlite pcre2 curl speex libedit ldns

build/Makefile.centos6

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
# in that same directory.
77
#
88
#
9-
RPMS=git gcc-c++ autoconf automake libtool wget ncurses-devel zlib-devel libjpeg-devel openssl-devel e2fsprogs-devel sqlite-devel libcurl-devel pcre-devel speex-devel ldns-devel libedit-devel
10-
DEBS=git build-essential automake autoconf 'libtool-bin|libtool' wget uuid-dev zlib1g-dev 'libjpeg8-dev|libjpeg62-turbo-dev' libncurses5-dev libssl-dev libpcre3-dev libcurl4-openssl-dev libldns-dev libedit-dev libspeexdsp-dev libspeexdsp-dev libsqlite3-dev perl libgdbm-dev libdb-dev bison libvlc-dev pkg-config
9+
RPMS=git gcc-c++ autoconf automake libtool wget ncurses-devel zlib-devel libjpeg-devel openssl-devel e2fsprogs-devel sqlite-devel libcurl-devel pcre2-devel speex-devel ldns-devel libedit-devel
10+
DEBS=git build-essential automake autoconf 'libtool-bin|libtool' wget uuid-dev zlib1g-dev 'libjpeg8-dev|libjpeg62-turbo-dev' libncurses5-dev libssl-dev libpcre2-dev libcurl4-openssl-dev libldns-dev libedit-dev libspeexdsp-dev libspeexdsp-dev libsqlite3-dev perl libgdbm-dev libdb-dev bison libvlc-dev pkg-config
1111

1212
freeswitch: deps has-git freeswitch.git/Makefile
1313
cd freeswitch.git && make

build/Makefile.openbsd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
#
99

10-
PKG=rsync-3.1.0 git automake-1.14.1 autoconf-2.69p1 libtool gmake bzip2 jpeg wget pcre speex libldns
10+
PKG=rsync-3.1.0 git automake-1.14.1 autoconf-2.69p1 libtool gmake bzip2 jpeg wget pcre2 speex libldns
1111
PREFIX=/usr/local/freeswitch
1212
DOWNLOAD=http://files.freeswitch.org/downloads/libs
1313
OPENSSL=1.0.1j

build/Makefile.solaris11

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ DOWNLOAD=http://files.freeswitch.org/downloads/libs
1212
JP=v8d
1313
SSL=1.0.1j
1414
SQLITE=autoconf-3080403
15-
PCRE=8.35
15+
PCRE2=10.42
1616
CURL=7.35.0
1717
SPEEX=1.2rc1
1818
LIBEDIT=20140618-3.1
@@ -43,7 +43,7 @@ has-git:
4343
@git --version || (echo "please install git by running 'gmake install-git'" && false)
4444

4545
clean:
46-
@rm -rf openssl* ldns* jpeg* pcre* perl* pkg-config* speex* sqlite* libedit* curl* *~
46+
@rm -rf openssl* ldns* jpeg* pcre2* perl* pkg-config* speex* sqlite* libedit* curl* *~
4747
(cd freeswitch.git && git clean -fdx && git reset --hard HEAD && git pull)
4848

4949
libjpeg: jpeg-8d/.done
@@ -64,9 +64,9 @@ sqlite-$(SQLITE):
6464
(test -d $@) || (wget -4 -O $@.tar.gz $(DOWNLOAD)/$@.tar.gz && tar zxfv $@.tar.gz)
6565
(cd $@ && CFLAGS=-m64 LDFLAGS=-m64 ./configure --prefix=$(PREFIX) && gmake && sudo gmake install && touch .done)
6666

67-
pcre: pcre-$(PCRE)/.done
68-
pcre-$(PCRE)/.done: pcre-$(PCRE)
69-
pcre-$(PCRE):
67+
pcre2: pcre2-$(PCRE2)/.done
68+
pcre2-$(PCRE2)/.done: pcre2-$(PCRE2)
69+
pcre2-$(PCRE2):
7070
(test -d $@) || (wget -4 -O $@.tar.gz $(DOWNLOAD)/$@.tar.gz && tar zxfv $@.tar.gz)
7171
(cd $@ && CXXFLAGS=-m64 CFLAGS=-m64 LDFLAGS=-m64 ./configure --prefix=$(PREFIX) && gmake && sudo gmake install && touch .done)
7272

@@ -107,4 +107,4 @@ perl-$(PERL):
107107
(test -d $@) || (wget -4 -O $@.tar.gz $(DOWNLOAD)/$@.tar.gz && tar zxfv $@.tar.gz)
108108
(cd $@ && CFLAGS=-m64 LDFLAGS=-m64 ./configure.gnu -Dcc=gcc --prefix=$(PREFIX) && gmake && sudo gmake install && touch .done)
109109

110-
deps: has-git libjpeg openssl sqlite pcre curl speex libedit ldns pkg-config perl
110+
deps: has-git libjpeg openssl sqlite pcre2 curl speex libedit ldns pkg-config perl

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1319,7 +1319,7 @@ PKG_CHECK_MODULES([TPL], [libtpl >= 1.5],[
13191319

13201320
PKG_CHECK_MODULES([SQLITE], [sqlite3 >= 3.6.20])
13211321
PKG_CHECK_MODULES([CURL], [libcurl >= 7.19])
1322-
PKG_CHECK_MODULES([PCRE], [libpcre >= 7.8])
1322+
PKG_CHECK_MODULES([PCRE2], [libpcre2-8 >= 10.00])
13231323
PKG_CHECK_MODULES([SPEEX], [speex >= 1.2rc1 speexdsp >= 1.2rc1])
13241324
PKG_CHECK_MODULES([LDNS], [libldns-fs >= 1.6.6],[
13251325
AM_CONDITIONAL([HAVE_LDNS],[true])],[

debian/bootstrap.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ Build-Depends:
302302
# core build
303303
dpkg-dev (>= 1.15.8.12), gcc (>= 4:4.4.5), g++ (>= 4:4.4.5),
304304
libc6-dev (>= 2.11.3), make (>= 3.81),
305-
libpcre3-dev,
305+
libpcre2-dev,
306306
libedit-dev (>= 2.11),
307307
libsqlite3-dev,
308308
libtiff5-dev,

0 commit comments

Comments
 (0)