Closes #2120
This commit is contained in:
Julien Schueller 2022-01-04 13:50:02 +01:00
commit 15515f390c
12 changed files with 106 additions and 121 deletions

View file

@ -1,37 +0,0 @@
# Copyright (C) 2007-2009 LuaDist.
# Created by Peter Kapec <kapecp@gmail.com>
# Redistribution and use of this file is allowed according to the terms of the MIT license.
# For details see the COPYRIGHT file distributed with LuaDist.
# Note:
# Searching headers and libraries is very simple and is NOT as powerful as scripts
# distributed with CMake, because LuaDist defines directories to search for.
# Everyone is encouraged to contact the author with improvements. Maybe this file
# becomes part of CMake distribution sometimes.
# - Find pcre
# Find the native PCRE headers and libraries.
#
# PCRE_INCLUDE_DIRS - where to find pcre.h, etc.
# PCRE_LIBRARIES - List of libraries when using pcre.
# PCRE_FOUND - True if pcre found.
# Look for the header file.
FIND_PATH(PCRE_INCLUDE_DIR NAMES pcre.h)
# Look for the library.
FIND_LIBRARY(PCRE_LIBRARY NAMES pcre)
# Handle the QUIETLY and REQUIRED arguments and set PCRE_FOUND to TRUE if all listed variables are TRUE.
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE DEFAULT_MSG PCRE_LIBRARY PCRE_INCLUDE_DIR)
# Copy the results to the output variables.
IF(PCRE_FOUND)
SET(PCRE_LIBRARIES ${PCRE_LIBRARY})
SET(PCRE_INCLUDE_DIRS ${PCRE_INCLUDE_DIR})
ELSE(PCRE_FOUND)
SET(PCRE_LIBRARIES)
SET(PCRE_INCLUDE_DIRS)
ENDIF(PCRE_FOUND)
MARK_AS_ADVANCED(PCRE_INCLUDE_DIRS PCRE_LIBRARIES)

View file

@ -0,0 +1,21 @@
# - Find PCRE2
# Perl Compatible Regular Expressions
# https://www.pcre.org/
# The following variables are set:
# PCRE2_FOUND - System has the PCRE library
# PCRE2_LIBRARIES - The PCRE library file
# PCRE2_INCLUDE_DIRS - The folder with the PCRE headers
find_library(PCRE2_LIBRARY NAMES pcre2 pcre2-8)
find_path(PCRE2_INCLUDE_DIR pcre2.h)
set (PCRE2_LIBRARIES ${PCRE2_LIBRARY})
set (PCRE2_INCLUDE_DIRS ${PCRE2_INCLUDE_DIR})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(PCRE2 DEFAULT_MSG PCRE2_LIBRARIES PCRE2_INCLUDE_DIRS)
mark_as_advanced (
PCRE2_LIBRARY
PCRE2_INCLUDE_DIR)

View file

@ -84,7 +84,7 @@ export CXXFLAGS="$compileflags"
swigbasename=swig-$version
swigwinbasename=swigwin-$version
tarball=$swigbasename.tar.gz
pcre_tarball=`ls pcre-*.tar.*`
pcre_tarball=`ls pcre2-*.tar.*`
if ! test -f "$pcre_tarball"; then
echo "Could not find PCRE tarball. Please download a PCRE source tarball from http://www.pcre.org"

View file

@ -1,28 +0,0 @@
rem Workaround 'nuget install' not being reliable by retrying a few times
@echo off
rem initiate the retry number
set errorCode=1
set retryNumber=0
set maxRetries=5
:RESTORE
nuget install %*
rem problem?
IF ERRORLEVEL %errorCode% GOTO :RETRY
rem everything is fine!
@echo Installed nuget, retries: %reTryNumber%
GOTO :EXIT
:RETRY
@echo Oops, nuget restore exited with code %errorCode% - let us try again!
set /a retryNumber=%retryNumber%+1
IF %reTryNumber% LSS %maxRetries% (GOTO :RESTORE)
IF %retryNumber% EQU %maxRetries% (GOTO :ERR)
:ERR
@echo Sorry, we tried restoring nuget packages for %maxRetries% times and all attempts were unsuccessful!
EXIT /B 1
:EXIT

View file

@ -37,8 +37,8 @@ fi
echo "Looking for PCRE tarball..."
rm -rf pcre
pcre_tarball=`ls pcre-*.tar*`
test -n "$pcre_tarball" || bail "Could not find tarball matching pattern: pcre-*.tar*"
pcre_tarball=`ls pcre2-*.tar*`
test -n "$pcre_tarball" || bail "Could not find tarball matching pattern: pcre2-*.tar*"
test -f "$pcre_tarball" || bail "Could not find a single PCRE tarball. Found: $pcre_tarball"
echo "Extracting tarball: $pcre_tarball"