Hello community,

here is the log from the commit of package editorconfig-core-c for 
openSUSE:Factory checked in at 2018-12-10 12:27:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/editorconfig-core-c (Old)
 and      /work/SRC/openSUSE:Factory/.editorconfig-core-c.new.19453 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "editorconfig-core-c"

Mon Dec 10 12:27:07 2018 rev:6 rq:654387 version:0.12.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/editorconfig-core-c/editorconfig-core-c.changes  
2018-05-22 16:58:35.879570248 +0200
+++ 
/work/SRC/openSUSE:Factory/.editorconfig-core-c.new.19453/editorconfig-core-c.changes
       2018-12-10 12:27:10.546596661 +0100
@@ -1,0 +2,8 @@
+Tue Dec  4 21:12:48 UTC 2018 - Herbert Graeber <[email protected]>
+
+- update to 0.12.3:
+  * Bump required minimum cmake version to 2.8.12.
+  * Support pcre2 and drop support for pcre.
+- use pkconfig to find libpcre2
+
+-------------------------------------------------------------------

Old:
----
  editorconfig-core-c-0.12.2.tar.gz

New:
----
  editorconfig-core-c-0.12.3.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ editorconfig-core-c.spec ++++++
--- /var/tmp/diff_new_pack.ZOCrBz/_old  2018-12-10 12:27:10.898596310 +0100
+++ /var/tmp/diff_new_pack.ZOCrBz/_new  2018-12-10 12:27:10.898596310 +0100
@@ -12,24 +12,25 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 Name:           editorconfig-core-c
-Version:        0.12.2
+Version:        0.12.3
 Release:        0
 Summary:        EditorConfig core library written in C
 License:        BSD-2-Clause AND BSD-3-Clause
 Group:          Development/Libraries/C and C++
-Url:            http://editorconfig.org/
+URL:            http://editorconfig.org/
 Source:         
https://github.com/editorconfig/editorconfig-core-c/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
 Source99:       baselibs.conf
 Patch0:         editorconfig-core-c-0.12.1-install_paths.patch
 Patch1:         editorconfig-core-c-0.12.1-no_timestamp.patch
-BuildRequires:  cmake >= 2.8.7
+BuildRequires:  cmake >= 2.8.12
 BuildRequires:  doxygen
-BuildRequires:  pcre-devel >= 0.12.0
+BuildRequires:  pkgconfig
+BuildRequires:  pkgconfig(libpcre2-8)
 
 %description
 EditorConfig makes it easy to maintain the correct coding style when switching
@@ -116,5 +117,6 @@
 %{_libdir}/libeditorconfig.so
 %{_mandir}/man3/editorconfig*
 %{_libdir}/pkgconfig/editorconfig.pc
+%{_libdir}/cmake/EditorConfig
 
 %changelog

++++++ editorconfig-core-c-0.12.2.tar.gz -> editorconfig-core-c-0.12.3.tar.gz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/editorconfig-core-c-0.12.2/.travis.yml 
new/editorconfig-core-c-0.12.3/.travis.yml
--- old/editorconfig-core-c-0.12.2/.travis.yml  2018-03-15 22:02:13.000000000 
+0100
+++ new/editorconfig-core-c-0.12.3/.travis.yml  2018-11-16 01:10:15.000000000 
+0100
@@ -4,6 +4,13 @@
   - gcc
   - clang
 
+dist: xenial
+
+addons:
+  apt:
+    packages:
+     - libpcre2-dev
+
 # Settings to try
 env:
  - OPTIONS="-DCMAKE_BUILD_TYPE=Release -DBUILD_STATICALLY_LINKED_EXE=ON"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/editorconfig-core-c-0.12.2/CHANGELOG 
