mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-18 15:43:06 +08:00
[libconfig] added msvc scanner patches
This commit is contained in:
parent
0e34f81390
commit
77b5193954
@ -65,5 +65,5 @@ install(
|
||||
)
|
||||
|
||||
if(NOT DISABLE_INSTALL_HEADERS)
|
||||
install(DIRECTORY "${COMMON_INCLUDES}/" DESTINATION include FILES_MATCHING PATTERN "*.h")
|
||||
install(DIRECTORY "${COMMON_INCLUDES}/" DESTINATION include)
|
||||
endif()
|
||||
|
108
ports/libconfig/fix-scanner-header-msvc-patch.patch
Normal file
108
ports/libconfig/fix-scanner-header-msvc-patch.patch
Normal file
@ -0,0 +1,108 @@
|
||||
diff --git a/lib/scanner.h b/lib/scanner.h
|
||||
index cdca3bb..1fc0509 100644
|
||||
--- a/lib/scanner.h
|
||||
+++ b/lib/scanner.h
|
||||
@@ -13,7 +13,7 @@
|
||||
#define FLEX_SCANNER
|
||||
#define YY_FLEX_MAJOR_VERSION 2
|
||||
#define YY_FLEX_MINOR_VERSION 5
|
||||
-#define YY_FLEX_SUBMINOR_VERSION 39
|
||||
+#define YY_FLEX_SUBMINOR_VERSION 35
|
||||
#if YY_FLEX_SUBMINOR_VERSION > 0
|
||||
#define FLEX_BETA
|
||||
#endif
|
||||
@@ -132,7 +132,15 @@ typedef void* yyscan_t;
|
||||
|
||||
/* Size of default input buffer. */
|
||||
#ifndef YY_BUF_SIZE
|
||||
+#ifdef __ia64__
|
||||
+/* On IA-64, the buffer size is 16k, not 8k.
|
||||
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
|
||||
+ * Ditto for the __ia64__ case accordingly.
|
||||
+ */
|
||||
+#define YY_BUF_SIZE 32768
|
||||
+#else
|
||||
#define YY_BUF_SIZE 16384
|
||||
+#endif /* __ia64__ */
|
||||
#endif
|
||||
|
||||
#ifndef YY_TYPEDEF_YY_BUFFER_STATE
|
||||
@@ -162,7 +170,7 @@ struct yy_buffer_state
|
||||
/* Number of characters read into yy_ch_buf, not including EOB
|
||||
* characters.
|
||||
*/
|
||||
- yy_size_t yy_n_chars;
|
||||
+ int yy_n_chars;
|
||||
|
||||
/* Whether we "own" the buffer - i.e., we know we created it,
|
||||
* and can realloc() it to grow it, and should free() it to
|
||||
@@ -206,13 +214,13 @@ void libconfig_yypop_buffer_state (yyscan_t yyscanner );
|
||||
|
||||
YY_BUFFER_STATE libconfig_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
|
||||
YY_BUFFER_STATE libconfig_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
|
||||
-YY_BUFFER_STATE libconfig_yy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
|
||||
+YY_BUFFER_STATE libconfig_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
|
||||
|
||||
void *libconfig_yyalloc (yy_size_t ,yyscan_t yyscanner );
|
||||
void *libconfig_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
|
||||
void libconfig_yyfree (void * ,yyscan_t yyscanner );
|
||||
|
||||
-#define libconfig_yywrap(yyscanner) 1
|
||||
+#define libconfig_yywrap(n) 1
|
||||
#define YY_SKIP_YYWRAP
|
||||
|
||||
#define yytext_ptr yytext_r
|
||||
@@ -221,7 +229,8 @@ void libconfig_yyfree (void * ,yyscan_t yyscanner );
|
||||
#define INITIAL 0
|
||||
#define COMMENT 1
|
||||
#define STRING 2
|
||||
-#define INCLUDE 3
|
||||
+#define INCLUDE_F 3
|
||||
+#define INCLUDE_D 4
|
||||
|
||||
#endif
|
||||
|
||||
@@ -260,7 +269,7 @@ FILE *libconfig_yyget_out (yyscan_t yyscanner );
|
||||
|
||||
void libconfig_yyset_out (FILE * out_str ,yyscan_t yyscanner );
|
||||
|
||||
-yy_size_t libconfig_yyget_leng (yyscan_t yyscanner );
|
||||
+int libconfig_yyget_leng (yyscan_t yyscanner );
|
||||
|
||||
char *libconfig_yyget_text (yyscan_t yyscanner );
|
||||
|
||||
@@ -268,10 +277,6 @@ int libconfig_yyget_lineno (yyscan_t yyscanner );
|
||||
|
||||
void libconfig_yyset_lineno (int line_number ,yyscan_t yyscanner );
|
||||
|
||||
-int libconfig_yyget_column (yyscan_t yyscanner );
|
||||
-
|
||||
-void libconfig_yyset_column (int column_no ,yyscan_t yyscanner );
|
||||
-
|
||||
YYSTYPE * libconfig_yyget_lval (yyscan_t yyscanner );
|
||||
|
||||
void libconfig_yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
|
||||
@@ -302,7 +307,12 @@ static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
|
||||
|
||||
/* Amount of stuff to slurp up with each read. */
|
||||
#ifndef YY_READ_BUF_SIZE
|
||||
+#ifdef __ia64__
|
||||
+/* On IA-64, the buffer size is 16k, not 8k */
|
||||
+#define YY_READ_BUF_SIZE 16384
|
||||
+#else
|
||||
#define YY_READ_BUF_SIZE 8192
|
||||
+#endif /* __ia64__ */
|
||||
#endif
|
||||
|
||||
/* Number of entries by which start-condition stack grows. */
|
||||
@@ -337,8 +347,8 @@ extern int libconfig_yylex \
|
||||
#undef YY_DECL
|
||||
#endif
|
||||
|
||||
-#line 207 "scanner.l"
|
||||
+#line 315 "scanner.l"
|
||||
|
||||
-#line 343 "scanner.h"
|
||||
+#line 353 "scanner.h"
|
||||
#undef libconfig_yyIN_HEADER
|
||||
#endif /* libconfig_yyHEADER_H */
|
1122
ports/libconfig/fix-scanner-source-msvc-patch.patch
Normal file
1122
ports/libconfig/fix-scanner-source-msvc-patch.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -8,6 +8,13 @@ vcpkg_from_github(
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES
|
||||
"${CMAKE_CURRENT_LIST_DIR}/fix-scanner-source-msvc-patch.patch"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/fix-scanner-header-msvc-patch.patch"
|
||||
)
|
||||
|
||||
set(DIRENT_HOME ${VCPKG_ROOT_DIR}/packages/dirent_${TARGET_TRIPLET})
|
||||
set(MIINTTYPES_HOME ${VCPKG_ROOT_DIR}/packages/msinttypes_${TARGET_TRIPLET})
|
||||
set(WIN_SRC ${SOURCE_PATH}/lib/win32)
|
||||
@ -24,11 +31,11 @@ else()
|
||||
set(BUILD_SHARED_LIBRARY OFF)
|
||||
endif()
|
||||
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS -DBUILD_SHARED=${BUILD_SHARED_LIBRARY}
|
||||
OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON
|
||||
)
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libconfig RENAME copyright)
|
||||
|
Loading…
Reference in New Issue
Block a user