Author: Michael R. Crusoe <crusoe@debian.org>
Description: Link against the packaged version of libpcre2

Instead of the code copy.

--- python-pcre2.orig/CMakeLists.txt
+++ python-pcre2/CMakeLists.txt
@@ -5,7 +5,7 @@
 
 set(CMAKE_C_STANDARD 99)
 
-set(PCRE2_INCLUDE_DIR ${CMAKE_BINARY_DIR}/src/libpcre2)
+set(PCRE2_INCLUDE_DIR /usr/include)
 set(CYTHON_EXTRA_COMPILE_ARGS -DPCRE2_CODE_UNIT_WIDTH=8 -fPIC)
 
 # Set PCRE2 options.
@@ -15,11 +15,6 @@
 # Always make a release build.
 set(CMAKE_BUILD_TYPE Release)
 
-# Build PCRE2 library as both shared and static.
-set(BUILD_STATIC_LIBS ON)
-set(BUILD_SHARED_LIBS ON)
-add_subdirectory(src/libpcre2)
-
 # Build Cython code as shared.
 set(BUILD_STATIC_LIBS OFF)
 set(BUILD_SHARED_LIBS ON)
--- python-pcre2.orig/src/pcre2/CMakeLists.txt
+++ python-pcre2/src/pcre2/CMakeLists.txt
@@ -12,7 +12,7 @@
     add_library(${filename} MODULE ${filename})
     python_extension_module(${filename})
 
-    target_link_libraries(${filename} pcre2-8-static)
+    target_link_libraries(${filename} pcre2-8)
     target_include_directories(${filename} PRIVATE ${PCRE2_INCLUDE_DIR})
     target_compile_options(${filename} PRIVATE ${CYTHON_EXTRA_COMPILE_ARGS})
     
@@ -50,4 +50,4 @@
         utils.pyx
     DESTINATION
         src/pcre2
-)
\ No newline at end of file
+)
