aboutsummaryrefslogtreecommitdiff
path: root/tools/depends/target/pcre
diff options
context:
space:
mode:
authorfuzzard <fuzzard@kodi.tv>2022-03-13 21:09:08 +1000
committerfuzzard <fuzzard@kodi.tv>2022-03-16 12:32:06 +1000
commit4658dfc2c11915771d833023625bf349a99fe865 (patch)
treedf6fb5489a49722325344fff632400c9a6f37b9c /tools/depends/target/pcre
parent88aefdad803f49cedde13fea74d09a889fc3c5dd (diff)
[tools/depends][target] pcre use cmake build system
Diffstat (limited to 'tools/depends/target/pcre')
-rw-r--r--tools/depends/target/pcre/Makefile49
-rw-r--r--tools/depends/target/pcre/PCRE-VERSION5
2 files changed, 30 insertions, 24 deletions
diff --git a/tools/depends/target/pcre/Makefile b/tools/depends/target/pcre/Makefile
index 95e7c9cb3a..48273b9fda 100644
--- a/tools/depends/target/pcre/Makefile
+++ b/tools/depends/target/pcre/Makefile
@@ -1,44 +1,45 @@
-include ../../Makefile.include
-DEPS = ../../Makefile.include Makefile tvos-bitcode-fix.patch jit_aarch64.patch ios-clear_cache.patch ../../download-files.include
-
-# lib name, version
-LIBNAME=pcre
-VERSION=8.45
-SOURCE=$(LIBNAME)-$(VERSION)
-ARCHIVE=$(SOURCE).tar.bz2
-SHA512=91bff52eed4a2dfc3f3bfdc9c672b88e7e2ffcf3c4b121540af8a4ae8c1ce05178430aa6b8000658b9bb7b4252239357250890e20ceb84b79cdfcde05154061a
-include ../../download-files.include
+include ../../Makefile.include PCRE-VERSION ../../download-files.include
+DEPS = ../../Makefile.include Makefile PCRE-VERSION tvos-bitcode-fix.patch jit_aarch64.patch ios-clear_cache.patch ../../download-files.include
# configuration settings
-CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) .; ./configure --prefix=$(PREFIX) \
- --disable-shared --disable-stack-for-recursion \
- --enable-pcre8 --disable-pcre16 --disable-pcre32 \
- --enable-jit --enable-utf --enable-unicode-properties \
- --enable-newline-is-anycrlf
-
-
-LIBDYLIB=$(PLATFORM)/.libs/lib$(LIBNAME).a
+CMAKE_OPTIONS=-DPCRE_NEWLINE=ANYCRLF \
+ -DPCRE_NO_RECURSE=ON \
+ -DPCRE_SUPPORT_JIT=ON \
+ -DPCRE_SUPPORT_PCREGREP_JIT=ON \
+ -DPCRE_SUPPORT_UTF=ON \
+ -DPCRE_SUPPORT_UNICODE_PROPERTIES=ON \
+ -DPCRE_BUILD_PCREGREP=OFF \
+ -DPCRE_BUILD_TESTS=OFF \
+ -DPCRE_SUPPORT_LIBZ=OFF \
+ -DPCRE_SUPPORT_LIBBZ2=OFF
+
+ifeq ($(OS),android)
+ # CMake CheckFunctionExists incorrectly detects strtoq for android
+ CMAKE_OPTIONS+= -DHAVE_STRTOQ=0
+endif
+
+LIBDYLIB=$(PLATFORM)/build/$(BYPRODUCT)
all: .installed-$(PLATFORM)
-
$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE).$(HASH_TYPE) $(DEPS)
- rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
+ rm -rf $(PLATFORM); mkdir -p $(PLATFORM)
cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
+ cd $(PLATFORM); mkdir -p build
cd $(PLATFORM); patch -p1 -i ../tvos-bitcode-fix.patch
cd $(PLATFORM); patch -p1 -i ../jit_aarch64.patch
cd $(PLATFORM); patch -p1 -i ../ios-clear_cache.patch
- cd $(PLATFORM); $(CONFIGURE)
+ cd $(PLATFORM)/build; $(CMAKE) $(CMAKE_OPTIONS) ..
$(LIBDYLIB): $(PLATFORM)
- $(MAKE) -C $(PLATFORM)
+ $(MAKE) -C $(PLATFORM)/build
.installed-$(PLATFORM): $(LIBDYLIB)
- $(MAKE) -C $(PLATFORM) install
+ $(MAKE) -C $(PLATFORM)/build install
touch $@
clean:
- $(MAKE) -C $(PLATFORM) clean
+ $(MAKE) -C $(PLATFORM)/build clean
rm -f .installed-$(PLATFORM)
distclean::
diff --git a/tools/depends/target/pcre/PCRE-VERSION b/tools/depends/target/pcre/PCRE-VERSION
new file mode 100644
index 0000000000..a14dc5a583
--- /dev/null
+++ b/tools/depends/target/pcre/PCRE-VERSION
@@ -0,0 +1,5 @@
+LIBNAME=pcre
+VERSION=8.45
+ARCHIVE=$(LIBNAME)-$(VERSION).tar.bz2
+SHA512=91bff52eed4a2dfc3f3bfdc9c672b88e7e2ffcf3c4b121540af8a4ae8c1ce05178430aa6b8000658b9bb7b4252239357250890e20ceb84b79cdfcde05154061a
+BYPRODUCT=libpcre.a