diff options
| author | Phoebe <20694052+PhoebeHui@users.noreply.github.com> | 2020-08-02 07:14:16 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-01 16:14:16 -0700 |
| commit | 337893d706cb5ee66856c8209a52a0ede67236f3 (patch) | |
| tree | 7c697a8d6650fb3c6bac1420ec0026b391089a2c | |
| parent | 75bb11678e0ee4ecd6f1b21f4b436abbb04955b8 (diff) | |
| download | vcpkg-337893d706cb5ee66856c8209a52a0ede67236f3.tar.gz vcpkg-337893d706cb5ee66856c8209a52a0ede67236f3.zip | |
[argtable3] Update to 3.1.5 (#12421)
* [argtable3] Update to 3.1.5
* Replace CONTROL file with vcpkg.json
* Remove comma at the end of json file
* Remove bin folder on static build
| -rw-r--r-- | ports/argtable3/CONTROL | 4 | ||||
| -rw-r--r-- | ports/argtable3/fix-cmake.patch | 98 | ||||
| -rw-r--r-- | ports/argtable3/portfile.cmake | 25 | ||||
| -rw-r--r-- | ports/argtable3/vcpkg.json | 6 |
4 files changed, 14 insertions, 119 deletions
diff --git a/ports/argtable3/CONTROL b/ports/argtable3/CONTROL deleted file mode 100644 index f894b4fc5..000000000 --- a/ports/argtable3/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: argtable3
-Version: 2019-08-21
-Description: A single-file, ANSI C, command-line parsing library that parses GNU-style command-line options
-Homepage: www.argtable.org
diff --git a/ports/argtable3/fix-cmake.patch b/ports/argtable3/fix-cmake.patch deleted file mode 100644 index 320e6385e..000000000 --- a/ports/argtable3/fix-cmake.patch +++ /dev/null @@ -1,98 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 57bd7a1..e19e677 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -65,10 +65,6 @@ if(ARGTABLE3_ENABLE_CONAN AND EXISTS "${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath-link,${LINK_FLAGS}") - endif() - --if(ARGTABLE3_ENABLE_TESTS) -- enable_testing() --endif() -- - set(ARGTABLE3_AMALGAMATION_SRC_FILE ${PROJECT_SOURCE_DIR}/dist/argtable3.c) - set(ARGTABLE3_SRC_FILES - ${PROJECT_SOURCE_DIR}/src/arg_cmd.c -@@ -88,18 +84,11 @@ set(ARGTABLE3_SRC_FILES - ${PROJECT_SOURCE_DIR}/src/getopt_long.c - ) - --# Platform specific settings for installation --if(UNIX) -- include(GNUInstallDirs) -- set(ARGTABLE3_INSTALL_LIBDIR ${CMAKE_INSTALL_LIBDIR}) -- set(ARGTABLE3_INSTALL_INCLUDEDIR ${CMAKE_INSTALL_INCLUDEDIR}) -- set(ARGTABLE3_INSTALL_CMAKEDIR ${CMAKE_INSTALL_LIBDIR}/cmake/argtable3) --elseif(WIN32) -- set(ARGTABLE3_INSTALL_LIBDIR "lib") -- set(ARGTABLE3_INSTALL_INCLUDEDIR "include") -- set(ARGTABLE3_INSTALL_CMAKEDIR "cmake") --endif(UNIX) -- - add_subdirectory(src) --add_subdirectory(tests) -+ -+if(ARGTABLE3_ENABLE_TESTS) -+ enable_testing() -+ add_subdirectory(tests) -+endif() -+ - add_subdirectory(examples) -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 429b143..f45c071 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -28,9 +28,19 @@ - # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ################################################################################ - --set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c89 -Wpedantic") --set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") --set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wextra") -+include(GNUInstallDirs) -+ -+if(UNIX) -+ set(ARGTABLE3_INSTALL_CMAKEDIR ${CMAKE_INSTALL_LIBDIR}/cmake/argtable3) -+elseif(WIN32) -+ set(ARGTABLE3_INSTALL_CMAKEDIR "cmake") -+endif(UNIX) -+ -+if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang") -+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c89 -Wpedantic") -+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") -+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wextra") -+endif() - - add_definitions(-D_XOPEN_SOURCE=700) - -@@ -46,6 +56,7 @@ if(WIN32) - "${PROJECT_BINARY_DIR}/src/version.rc" - ) - add_library(argtable3 SHARED ${ARGTABLE3_SRC_FILES} "${PROJECT_BINARY_DIR}/src/version.rc") -+ target_compile_definitions(argtable3 INTERFACE argtable3_IMPORTS) - else() - add_library(argtable3 SHARED ${ARGTABLE3_SRC_FILES}) - endif() -@@ -57,8 +68,18 @@ target_include_directories(argtable3 PRIVATE ${PROJECT_SOURCE_DIR}/src) - set_target_properties(argtable3 argtable3_static PROPERTIES - VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH} - SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}) -- --install(TARGETS argtable3 EXPORT ${ARGTABLE3_PACKAGE_NAME}Config DESTINATION ${ARGTABLE3_INSTALL_LIBDIR}) --install(TARGETS argtable3_static EXPORT ${ARGTABLE3_PACKAGE_NAME}Config ARCHIVE DESTINATION ${ARGTABLE3_INSTALL_LIBDIR}) --install(FILES "${PROJECT_SOURCE_DIR}/src/argtable3.h" DESTINATION ${ARGTABLE3_INSTALL_INCLUDEDIR}) -+if(BUILD_SHARED_LIBS) -+install(TARGETS argtable3 -+ EXPORT ${ARGTABLE3_PACKAGE_NAME}Config -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) -+else() -+install(TARGETS argtable3_static -+ EXPORT ${ARGTABLE3_PACKAGE_NAME}Config -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) -+endif() -+install(FILES "${PROJECT_SOURCE_DIR}/src/argtable3.h" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) - install(EXPORT ${ARGTABLE3_PACKAGE_NAME}Config DESTINATION ${ARGTABLE3_INSTALL_CMAKEDIR}) diff --git a/ports/argtable3/portfile.cmake b/ports/argtable3/portfile.cmake index 18d994cc5..4e90c02e0 100644 --- a/ports/argtable3/portfile.cmake +++ b/ports/argtable3/portfile.cmake @@ -1,13 +1,9 @@ -include(vcpkg_common_functions)
-
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO argtable/argtable3
- REF bbc4ec20991e87ecf8dcf288aef777b55b78daa7
- SHA512 050f54ead2d029715d8f10e63ff555027ead61fbfa18bd955e3b99e080f9178ad5c41937c5d62477885143f27bb9e7e505a7120b95bfcd899a60719584191f1c
+ REF 1c1bb23b305c8cf349328fc0cacd7beb7a575ff4 # v3.1.5
+ SHA512 13150c8adc1eda107b6df65a2e276510a66bd912f6067d7cc72951735a4c20307144b04cda959cdd24f160da3810ba8bb35e48992ff4281e44ed2331d030fb1d
HEAD_REF master
- PATCHES
- fix-cmake.patch
)
vcpkg_configure_cmake(
@@ -29,14 +25,9 @@ elseif(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/${PORT}) vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
endif()
-file(COPY
- ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake
- DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}
-)
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
-file(REMOVE_RECURSE
- ${CURRENT_PACKAGES_DIR}/debug/include
-)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
vcpkg_replace_string(
@@ -46,8 +37,8 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) )
endif()
-# Handle copyright
-configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
+endif()
-# CMake integration test
-vcpkg_test_cmake(PACKAGE_NAME ${PORT})
+configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
diff --git a/ports/argtable3/vcpkg.json b/ports/argtable3/vcpkg.json new file mode 100644 index 000000000..37c2ec78b --- /dev/null +++ b/ports/argtable3/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "argtable3", + "version-string": "3.1.5", + "description": "A single-file, ANSI C, command-line parsing library that parses GNU-style command-line options", + "homepage": "www.argtable.org" +} |
