[vcpkg baseline][graphqlparser] Deindexed (#40166)

This commit is contained in:
WangWeiLin-MV 2024-08-03 01:50:45 +08:00 committed by GitHub
parent b8ac6696e3
commit 247ab7f09a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 0 additions and 197 deletions

View File

@ -1,44 +0,0 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO graphql/libgraphqlparser
REF v0.7.0
SHA512 973292b164d0d2cfe453a2f01559dbdb1b9d22b6304f6a3aabf71e2c0a3e24ab69dfd72a086764ad5befecf0005620f8e86f552dacc324f9615a05f31de7cede
HEAD_REF master
PATCHES
win-cmake.patch
static-compile-fix.patch
remove-invalid-bison-directive.patch
)
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin")
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
DISABLE_PARALLEL_CONFIGURE
)
elseif(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
vcpkg_find_acquire_program(PYTHON2)
vcpkg_find_acquire_program(FLEX)
vcpkg_find_acquire_program(BISON)
get_filename_component(VCPKG_DOWNLOADS_PYTHON2_DIR "${PYTHON2}" DIRECTORY)
get_filename_component(VCPKG_DOWNLOADS_FLEX_DIR "${FLEX}" DIRECTORY)
get_filename_component(VCPKG_DOWNLOADS_BISON_DIR "${BISON}" DIRECTORY)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
DISABLE_PARALLEL_CONFIGURE
OPTIONS
-DVCPKG_DOWNLOADS_PYTHON2_DIR=${VCPKG_DOWNLOADS_PYTHON2_DIR}
-DVCPKG_DOWNLOADS_FLEX_DIR=${VCPKG_DOWNLOADS_FLEX_DIR}
-DVCPKG_DOWNLOADS_BISON_DIR=${VCPKG_DOWNLOADS_BISON_DIR}
)
endif()
vcpkg_cmake_install()
vcpkg_fixup_pkgconfig()
vcpkg_copy_pdbs()
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/graphqlparser/parser.tab.hpp" "${SOURCE_PATH}" "" IGNORE_UNCHANGED)
# Handle copyright
configure_file("${SOURCE_PATH}/LICENSE" "${CURRENT_PACKAGES_DIR}/share/graphqlparser/copyright" COPYONLY)

View File

@ -1,13 +0,0 @@
diff --git a/parser.ypp b/parser.ypp
index 2afbcac..baa9cab 100644
--- a/parser.ypp
+++ b/parser.ypp
@@ -7,8 +7,6 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
-%require "3"
-
%skeleton "lalr1.cc"
%defines

View File

@ -1,16 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 56741c2..313308a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -142,8 +142,11 @@ if (UNIX)
elseif(WIN32)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/graphqlparser.lib
DESTINATION lib)
+ # do not install pdb when static compilation.
+ if (BUILD_SHARED_LIBS)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/graphqlparser.pdb
DESTINATION bin)
+ endif()
endif()
IF (test)

View File

@ -1,16 +0,0 @@
{
"name": "graphqlparser",
"version": "0.7.0",
"port-version": 5,
"description": "A GraphQL query parser in C++ with C and C++ APIs",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}

View File