new/editorconfig-core-c-0.12.3/CHANGELOG
--- old/editorconfig-core-c-0.12.2/CHANGELOG    2018-03-15 22:02:13.000000000 
+0100
+++ new/editorconfig-core-c-0.12.3/CHANGELOG    2018-11-16 01:10:15.000000000 
+0100
@@ -1,3 +1,14 @@
+v0.12.3
+
+- Bump required minimum cmake version to 2.8.12.
+
+v0.12.2
+
+- Add support for pkgconfig.
+- Memory leaks and crash fixes.
+- Improve error messages.
+- Add CI on AppVeyor.
+
 v0.12.1
 
 - Fix an issue that libeditorconfig calls exit()---this should not be
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/editorconfig-core-c-0.12.2/CMakeLists.txt 
new/editorconfig-core-c-0.12.3/CMakeLists.txt
--- old/editorconfig-core-c-0.12.2/CMakeLists.txt       2018-03-15 
22:02:13.000000000 +0100
+++ new/editorconfig-core-c-0.12.3/CMakeLists.txt       2018-11-16 
01:10:15.000000000 +0100
@@ -24,16 +24,21 @@
 # POSSIBILITY OF SUCH DAMAGE.
 #
 
-cmake_minimum_required(VERSION 2.8.7)
-cmake_policy(VERSION 2.8.7)
+cmake_minimum_required(VERSION 2.8.12)
+cmake_policy(VERSION 2.8.12)
+# project() command sets VERSION variables (since CMake 3.0).
+cmake_policy(SET CMP0048 NEW)
 
-set (editorconfig_VERSION_MAJOR 0)
-set (editorconfig_VERSION_MINOR 12)
-set (editorconfig_VERSION_PATCH 2)
+project(editorconfig C)
 
-set (editorconfig_VERSION_SUFFIX "")
+# Must be placed after the call to project().
+set(PROJECT_VERSION_MAJOR 0)
+set(PROJECT_VERSION_MINOR 12)
+set(PROJECT_VERSION_PATCH 3)
+set(PROJECT_VERSION
+    
"${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
 
-project(editorconfig C)
+set(PROJECT_VERSION_SUFFIX "")
 
 include(GNUInstallDirs)
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMake_Modules")
@@ -58,9 +63,9 @@
 set(MAILING_LIST "[email protected]")
 
 set(CPACK_PACKAGE_VENDOR "EditorConfig Team")
-set(CPACK_PACKAGE_VERSION_MAJOR ${editorconfig_VERSION_MAJOR})
-set(CPACK_PACKAGE_VERSION_MINOR ${editorconfig_VERSION_MINOR})
-set(CPACK_PACKAGE_VERSION_PATCH ${editorconfig_VERSION_PATCH})
+set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
+set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
+set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
 set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
 set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
 set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/editorconfig-core-c-0.12.2/CMake_Modules/FindPCRE.cmake 
new/editorconfig-core-c-0.12.3/CMake_Modules/FindPCRE.cmake
--- old/editorconfig-core-c-0.12.2/CMake_Modules/FindPCRE.cmake 2018-03-15 
22:02:13.000000000 +0100
+++ new/editorconfig-core-c-0.12.3/CMake_Modules/FindPCRE.cmake 1970-01-01 
01:00:00.000000000 +0100
@@ -1,37 +0,0 @@
-# Copyright (C) 2007-2009 LuaDist.
-# Created by Peter Kapec <[email protected]>
-# 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)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/editorconfig-core-c-0.12.2/CMake_Modules/FindPCRE2.cmake 
new/editorconfig-core-c-0.12.3/CMake_Modules/FindPCRE2.cmake
--- old/editorconfig-core-c-0.12.2/CMake_Modules/FindPCRE2.cmake        
1970-01-01 01:00:00.000000000 +0100
+++ new/editorconfig-core-c-0.12.3/CMake_Modules/FindPCRE2.cmake        
2018-11-16 01:10:15.000000000 +0100
@@ -0,0 +1,38 @@
+# Copyright (C) 2018 Sven Strickroth <email AT cs-ware DOT de>
+# Copyright (C) 2007-2009 LuaDist.
+# Created by Peter Kapec <[email protected]>
+# 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 pcre2
+# Find the native PCRE2 headers and libraries.
+#
+# PCRE2_INCLUDE_DIRS   - where to find pcre.h, etc.
+# PCRE2_LIBRARIES      - List of libraries when using pcre.
+# PCRE2_FOUND  - True if pcre found.
+
+# Look for the header file.
+FIND_PATH(PCRE2_INCLUDE_DIR NAMES pcre2.h)
+
+# Look for the library.
+FIND_LIBRARY(PCRE2_LIBRARY NAMES pcre2-8)
+
+# Handle the QUIETLY and REQUIRED arguments and set PCRE2_FOUND to TRUE if all 
listed variables are TRUE.
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE2 DEFAULT_MSG PCRE2_LIBRARY 
PCRE2_INCLUDE_DIR)
+
+# Copy the results to the output variables.
+IF(PCRE2_FOUND)
+       SET(PCRE2_LIBRARIES ${PCRE2_LIBRARY})
+       SET(PCRE2_INCLUDE_DIRS ${PCRE2_INCLUDE_DIR})
+ELSE(PCRE2_FOUND)
+       SET(PCRE2_LIBRARIES)
+       SET(PCRE2_INCLUDE_DIRS)
+ENDIF(PCRE2_FOUND)
+
+MARK_AS_ADVANCED(PCRE2_INCLUDE_DIRS PCRE2_LIBRARIES)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/editorconfig-core-c-0.12.2/INSTALL.md 
new/editorconfig-core-c-0.12.3/INSTALL.md
--- old/editorconfig-core-c-0.12.2/INSTALL.md   2018-03-15 22:02:13.000000000 
+0100
+++ new/editorconfig-core-c-0.12.3/INSTALL.md   2018-11-16 01:10:15.000000000 
+0100
@@ -6,7 +6,7 @@
 Installing from a binary package
 ================================
 
