Skip to content

Commit 7a2c574

Browse files
author
Kasper Peeters
committed
Remove dependence on PCRE.
1 parent 5b5c7f0 commit 7a2c574

File tree

9 files changed

+22
-65
lines changed

9 files changed

+22
-65
lines changed

README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ any issues. You can use either g++ or the clang++ compiler.
119119
Install the dependencies with::
120120

121121
sudo dnf install git python3-devel make cmake gcc-c++ \
122-
pcre-devel gmp-devel libuuid-devel sqlite-devel \
122+
gmp-devel libuuid-devel sqlite-devel \
123123
gtkmm30-devel boost-devel \
124124
texlive python3-matplotlib \
125125
python3-pip
@@ -205,7 +205,7 @@ changes for 'Tumbleweed') you first need to install the dependencies
205205
with::
206206

207207
sudo zypper install --no-recommends git cmake python3-devel gcc-c++ \
208-
pcre-devel gmp-devel libuuid-devel sqlite-devel \
208+
gmp-devel libuuid-devel sqlite-devel \
209209
gtkmm3-devel \
210210
texlive python3-matplotlib \
211211
python3-sympy \
@@ -334,7 +334,7 @@ Cadabra builds with the standard Apple compiler, on both Intel and
334334
Apple silicon, but you do need a number of packages from Homebrew (see
335335
https://brew.sh). Install the required dependencies with::
336336

337-
brew install cmake boost pcre gmp python3
337+
brew install cmake boost gmp python3
338338
brew install pkgconfig
339339
brew install gtkmm3 adwaita-icon-theme
340340
pip3 install sympy gmpy2

c++lib/CMakeLists.txt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,6 @@ else()
9797
message(STATUS "Found gmpxx ${GMPXX_LIB}")
9898
endif()
9999

100-
# Locate pcre
101-
find_package(PCRE REQUIRED)
102-
103100

104101
#---------------------------------------------------------------------------
105102
# Enumerate source files.
@@ -320,10 +317,10 @@ target_include_directories(cadabra2++objects PUBLIC "${LIB_INCLUDE_DIRS}")
320317
add_library(cadabra2++ SHARED $<TARGET_OBJECTS:cadabra2++objects>)
321318
set_target_properties(cadabra2++ PROPERTIES PUBLIC_HEADER "${PUBLIC_HEADER_FILES}")
322319

323-
target_link_libraries(cadabra2++ ${PCRE_LIBRARIES} ${GMPXX_LIB} ${GMP_LIB})
320+
target_link_libraries(cadabra2++ ${GMPXX_LIB} ${GMP_LIB})
324321

325322
add_library(cadabra2++_static STATIC $<TARGET_OBJECTS:cadabra2++objects>)
326-
target_link_libraries(cadabra2++_static ${PCRE_LIBRARIES} ${GMPXX_LIB} ${GMP_LIB})
323+
target_link_libraries(cadabra2++_static ${GMPXX_LIB} ${GMP_LIB})
327324

328325
# Trivial example
329326
add_executable(trivial trivial.cc)

cmake/modules/FindGLIBMM.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
if(WIN32)
2-
windows_find_library(GLIBMM3_LIBRARIES REQUIRED glibmm sigc glib pcre gobject)
2+
windows_find_library(GLIBMM3_LIBRARIES REQUIRED glibmm sigc glib gobject)
33
if (GLIBMM3_LIBRARIES)
44
set(GLIBMM3_FOUND TRUE)
55
endif()

cmake/modules/FindPCRE.cmake

Lines changed: 0 additions & 37 deletions
This file was deleted.

cmake/packaging.cmake

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,52 +13,52 @@ if(EXISTS "/etc/redhat-release")
1313
if(LINUX_ISSUE MATCHES "CentOS")
1414
set(CPACK_GENERATOR "RPM")
1515
set(CPACK_SYSTEM_NAME "centos")
16-
set(CPACK_RPM_PACKAGE_REQUIRES "centos-release-scl, epel-release, rh-python36, pcre, gmp, libuuid, sqlite, gtkmm30, boost-system, boost-filesystem, boost-program-options, boost-regex, libstdc++, dvipng, texlive, texlive-ytableau")
16+
set(CPACK_RPM_PACKAGE_REQUIRES "centos-release-scl, epel-release, rh-python36, gmp, libuuid, sqlite, gtkmm30, boost-system, boost-filesystem, boost-program-options, boost-regex, libstdc++, dvipng, texlive, texlive-ytableau")
1717
message("-- This is a CentOS system")
1818
endif()
1919
if(LINUX_ISSUE MATCHES "Scientific Linux")
2020
set(CPACK_GENERATOR "RPM")
2121
set(CPACK_SYSTEM_NAME "scientific7x")
22-
set(CPACK_RPM_PACKAGE_REQUIRES "yum-conf-softwarecollections, epel-release, rh-python36, pcre, gmp, libuuid, sqlite, gtkmm30, boost-system, boost-filesystem, boost-program-options, boost-regex, libstdc++, dvipng, texlive, texlive-ytableau")
22+
set(CPACK_RPM_PACKAGE_REQUIRES "yum-conf-softwarecollections, epel-release, rh-python36, gmp, libuuid, sqlite, gtkmm30, boost-system, boost-filesystem, boost-program-options, boost-regex, libstdc++, dvipng, texlive, texlive-ytableau")
2323
message("-- This is a CentOS system")
2424
endif()
2525
if(LINUX_ISSUE MATCHES "Fedora")
2626
set(CPACK_GENERATOR "RPM")
2727
if(LINUX_ISSUE MATCHES "26")
2828
message("-- This is a Fedora 26 system")
29-
set(CPACK_RPM_PACKAGE_REQUIRES "python3-libs, pcre, gmp, libuuid, sqlite, gtkmm30, boost-system, boost-filesystem, boost-program-options, boost-regex, libstdc++, python3-matplotlib, dvipng, texlive, texlive-ytableau")
29+
set(CPACK_RPM_PACKAGE_REQUIRES "python3-libs, gmp, libuuid, sqlite, gtkmm30, boost-system, boost-filesystem, boost-program-options, boost-regex, libstdc++, python3-matplotlib, dvipng, texlive, texlive-ytableau")
3030
set(CPACK_SYSTEM_NAME "fedora26")
3131
elseif(LINUX_ISSUE MATCHES "27")
3232
message("-- This is a Fedora 27 system")
33-
set(CPACK_RPM_PACKAGE_REQUIRES "python3-libs, pcre, gmp, libuuid, sqlite, gtkmm30, boost-system, boost-filesystem, boost-program-options, boost-regex, libstdc++, python3-matplotlib, dvipng, texlive, texlive-ytableau")
33+
set(CPACK_RPM_PACKAGE_REQUIRES "python3-libs, gmp, libuuid, sqlite, gtkmm30, boost-system, boost-filesystem, boost-program-options, boost-regex, libstdc++, python3-matplotlib, dvipng, texlive, texlive-ytableau")
3434
set(CPACK_SYSTEM_NAME "fedora27")
3535
elseif(LINUX_ISSUE MATCHES "28")
3636
message("-- This is a Fedora 28 system")
37-
set(CPACK_RPM_PACKAGE_REQUIRES "python3-libs, pcre, gmp, libuuid, sqlite, gtkmm30, boost-system, boost-filesystem, boost-program-options, boost-regex, libstdc++, python3-matplotlib, dvipng, texlive, texlive-ytableau")
37+
set(CPACK_RPM_PACKAGE_REQUIRES "python3-libs, gmp, libuuid, sqlite, gtkmm30, boost-system, boost-filesystem, boost-program-options, boost-regex, libstdc++, python3-matplotlib, dvipng, texlive, texlive-ytableau")
3838
set(CPACK_SYSTEM_NAME "fedora28")
3939
elseif(LINUX_ISSUE MATCHES "29")
4040
message("-- This is a Fedora 29 system")
41-
set(CPACK_RPM_PACKAGE_REQUIRES "python3-libs, pcre, gmp, libuuid, sqlite, gtkmm30, boost-system, boost-filesystem, boost-program-options, boost-regex, libstdc++, python3-matplotlib, dvipng, texlive, texlive-ytableau")
41+
set(CPACK_RPM_PACKAGE_REQUIRES "python3-libs, gmp, libuuid, sqlite, gtkmm30, boost-system, boost-filesystem, boost-program-options, boost-regex, libstdc++, python3-matplotlib, dvipng, texlive, texlive-ytableau")
4242
set(CPACK_SYSTEM_NAME "fedora29")
4343
elseif(LINUX_ISSUE MATCHES "32")
4444
message("-- This is a Fedora 32 system")
45-
set(CPACK_RPM_PACKAGE_REQUIRES "python3-libs, pcre, gmp, libuuid, sqlite, gtkmm30, boost-system, boost-filesystem, boost-program-options, boost-regex, libstdc++, python3-matplotlib, dvipng, texlive, texlive-ytableau")
45+
set(CPACK_RPM_PACKAGE_REQUIRES "python3-libs, gmp, libuuid, sqlite, gtkmm30, boost-system, boost-filesystem, boost-program-options, boost-regex, libstdc++, python3-matplotlib, dvipng, texlive, texlive-ytableau")
4646
set(CPACK_SYSTEM_NAME "fedora32")
4747
elseif(LINUX_ISSUE MATCHES "33")
4848
message("-- This is a Fedora 33 system")
49-
set(CPACK_RPM_PACKAGE_REQUIRES "python3-libs, pcre, gmp, libuuid, sqlite, gtkmm30, boost-system, boost-filesystem, boost-program-options, boost-regex, libstdc++, python3-matplotlib, dvipng, texlive, texlive-ytableau")
49+
set(CPACK_RPM_PACKAGE_REQUIRES "python3-libs, gmp, libuuid, sqlite, gtkmm30, boost-system, boost-filesystem, boost-program-options, boost-regex, libstdc++, python3-matplotlib, dvipng, texlive, texlive-ytableau")
5050
set(CPACK_SYSTEM_NAME "fedora33")
5151
elseif(LINUX_ISSUE MATCHES "35")
5252
message("-- This is a Fedora 35 system")
53-
set(CPACK_RPM_PACKAGE_REQUIRES "python3-libs, pcre, gmp, libuuid, sqlite, gtkmm30, boost-system, boost-filesystem, boost-program-options, boost-regex, libstdc++, python3-matplotlib, python3-sympy, dvipng, texlive, texlive-ytableau")
53+
set(CPACK_RPM_PACKAGE_REQUIRES "python3-libs, gmp, libuuid, sqlite, gtkmm30, boost-system, boost-filesystem, boost-program-options, boost-regex, libstdc++, python3-matplotlib, python3-sympy, dvipng, texlive, texlive-ytableau")
5454
set(CPACK_SYSTEM_NAME "fedora35")
5555
elseif(LINUX_ISSUE MATCHES "24")
5656
message("-- This is a Fedora 24 system")
57-
set(CPACK_RPM_PACKAGE_REQUIRES "python3-libs, pcre, gmp, libuuid, sqlite, gtkmm30, boost-system, boost-filesystem, boost-program-options, boost-regex, libstdc++, python3-matplotlib, dvipng, texlive, texlive-ytableau")
57+
set(CPACK_RPM_PACKAGE_REQUIRES "python3-libs, gmp, libuuid, sqlite, gtkmm30, boost-system, boost-filesystem, boost-program-options, boost-regex, libstdc++, python3-matplotlib, dvipng, texlive, texlive-ytableau")
5858
set(CPACK_SYSTEM_NAME "fedora24")
5959
else()
6060
message("-- This is a Fedora <24 system")
61-
set(CPACK_RPM_PACKAGE_REQUIRES "python-libs, pcre, gmp, libuuid, sqlite, gtkmm30, boost-system, boost-filesystem, boost-program-options, boost-regex, libstdc++, python-matplotlib, dvipng, texlive, texlive-ytableau")
61+
set(CPACK_RPM_PACKAGE_REQUIRES "python-libs, gmp, libuuid, sqlite, gtkmm30, boost-system, boost-filesystem, boost-program-options, boost-regex, libstdc++, python-matplotlib, dvipng, texlive, texlive-ytableau")
6262
set(CPACK_SYSTEM_NAME "fedora")
6363
endif()
6464
endif()
@@ -69,13 +69,13 @@ else()
6969
set(CPACK_SYSTEM_NAME "leap150")
7070
set(CPACK_GENERATOR "RPM")
7171
message("-- This is an openSUSE Leap 15.0 system")
72-
set(CPACK_RPM_PACKAGE_REQUIRES "libpython3_6m1_0, libpcre1, libgmp10, libuuid1, libsqlite3-0, libgtkmm-3_0-1, libboost_system1_66_0, libboost_filesystem1_66_0, libboost_program_options1_66_0, libboost_regex1_66_0, libstdc++6, python3-matplotlib, python3-sympy, texlive-dvipng, texlive, texlive-ytableau")
72+
set(CPACK_RPM_PACKAGE_REQUIRES "libpython3_6m1_0, libgmp10, libuuid1, libsqlite3-0, libgtkmm-3_0-1, libboost_system1_66_0, libboost_filesystem1_66_0, libboost_program_options1_66_0, libboost_regex1_66_0, libstdc++6, python3-matplotlib, python3-sympy, texlive-dvipng, texlive, texlive-ytableau")
7373
endif()
7474
if(LINUX_ISSUE MATCHES "Tumbleweed")
7575
set(CPACK_SYSTEM_NAME "tumbleweed")
7676
set(CPACK_GENERATOR "RPM")
7777
message("-- This is an openSUSE Tumbleweed system")
78-
set(CPACK_RPM_PACKAGE_REQUIRES "libpython3_7m1_0, libpcre1, libgmp10, libuuid1, libsqlite3-0, libgtkmm-3_0-1, libboost_system1_71_0, libboost_filesystem1_71_0, libboost_program_options1_71_0, libboost_regex1_71_0, libstdc++6, python3-matplotlib, python3-sympy, texlive-dvipng, texlive, texlive-ytableau")
78+
set(CPACK_RPM_PACKAGE_REQUIRES "libpython3_7m1_0, libgmp10, libuuid1, libsqlite3-0, libgtkmm-3_0-1, libboost_system1_71_0, libboost_filesystem1_71_0, libboost_program_options1_71_0, libboost_regex1_71_0, libstdc++6, python3-matplotlib, python3-sympy, texlive-dvipng, texlive, texlive-ytableau")
7979
endif()
8080
endif()
8181
if(EXISTS "/etc/issue")
@@ -85,7 +85,7 @@ else()
8585
set(CPACK_SYSTEM_NAME "leap421")
8686
set(CPACK_GENERATOR "RPM")
8787
message("-- This is an openSUSE Leap 42.1 system")
88-
set(CPACK_RPM_PACKAGE_REQUIRES "libpython3_4m1_0, libpcre1, libgmp10, libuuid1, libsqlite3-0, libgtkmm-3_0-1, libboost_system1_61_0, libboost_filesystem1_61_0, libboost_program_options1_61_0, libboost_regex1_61_0, libstdc++6, python3-matplotlib, texlive-dvipng, texlive, texlive-ytableau")
88+
set(CPACK_RPM_PACKAGE_REQUIRES "libpython3_4m1_0, libgmp10, libuuid1, libsqlite3-0, libgtkmm-3_0-1, libboost_system1_61_0, libboost_filesystem1_61_0, libboost_program_options1_61_0, libboost_regex1_61_0, libstdc++6, python3-matplotlib, texlive-dvipng, texlive, texlive-ytableau")
8989
endif()
9090
endif()
9191
if(LINUX_ISSUE MATCHES "Debian")

cmake/version.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
set(CADABRA_VERSION_MAJOR 2)
22
set(CADABRA_VERSION_MINOR 4)
33
set(CADABRA_VERSION_PATCH 0)
4-
set(CADABRA_VERSION_TWEAK 1)
4+
set(CADABRA_VERSION_TWEAK 2)
55
set(COPYRIGHT_YEARS "2001-2022")
66
math(EXPR SYSTEM_BITS "${CMAKE_SIZEOF_VOID_P} * 8")
77
find_program(GIT git PATHS ${GIT_DIR})

conda/meta.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ requirements:
4646
- boost-cpp
4747
- libuuid
4848
- sqlite
49-
- pcre
5049
- gtkmm-3.0
5150
- glibmm
5251
- cairomm-1.0

core/Storage.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ You should have received a copy of the GNU General Public License
2525
#include <sstream>
2626
#include <locale>
2727
#include <codecvt>
28-
#include <pcrecpp.h>
2928

3029
#include <boost/functional/hash.hpp>
3130

frontend/common/TeXEngine.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,9 +453,8 @@ void TeXEngine::convert_set(std::set<std::shared_ptr<TeXRequest> >& reqs)
453453

454454
#ifdef __CYGWIN__
455455
// MikTeX does not see /tmp, it needs \cygwin\tmp
456-
// FIXME: change this to use stdc++ regex, not pcrecpp.
457456
nf="\\cygwin"+nf;
458-
pcrecpp::RE("/").GlobalReplace("\\\\", &nf);
457+
nf.replace(nf.begin(), nf.end(), '/', '\\');
459458
#endif
460459

461460
// Run LaTeX on the .tex file.

0 commit comments

Comments
 (0)