mirror of
https://github.com/microsoft/vcpkg.git
synced 2026-01-18 01:11:23 +01:00
[iniparser] update to 4.2.6 (#47200)
This commit is contained in:
@@ -1,54 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
|
||||
project(iniparser LANGUAGES C)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
set(CMAKE_DISABLE_SOURCE_CHANGES ON)
|
||||
set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
|
||||
|
||||
# iniparser.pc
|
||||
set(prefix ${CMAKE_INSTALL_PREFIX})
|
||||
set(libdir ${prefix}/${CMAKE_INSTALL_LIBDIR})
|
||||
set(includedir ${prefix}/${CMAKE_INSTALL_INCLUDEDIR})
|
||||
set(datarootdir ${prefix}/${CMAKE_INSTALL_DATAROOTDIR})
|
||||
set(datadir ${prefix}/${CMAKE_INSTALL_DATADIR})
|
||||
|
||||
configure_file(iniparser.pc ${CMAKE_CURRENT_BINARY_DIR}/iniparser.pc)
|
||||
|
||||
set(iniparser_sources
|
||||
src/dictionary.c
|
||||
src/iniparser.c
|
||||
)
|
||||
|
||||
add_library(iniparser ${iniparser_sources})
|
||||
|
||||
target_include_directories(iniparser
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/src>
|
||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||
)
|
||||
|
||||
target_compile_definitions(iniparser
|
||||
PRIVATE
|
||||
$<$<C_COMPILER_ID:MSVC>:_CRT_SECURE_NO_WARNINGS>
|
||||
)
|
||||
|
||||
install(TARGETS iniparser EXPORT unofficial-iniparser-config)
|
||||
|
||||
install(
|
||||
EXPORT unofficial-iniparser-config
|
||||
NAMESPACE unofficial::iniparser::
|
||||
DESTINATION share/unofficial-iniparser
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
|
||||
)
|
||||
|
||||
install(
|
||||
FILES src/dictionary.h src/iniparser.h
|
||||
DESTINATION include
|
||||
)
|
||||
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/iniparser.pc
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
|
||||
)
|
||||
@@ -3,24 +3,23 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO ndevilla/iniparser
|
||||
REF f858275f7f307eecba84c2f5429483f9f28007f8
|
||||
SHA512 48c80b2163f86d8ca0f3253128d8528214e2f0680b4bceb686180c01b29cd2a0c3b9d6e7156a8e28649b14bc1d8a51b34c2d3d258013b35f69aaf6c3ded9ecdc
|
||||
REF v${VERSION}
|
||||
SHA512 4057e65011efb005fd212c2316580b9d5d6b835f0a507001324e5ca49ad0e7656508a915484c24cd5b57aece11a9298feb5904fec3535c5191fff62706b15aa9
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
win32_ssize_t.patch
|
||||
)
|
||||
|
||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DBUILD_EXAMPLES=OFF
|
||||
-DBUILD_DOCS=OFF
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-${PORT})
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH /lib/cmake/iniparser)
|
||||
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"name": "iniparser",
|
||||
"version-date": "2020-04-06",
|
||||
"port-version": 5,
|
||||
"version": "4.2.6",
|
||||
"description": "C library for parsing INI-style files",
|
||||
"homepage": "https://github.com/ndevilla/iniparser",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
diff --git a/src/dictionary.c b/src/dictionary.c
|
||||
index cb7ccd4..7985ab3 100644
|
||||
--- a/src/dictionary.c
|
||||
+++ b/src/dictionary.c
|
||||
@@ -18,7 +18,6 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
-#include <unistd.h>
|
||||
|
||||
/** Maximum value size for integers and doubles. */
|
||||
#define MAXVALSZ 1024
|
||||
diff --git a/src/dictionary.h b/src/dictionary.h
|
||||
index d04b6ce..929ae17 100644
|
||||
--- a/src/dictionary.h
|
||||
+++ b/src/dictionary.h
|
||||
@@ -21,7 +21,12 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
+#ifdef _MSC_VER
|
||||
+#include <BaseTsd.h>
|
||||
+typedef SSIZE_T ssize_t;
|
||||
+#else
|
||||
#include <unistd.h>
|
||||
+#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -3921,8 +3921,8 @@
|
||||
"port-version": 0
|
||||
},
|
||||
"iniparser": {
|
||||
"baseline": "2020-04-06",
|
||||
"port-version": 5
|
||||
"baseline": "4.2.6",
|
||||
"port-version": 0
|
||||
},
|
||||
"inipp": {
|
||||
"baseline": "1.0.13",
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "6ec2e2bca8b1afc5a4eea3cc3d4f773379f6aee7",
|
||||
"version": "4.2.6",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "1f0fd9b0b224858a2bba125fae9cbfaa899e954b",
|
||||
"version-date": "2020-04-06",
|
||||
|
||||
Reference in New Issue
Block a user