@ -1,100 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c4c8b3e..3373d82 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,9 +3,26 @@ PROJECT(libgraphqlparser C CXX)
SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" "${CMAKE_MODULE_PATH}")
-INCLUDE(version)
+IF(UNIX)
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
+ SET(FLEX_COMPILE_FLAGS "--header-file=lexer.h")
+ELSEIF(WIN32)
+ # If we're building this with vcpkg on Windows, let portfile.cmake tell us where it
+ # stored these tools. Otherwise these variables should be empty and we'll fall back
+ # to the normal CMake FIND_PACKAGE logic for each of these programs.
+ SET(CMAKE_PROGRAM_PATH
+ "${VCPKG_DOWNLOADS_PYTHON2_DIR}"
+ "${VCPKG_DOWNLOADS_FLEX_DIR}"
+ "${VCPKG_DOWNLOADS_BISON_DIR}"
+ "${CMAKE_PROGRAM_PATH}")
+
+ SET(FLEX_COMPILE_FLAGS "--header-file=lexer.h --wincompat")
+
+ # Let CMake figure out the exports for the SHARED library (DLL) on Windows.
+ SET(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
+ENDIF()
-SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
+INCLUDE(version)
FIND_PACKAGE(PythonInterp 2 REQUIRED)
IF (NOT PYTHON_VERSION_MAJOR EQUAL 2)
@@ -21,7 +38,7 @@ IF (BISON_FOUND)
ENDIF()
IF(FLEX_FOUND)
- FLEX_TARGET(GraphQLScanner lexer.lpp ${CMAKE_CURRENT_SOURCE_DIR}/lexer.cpp COMPILE_FLAGS "--header-file=lexer.h")
+ FLEX_TARGET(GraphQLScanner lexer.lpp ${CMAKE_CURRENT_SOURCE_DIR}/lexer.cpp COMPILE_FLAGS ${FLEX_COMPILE_FLAGS})
IF (BISON_FOUND)
ADD_FLEX_BISON_DEPENDENCY(GraphQLScanner graphqlparser)
ENDIF()
@@ -31,7 +48,7 @@ FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/c)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
-ADD_LIBRARY(graphqlparser SHARED
+ADD_LIBRARY(graphqlparser
JsonVisitor.cpp
${CMAKE_CURRENT_BINARY_DIR}/Ast.h
${CMAKE_CURRENT_BINARY_DIR}/Ast.cpp
@@ -87,7 +104,9 @@ ADD_SUBDIRECTORY(python)
OPTION(test "Build tests." OFF)
-INSTALL(DIRECTORY c ${CMAKE_CURRENT_BINARY_DIR}/c DESTINATION include/graphqlparser
+INSTALL(DIRECTORY c ${CMAKE_CURRENT_BINARY_DIR}/c
+ DESTINATION include/graphqlparser
+ CONFIGURATIONS Release
FILES_MATCHING PATTERN "*.h"
PATTERN "build" EXCLUDE)
@@ -103,9 +122,13 @@ INSTALL(FILES
position.hh
stack.hh
syntaxdefs.h
- DESTINATION include/graphqlparser)
+ DESTINATION include/graphqlparser
+ CONFIGURATIONS Release)
+
INSTALL(TARGETS graphqlparser
- LIBRARY DESTINATION lib)
+ ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin)
if (UNIX)
# generate pkgconfig file
@@ -116,6 +139,11 @@ if (UNIX)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libgraphqlparser.pc"
DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig")
endif()
+elseif(WIN32)
+ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/graphqlparser.lib
+ DESTINATION lib)
+ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/graphqlparser.pdb
+ DESTINATION bin)
endif()
IF (test)
@@ -126,6 +154,8 @@ IF (test)
ADD_CUSTOM_TARGET(memcheck
valgrind --leak-check=full --suppressions=./test/valgrind.supp --dsymutil=yes --error-exitcode=1 ./test/runTests >/dev/null
)
+ else()
+ ADD_CUSTOM_TARGET(runTests
+ ./test/runTests >/dev/null)
endif()
-
ENDIF()

View File

@ -422,10 +422,6 @@ glibmm:x64-windows-static-md=fail
glibmm:x64-windows-static=fail
graphicsmagick:arm64-uwp=fail
graphicsmagick:x64-uwp=fail
graphqlparser:arm-neon-android=fail
graphqlparser:arm64-android=fail
graphqlparser:arm64-osx=fail # python2 required
graphqlparser:x64-android=fail
# gsoap does not offer stable public source downloads
gsoap:x64-android=fail
gsoap:x64-windows = skip

View File

@ -3212,10 +3212,6 @@
"baseline": "1.3.14",
"port-version": 4
},
"graphqlparser": {
"baseline": "0.7.0",
"port-version": 5
},
"graphviz": {
"baseline": "10.0.1",
"port-version": 2