-Binary packages can be downloaded 
[here](http://sourceforge.net/projects/editorconfig/files/EditorConfig-C-Core/).
+Windows binary packages can be downloaded 
[here](http://sourceforge.net/projects/editorconfig/files/EditorConfig-C-Core/).
 
 Windows users can also install EditorConfig core by 
[Chocolatey](http://chocolatey.org/packages/editorconfig.core).
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/editorconfig-core-c-0.12.2/README.md 
new/editorconfig-core-c-0.12.3/README.md
--- old/editorconfig-core-c-0.12.2/README.md    2018-03-15 22:02:13.000000000 
+0100
+++ new/editorconfig-core-c-0.12.3/README.md    2018-11-16 01:10:15.000000000 
+0100
@@ -23,17 +23,13 @@
 When developing an editor plugin for reading EditorConfig files, the
 EditorConfig core code can be used to locate and parse these files. This means
 the file locator, INI parser, and file globbing mechanisms can all be
-maintained in one code base, resulting in less code repitition between plugins.
+maintained in one code base, resulting in less code repetition between plugins.
 
 
 Installation
 ------------
 
-To install the EditorConfig core from source see the [INSTALL.md][] file.
-
-Binary installation packages for the EditorConfig core can be found on
-[SourceForge downloads page][downloads].
-
+See the [INSTALL.md][] file for instructions.
 
 Getting Help
 ------------
@@ -56,8 +52,8 @@
 Unless otherwise stated, all files are distributed under the Simplified BSD
 license. The inih(`src/lib/ini.c` and `src/lib/ini.h`) library is distributed
 under the New BSD license. `src/lib/utarray.h` is distributed under the Revised
-BSD License. The See LICENSE file for details. Some code in src/lib/misc.c is
-idstributed under their own license (see the source file for details). See the
+BSD License. The See LICENSE file for details. Some code in `src/lib/misc.c` is
+distributed under their own license (see the source file for details). See the
 LICENSE file for details.
 
 [EditorConfig]: http://editorconfig.org "EditorConfig Homepage"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/editorconfig-core-c-0.12.2/appveyor.yml 
new/editorconfig-core-c-0.12.3/appveyor.yml
--- old/editorconfig-core-c-0.12.2/appveyor.yml 2018-03-15 22:02:13.000000000 
+0100
+++ new/editorconfig-core-c-0.12.3/appveyor.yml 2018-11-16 01:10:15.000000000 
+0100
@@ -6,36 +6,36 @@
   CONFIG: Release
   ARCH: x64
   CMAKE_INSTALL_PREFIX: ..\build
-  PCRE_DEST: C:\projects\bin\%ARCH%-static\pcre
+  PCRE2_DEST: C:\projects\bin\%ARCH%-static\pcre2
   CORE_DEST: C:\projects\bin\%ARCH%-static\core
-  
+
 install:
   - cmake --version
   - git submodule init
   - git submodule update
   - cd C:\projects
-  # Download PCRE sources
-  - curl -o pcre.zip https://ftp.pcre.org/pub/pcre/pcre-8.41.zip
-  - 7z x -y pcre.zip > nul
-  - rename pcre-8.41 pcre
-  # Build and install PCRE
-  - mkdir %PCRE_DEST%
-  - cd %PCRE_DEST%
-  - cmake -G "%CMAKE_GENERATOR%" 
-DCMAKE_INSTALL_PREFIX="%CMAKE_INSTALL_PREFIX%" -DPCRE_STATIC_RUNTIME="ON" 
-DBUILD_SHARED_LIBS="OFF" -DPCRE_BUILD_PCRECPP=OFF -DPCRE_BUILD_PCREGREP=OFF 
-DPCRE_BUILD_TESTS=OFF C:\projects\pcre
-  - cd %PCRE_DEST%
-  - cmake --build %PCRE_DEST% --target install -- /p:Configuration=%CONFIG%
-  
+  # Download PCRE2 sources
+  - curl -o pcre2.zip https://ftp.pcre.org/pub/pcre/pcre2-10.32.zip
+  - 7z x -y pcre2.zip > nul
+  - rename pcre2-10.32 pcre2
+  # Build and install PCRE2
+  - mkdir %PCRE2_DEST%
+  - cd %PCRE2_DEST%
+  - cmake -G "%CMAKE_GENERATOR%" 
-DCMAKE_INSTALL_PREFIX="%CMAKE_INSTALL_PREFIX%" -DPCRE2_STATIC_RUNTIME="ON" 
-DBUILD_SHARED_LIBS="OFF" -DPCRE2_BUILD_PCRE2GREP="OFF" 
-DPCRE2_BUILD_TESTS="OFF" C:\projects\pcre2
+  - cd %PCRE2_DEST%
+  - cmake --build %PCRE2_DEST% --target install -- /p:Configuration=%CONFIG%
+
 build_script:
   # Build and install editorconfig-core-c
   - mkdir %CORE_DEST%
   - cd %CORE_DEST%
-  - cmake -G "%CMAKE_GENERATOR%" 
-DCMAKE_INSTALL_PREFIX="%CMAKE_INSTALL_PREFIX%" -DMSVC_MD="OFF" 
-DPCRE_STATIC="ON" C:\projects\editorconfig-core-c
+  - cmake -G "%CMAKE_GENERATOR%" 
-DCMAKE_INSTALL_PREFIX="%CMAKE_INSTALL_PREFIX%" -DMSVC_MD="OFF" 
-DPCRE2_STATIC="ON" C:\projects\editorconfig-core-c
   - cmake --build %CORE_DEST% --target install -- /p:Configuration=%CONFIG%
 
 test_script:
   # Run the core tests
   - cd %CORE_DEST%
-  - cmake --build %CORE_DEST% --target run_tests -- /p:Configuration=%CONFIG%
+  - ctest -E utf_8_char -VV --output-on-failure .
 
 on_failure:
   - echo. && echo. && echo. && echo "Tests for editorconfig-core-c failed. 
Here is their detailed output:" && echo. && echo. && echo.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/editorconfig-core-c-0.12.2/src/CMakeLists.txt 
new/editorconfig-core-c-0.12.3/src/CMakeLists.txt
--- old/editorconfig-core-c-0.12.2/src/CMakeLists.txt   2018-03-15 
22:02:13.000000000 +0100
+++ new/editorconfig-core-c-0.12.3/src/CMakeLists.txt   2018-11-16 
01:10:15.000000000 +0100
@@ -27,11 +27,11 @@
 include(CheckFunctionExists)
 include(CheckTypeSize)
 
-find_package(PCRE REQUIRED)
+find_package(PCRE2 REQUIRED)
 
-if(PCRE_FOUND)
-    include_directories(BEFORE ${PCRE_INCLUDE_DIRS})
-    option(PCRE_STATIC "Turn this option ON when linking to PCRE static 
library" OFF)
+if(PCRE2_FOUND)
+    include_directories(BEFORE ${PCRE2_INCLUDE_DIRS})
+    option(PCRE2_STATIC "Turn this option ON when linking to PCRE2 static 
library" OFF)
 endif()
 
 # config.h will be generated in src/auto, we should include it.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/editorconfig-core-c-0.12.2/src/bin/CMakeLists.txt 
new/editorconfig-core-c-0.12.3/src/bin/CMakeLists.txt
--- old/editorconfig-core-c-0.12.2/src/bin/CMakeLists.txt       2018-03-15 
22:02:13.000000000 +0100
+++ new/editorconfig-core-c-0.12.3/src/bin/CMakeLists.txt       2018-11-16 
01:10:15.000000000 +0100
@@ -39,6 +39,9 @@
     if(BUILD_STATICALLY_LINKED_EXE)
         # Add -static for linker if we want a statically linked executable
         set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
+
+        # libpcre2 might be dynamically linked against pthreads (at least on 
Ubuntu Xenial)
+        set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
     endif(BUILD_STATICALLY_LINKED_EXE)
 endif(CMAKE_COMPILER_IS_GNUCC)
 
@@ -54,8 +57,7 @@
 endif(BUILD_STATICALLY_LINKED_EXE)
 set_target_properties(editorconfig_bin PROPERTIES
     OUTPUT_NAME editorconfig
-    VERSION
-    
${editorconfig_VERSION_MAJOR}.${editorconfig_VERSION_MINOR}.${editorconfig_VERSION_PATCH})
+    VERSION ${PROJECT_VERSION})
 
 install(TARGETS editorconfig_bin
     RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/editorconfig-core-c-0.12.2/src/config.h.in 
new/editorconfig-core-c-0.12.3/src/config.h.in
--- old/editorconfig-core-c-0.12.2/src/config.h.in      2018-03-15 
22:02:13.000000000 +0100
+++ new/editorconfig-core-c-0.12.3/src/config.h.in      2018-11-16 
01:10:15.000000000 +0100
@@ -52,7 +52,8 @@
 #cmakedefine CMAKE_COMPILER_IS_GNUCC
 #cmakedefine MSVC
 
-#cmakedefine PCRE_STATIC
+#cmakedefine PCRE2_STATIC
+#define PCRE2_CODE_UNIT_WIDTH 8
 
 /* For gcc, we define _GNU_SOURCE to use gcc extensions */
 #ifdef CMAKE_COMPILER_IS_GNUCC
@@ -71,10 +72,10 @@
 # define _Bool signed char
 #endif
 
-#define editorconfig_VERSION_MAJOR @editorconfig_VERSION_MAJOR@
-#define editorconfig_VERSION_MINOR @editorconfig_VERSION_MINOR@
-#define editorconfig_VERSION_PATCH @editorconfig_VERSION_PATCH@
-#define editorconfig_VERSION_SUFFIX "@editorconfig_VERSION_SUFFIX@"
+#define EC_VERSION_MAJOR @PROJECT_VERSION_MAJOR@
+#define EC_VERSION_MINOR @PROJECT_VERSION_MINOR@
+#define EC_VERSION_PATCH @PROJECT_VERSION_PATCH@
+#define EC_VERSION_SUFFIX "@PROJECT_VERSION_SUFFIX@"
 
 
 #endif /* !__CONFIG_H__ */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/editorconfig-core-c-0.12.2/src/lib/CMakeLists.txt 
new/editorconfig-core-c-0.12.3/src/lib/CMakeLists.txt
--- old/editorconfig-core-c-0.12.2/src/lib/CMakeLists.txt       2018-03-15 
22:02:13.000000000 +0100
+++ new/editorconfig-core-c-0.12.3/src/lib/CMakeLists.txt       2018-11-16 
01:10:15.000000000 +0100
@@ -36,28 +36,37 @@
 set_target_properties(editorconfig_shared PROPERTIES
     OUTPUT_NAME editorconfig
     SOVERSION 0
-    VERSION
-    
${editorconfig_VERSION_MAJOR}.${editorconfig_VERSION_MINOR}.${editorconfig_VERSION_PATCH})
+    VERSION ${PROJECT_VERSION})
 
 # We need to link Shwapi since we use PathIsRelative
 if(WIN32)
     target_link_libraries(editorconfig_shared Shlwapi)
 endif()
-target_link_libraries(editorconfig_shared ${PCRE_LIBRARIES})
+target_link_libraries(editorconfig_shared ${PCRE2_LIBRARIES})
 
 add_library(editorconfig_static STATIC ${editorconfig_LIBSRCS})
 set_target_properties(editorconfig_static PROPERTIES
     OUTPUT_NAME editorconfig_static
-    VERSION
-    
${editorconfig_VERSION_MAJOR}.${editorconfig_VERSION_MINOR}.${editorconfig_VERSION_PATCH})
+    VERSION ${PROJECT_VERSION})
 
 # We need to link Shwapi since we use PathIsRelative
 if(WIN32)
     target_link_libraries(editorconfig_static Shlwapi)
 endif()
-target_link_libraries(editorconfig_static ${PCRE_LIBRARIES})
+target_link_libraries(editorconfig_static ${PCRE2_LIBRARIES})
+
+# EditorConfig package name for find_package() and the CMake package registry.
+# On UNIX the system registry is usually just "lib/cmake/<package>".
+# See cmake-package(7) for details.
+set(config_package_name "EditorConfig")
+set(editorconfig_CONFIG_NAME "${config_package_name}Config")
+set(editorconfig_CONFIG_VERSION_NAME "${config_package_name}ConfigVersion")
+set(editorconfig_CONFIG_EXPORT_NAME "${config_package_name}Targets")
+set(editorconfig_CONFIG_INSTALL_LIBDIR
+    "${CMAKE_INSTALL_LIBDIR}/cmake/${config_package_name}")
 
 install(TARGETS editorconfig_shared editorconfig_static
+    EXPORT ${editorconfig_CONFIG_EXPORT_NAME}
     RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
     LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
     ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
@@ -69,3 +78,21 @@
 
 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/editorconfig.pc
     DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+
+include(CMakePackageConfigHelpers)
+
+configure_package_config_file(${editorconfig_CONFIG_NAME}.cmake.in
+    ${CMAKE_CURRENT_BINARY_DIR}/${editorconfig_CONFIG_NAME}.cmake
+    INSTALL_DESTINATION ${editorconfig_CONFIG_INSTALL_LIBDIR})
+
+write_basic_package_version_file(
+    ${CMAKE_CURRENT_BINARY_DIR}/${editorconfig_CONFIG_VERSION_NAME}.cmake
+    COMPATIBILITY AnyNewerVersion)
+
+install(FILES
+    ${CMAKE_CURRENT_BINARY_DIR}/${editorconfig_CONFIG_NAME}.cmake
+    ${CMAKE_CURRENT_BINARY_DIR}/${editorconfig_CONFIG_VERSION_NAME}.cmake
+    DESTINATION ${editorconfig_CONFIG_INSTALL_LIBDIR})
+
+install(EXPORT ${editorconfig_CONFIG_EXPORT_NAME}
+    DESTINATION ${editorconfig_CONFIG_INSTALL_LIBDIR})
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/editorconfig-core-c-0.12.2/src/lib/EditorConfigConfig.cmake.in 
new/editorconfig-core-c-0.12.3/src/lib/EditorConfigConfig.cmake.in
--- old/editorconfig-core-c-0.12.2/src/lib/EditorConfigConfig.cmake.in  
1970-01-01 01:00:00.000000000 +0100
+++ new/editorconfig-core-c-0.12.3/src/lib/EditorConfigConfig.cmake.in  
2018-11-16 01:10:15.000000000 +0100
@@ -0,0 +1,3 @@
+@PACKAGE_INIT@
+
+include("${CMAKE_CURRENT_LIST_DIR}/@[email protected]")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/editorconfig-core-c-0.12.2/src/lib/ec_glob.c 
new/editorconfig-core-c-0.12.3/src/lib/ec_glob.c
--- old/editorconfig-core-c-0.12.2/src/lib/ec_glob.c    2018-03-15 
22:02:13.000000000 +0100
+++ new/editorconfig-core-c-0.12.3/src/lib/ec_glob.c    2018-11-16 
01:10:15.000000000 +0100
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2014 Hong Xu <hong AT topbug DOT net>
+ * Copyright (c) 2018 Sven Strickroth <email AT cs-ware DOT de>
  * All rights reserved.
  * 
  * Redistribution and use in source and binary forms, with or without
@@ -28,7 +29,7 @@
 
 #include <ctype.h>
 #include <string.h>
-#include <pcre.h>
+#include <pcre2.h>
 
 #define oom() { return -1; }
 #include "utarray.h"
@@ -70,14 +71,13 @@
     char *                    pcre_str_end;
     int                       brace_level = 0;
     _Bool                     is_in_bracket = 0;
-    const char *              error_msg;
-    int                       erroffset;
-    pcre *                    re;
+    int                       error_code;
+    size_t                    erroffset;
+    pcre2_code *              re;
     int                       rc;
-    int *                     pcre_result;
-    size_t                    pcre_result_len;
+    size_t *                  pcre_result;
+    pcre2_match_data *        pcre_match_data;
     char                      l_pattern[2 * PATTERN_MAX];
-    int                       pattern_length = strlen(pattern);
     _Bool                     are_brace_paired;
     UT_array *                nums;     /* number ranges */
     int                       ret = 0;
@@ -107,8 +107,8 @@
     }
 
     /* used to search for {num1..num2} case */
-    re = pcre_compile("^\\{[\\+\\-]?\\d+\\.\\.[\\+\\-]?\\d+\\}$", 0,
-            &error_msg, &erroffset, NULL);
+    re = pcre2_compile("^\\{[\\+\\-]?\\d+\\.\\.[\\+\\-]?\\d+\\}$", 
PCRE2_ZERO_TERMINATED, 0,
+            &error_code, &erroffset, NULL);
     if (!re)        /* failed to compile */
         return -1;
 
@@ -248,11 +248,13 @@
                 {
                     const char *        double_dots;
                     int_pair            pair;
-                    int                 pcre_res[3];
+
+                    pcre2_match_data *  match_data = 
pcre2_match_data_create_from_pattern(re, NULL);
 
                     /* Check the case of {num1..num2} */
-                    rc = pcre_exec(re, NULL, c, (int) (cc - c + 1), 0, 0,
-                            pcre_res, 3);
+                    rc = pcre2_match(re, c, cc - c + 1, 0, 0, match_data, 
NULL);
+
+                    pcre2_match_data_free(match_data);
 
                     if (rc < 0)    /* not {num1..num2} case */
                     {
@@ -322,9 +324,9 @@
 
     *(p_pcre ++) = '$';
 
-    pcre_free(re); /* ^\\d+\\.\\.\\d+$ */
+    pcre2_code_free(re); /* ^\\d+\\.\\.\\d+$ */
 
-    re = pcre_compile(pcre_str, 0, &error_msg, &erroffset, NULL);
+    re = pcre2_compile(pcre_str, PCRE2_ZERO_TERMINATED, 0, &error_code, 
&erroffset, NULL);
 
     if (!re)        /* failed to compile */
     {
@@ -332,27 +334,25 @@
         return -1;
     }
 
-    pcre_result_len = 3 * (utarray_len(nums) + 1);
-    pcre_result = (int *) calloc(pcre_result_len, sizeof(int_pair));
-    rc = pcre_exec(re, NULL, string, (int) strlen(string), 0, 0,
-            pcre_result, pcre_result_len);
+    pcre_match_data = pcre2_match_data_create_from_pattern(re, NULL);
+    rc = pcre2_match(re, string, strlen(string), 0, 0, pcre_match_data, NULL);
 
     if (rc < 0)     /* failed to match */
     {
-        int         ret;
-        if (rc == PCRE_ERROR_NOMATCH)
+        if (rc == PCRE2_ERROR_NOMATCH)
             ret = EC_GLOB_NOMATCH;
         else
             ret = rc;
 
-        pcre_free(re);
-        free(pcre_result);
+        pcre2_code_free(re);
+        pcre2_match_data_free(pcre_match_data);
         utarray_free(nums);
 
         return ret;
     }
 
     /* Whether the numbers are in the desired range? */
+    pcre_result = pcre2_get_ovector_pointer(pcre_match_data);
     for(p = (int_pair *) utarray_front(nums), i = 1; p;
             ++ i, p = (int_pair *) utarray_next(nums, p))
     {
@@ -376,8 +376,8 @@
     if (p != NULL)      /* numbers not matched */
         ret = EC_GLOB_NOMATCH;
 
-    pcre_free(re);
-    free(pcre_result);
+    pcre2_code_free(re);
+    pcre2_match_data_free(pcre_match_data);
     utarray_free(nums);
 
     return ret;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/editorconfig-core-c-0.12.2/src/lib/editorconfig.c 
new/editorconfig-core-c-0.12.3/src/lib/editorconfig.c
--- old/editorconfig-core-c-0.12.2/src/lib/editorconfig.c       2018-03-15 
22:02:13.000000000 +0100
+++ new/editorconfig-core-c-0.12.3/src/lib/editorconfig.c       2018-11-16 
01:10:15.000000000 +0100
@@ -541,11 +541,11 @@
 void editorconfig_get_version(int* major, int* minor, int* patch)
 {
     if (major)
-        *major = editorconfig_VERSION_MAJOR;
+        *major = EC_VERSION_MAJOR;
     if (minor)
-        *minor = editorconfig_VERSION_MINOR;
+        *minor = EC_VERSION_MINOR;
     if (patch)
-        *patch = editorconfig_VERSION_PATCH;
+        *patch = EC_VERSION_PATCH;
 }
 
 /*
@@ -554,5 +554,5 @@
 EDITORCONFIG_EXPORT
 const char* editorconfig_get_version_suffix(void)
 {
-    return editorconfig_VERSION_SUFFIX;
+    return EC_VERSION_SUFFIX;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/editorconfig-core-c-0.12.2/src/lib/editorconfig.pc.in 
new/editorconfig-core-c-0.12.3/src/lib/editorconfig.pc.in
--- old/editorconfig-core-c-0.12.2/src/lib/editorconfig.pc.in   2018-03-15 
22:02:13.000000000 +0100
+++ new/editorconfig-core-c-0.12.3/src/lib/editorconfig.pc.in   2018-11-16 
01:10:15.000000000 +0100
@@ -1,9 +1,9 @@
 prefix=@CMAKE_INSTALL_PREFIX@
 libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
-includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/editorconfig
+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
  
 Name: editorconfig
 Description: Library handling EditorConfig files, a file format defining 
coding styles in projects.
-Version: 
@editorconfig_VERSION_MAJOR@.@editorconfig_VERSION_MINOR@.@editorconfig_VERSION_PATCH@
+Version: @PROJECT_VERSION@
 Libs: -L${libdir} -leditorconfig
 Cflags: -I${includedir}


Reply via email to