diff options
| author | Stefano Sinigardi <stesinigardi@hotmail.com> | 2019-10-07 19:35:13 +0200 |
|---|---|---|
| committer | Curtis J Bezault <curtbezault@gmail.com> | 2019-10-07 10:35:13 -0700 |
| commit | 726c11148105a97aef39bec024fdb7c140b1b154 (patch) | |
| tree | 26bd2aee0c13a8351b259cc4ffffaf0efededb4e /ports/argtable2 | |
| parent | e86ff2cc54bda9e9ee322ab69141e7113d5c40a9 (diff) | |
| download | vcpkg-726c11148105a97aef39bec024fdb7c140b1b154.tar.gz vcpkg-726c11148105a97aef39bec024fdb7c140b1b154.zip | |
[vcpkg] fatal_error when patch fails to apply (#8087)
vcpkg will now fail on failure to apply patches except when using `--head`.
Diffstat (limited to 'ports/argtable2')
| -rw-r--r-- | ports/argtable2/CONTROL | 6 | ||||
| -rw-r--r-- | ports/argtable2/fix-install-dirs.patch | 48 | ||||
| -rw-r--r-- | ports/argtable2/portfile.cmake | 63 |
3 files changed, 57 insertions, 60 deletions
diff --git a/ports/argtable2/CONTROL b/ports/argtable2/CONTROL index df44602ee..69ddd4bc3 100644 --- a/ports/argtable2/CONTROL +++ b/ports/argtable2/CONTROL @@ -1,3 +1,3 @@ -Source: argtable2
-Version: 2.13-2
-Description: Argtable is an ANSI C library for parsing GNU style command line options with a minimum of fuss.
+Source: argtable2 +Version: 2.13-4 +Description: Argtable is an ANSI C library for parsing GNU style command line options with a minimum of fuss. diff --git a/ports/argtable2/fix-install-dirs.patch b/ports/argtable2/fix-install-dirs.patch index cc1b92543..5a9be4d72 100644 --- a/ports/argtable2/fix-install-dirs.patch +++ b/ports/argtable2/fix-install-dirs.patch @@ -1,24 +1,24 @@ -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index 3427487..a9b8be0 100644
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -1,5 +1,4 @@
--# for now, install in subdirectory of source directory by default
--SET( CMAKE_INSTALL_PREFIX .. )
-+include(GNUInstallDirs)
-
- IF( WIN32 )
- ADD_LIBRARY( argtable2 arg_dbl.c arg_end.c arg_file.c arg_int.c arg_lit.c arg_rem.c arg_str.c argtable2.c argtable2.h getopt.c getopt.h getopt1.c )
-@@ -7,5 +6,9 @@ ELSE( WIN32 )
- ADD_LIBRARY( argtable2 arg_date.c arg_dbl.c arg_end.c arg_file.c arg_int.c arg_lit.c arg_rem.c arg_rex.c arg_str.c argtable2.c argtable2.h getopt.c getopt.h getopt1.c )
- ENDIF( WIN32 )
-
--INSTALL( TARGETS argtable2 ARCHIVE DESTINATION lib)
--SET_TARGET_PROPERTIES( argtable2 PROPERTIES DEBUG_POSTFIX d )
-\ No newline at end of file
-+INSTALL(TARGETS argtable2
-+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
-+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
-+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
-+)
-+INSTALL(FILES argtable2.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 3427487..a9b8be0 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -1,5 +1,4 @@ +-# for now, install in subdirectory of source directory by default +-SET( CMAKE_INSTALL_PREFIX .. ) ++include(GNUInstallDirs) + + IF( WIN32 ) + ADD_LIBRARY( argtable2 arg_dbl.c arg_end.c arg_file.c arg_int.c arg_lit.c arg_rem.c arg_str.c argtable2.c argtable2.h getopt.c getopt.h getopt1.c ) +@@ -7,5 +6,9 @@ ELSE( WIN32 ) + ADD_LIBRARY( argtable2 arg_date.c arg_dbl.c arg_end.c arg_file.c arg_int.c arg_lit.c arg_rem.c arg_rex.c arg_str.c argtable2.c argtable2.h getopt.c getopt.h getopt1.c ) + ENDIF( WIN32 ) + +-INSTALL( TARGETS argtable2 ARCHIVE DESTINATION lib) +-SET_TARGET_PROPERTIES( argtable2 PROPERTIES DEBUG_POSTFIX d ) +\ No newline at end of file ++INSTALL(TARGETS argtable2 ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++) ++INSTALL(FILES argtable2.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) diff --git a/ports/argtable2/portfile.cmake b/ports/argtable2/portfile.cmake index 4cbec1278..c98dfcfb5 100644 --- a/ports/argtable2/portfile.cmake +++ b/ports/argtable2/portfile.cmake @@ -1,33 +1,30 @@ -include(vcpkg_common_functions)
-
-vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
-
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/argtable2-13)
-vcpkg_download_distfile(ARCHIVE
- URLS "http://prdownloads.sourceforge.net/argtable/argtable2-13.tar.gz"
- FILENAME "argtable-2.13.zip"
- SHA512 3d8303f3ba529e3241d918c0127a16402ece951efb964d14a06a3a7d29a252812ad3c44e96da28798871e9923e73a2cfe7ebc84139c1397817d632cae25c4585
-)
-
-vcpkg_extract_source_archive(${ARCHIVE})
-
-vcpkg_apply_patches(
- SOURCE_PATH ${SOURCE_PATH}
- PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-install-dirs.patch"
-)
-
-vcpkg_configure_cmake(
- SOURCE_PATH ${SOURCE_PATH}
- PREFER_NINJA
- OPTIONS
- -DCMAKE_DEBUG_POSTFIX=d
-)
-
-vcpkg_install_cmake()
-vcpkg_copy_pdbs()
-
-# Remove duplicate include installs
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
-
-# Handle copyright
-file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/argtable2 RENAME copyright)
+include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_download_distfile(ARCHIVE + URLS "http://prdownloads.sourceforge.net/argtable/argtable2-13.tar.gz" + FILENAME "argtable-2.13.zip" + SHA512 3d8303f3ba529e3241d918c0127a16402ece951efb964d14a06a3a7d29a252812ad3c44e96da28798871e9923e73a2cfe7ebc84139c1397817d632cae25c4585 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + fix-install-dirs.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCMAKE_DEBUG_POSTFIX=d +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) |
