aboutsummaryrefslogtreecommitdiff
path: root/ports/nmap
diff options
context:
space:
mode:
authornicole mazzuca <83086508+strega-nil-ms@users.noreply.github.com>2021-07-14 14:45:18 -0500
committerGitHub <noreply@github.com>2021-07-14 12:45:18 -0700
commitd369df7ecf194005eaca46f07368779cd486badd (patch)
tree419f9861b796a7dc6e53646df13642c6c71108f2 /ports/nmap
parent932df5b8ede16b73fc5508445140d5b360ea0c68 (diff)
downloadvcpkg-d369df7ecf194005eaca46f07368779cd486badd.tar.gz
vcpkg-d369df7ecf194005eaca46f07368779cd486badd.zip
[rollup:2021-07-06] Rollup PR (#18838)
* [rollup:2021-07-06 1/8] PR #18272 (@strega-nil) [scripts-audit] vcpkg_from_* * [rollup:2021-07-06 2/8] PR #18319 (@strega-nil) [scripts-audit] add guidelines for cmake * [rollup 2021-07-06 3/8] PR #18410 (@mheyman) [vcpkg-cmake-config] documentation fix * [rollup:2021-07-06 4/8] PR #18488 (@strega-nil) [scripts-audit] vcpkg_execute_* * [rollup:2021-07-06 5/8] PR #18517 (@strega-nil) [scripts-audit] vcpkg_extract_source_archive * [rollup:2021-07-06 6/8] PR #18674 (@NancyLi1013) [vcpkg doc] Update examples * [rollup:2021-07-06 7/8] PR #18695 (@JackBoosY) [vcpkg] Update the minimum version of vcpkg * [rollup:2021-07-06 8/8] PR #18758 (@ras0219-msft) [vcpkg_from_git] Fix error if downloads folder does not exist * build docs! * fix bond:*-windows * fix nmap Co-authored-by: nicole mazzuca <mazzucan@outlook.com> Co-authored-by: Michael Heyman <Michael.Heyman@jhuapl.edu> Co-authored-by: NancyLi1013 <lirui09@beyondsoft.com> Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com> Co-authored-by: Robert Schumacher <ras0219@outlook.com>
Diffstat (limited to 'ports/nmap')
-rw-r--r--ports/nmap/CONTROL4
-rw-r--r--ports/nmap/portfile.cmake33
-rw-r--r--ports/nmap/vcpkg.json25
3 files changed, 42 insertions, 20 deletions
diff --git a/ports/nmap/CONTROL b/ports/nmap/CONTROL
deleted file mode 100644
index a703b496f..000000000
--- a/ports/nmap/CONTROL
+++ /dev/null
@@ -1,4 +0,0 @@
-Source: nmap
-Version: 7.70-4
-Build-Depends: winpcap (windows), libpcap (!windows), lua, openssl, python2 (windows), libssh2, zlib, pcre
-Description: A library for scanning network ports.
diff --git a/ports/nmap/portfile.cmake b/ports/nmap/portfile.cmake
index 829153310..c0252af8d 100644
--- a/ports/nmap/portfile.cmake
+++ b/ports/nmap/portfile.cmake
@@ -58,59 +58,60 @@ if(VCPKG_TARGET_IS_WINDOWS)
endif()
else()
set(ENV{LDFLAGS} "$ENV{LDFLAGS} -pthread")
- foreach(BUILD_TYPE rel dbg)
- file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BUILD_TYPE})
- file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BUILD_TYPE})
- # Since nmap makefile has strong relationshop with codes, copy codes to obj path
- vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BUILD_TYPE})
-
- endforeach()
set(OPTIONS --without-nmap-update --with-openssl=${CURRENT_INSTALLED_DIR} --with-libssh2=${CURRENT_INSTALLED_DIR} --with-libz=${CURRENT_INSTALLED_DIR} --with-libpcre=${CURRENT_INSTALLED_DIR})
message(STATUS "Building Options: ${OPTIONS}")
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL Release)
+ # Since nmap makefile has strong relationshop with codes, copy codes to obj path
message(STATUS "Configuring ${TARGET_TRIPLET}-rel")
- set(SOURCE_PATH_RELEASE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/nmap-7.70)
+ vcpkg_extract_source_archive(source_path_release
+ ARCHIVE "${ARCHIVE}"
+ WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel"
+ )
vcpkg_execute_required_process(
COMMAND "./configure" ${OPTIONS}
- WORKING_DIRECTORY ${SOURCE_PATH_RELEASE}
+ WORKING_DIRECTORY "${source_path_release}"
LOGNAME config-${TARGET_TRIPLET}-rel
)
message(STATUS "Building ${TARGET_TRIPLET}-rel")
vcpkg_execute_required_process(
COMMAND make
- WORKING_DIRECTORY ${SOURCE_PATH_RELEASE}
+ WORKING_DIRECTORY "${source_path_release}"
LOGNAME build-${TARGET_TRIPLET}-rel
)
message(STATUS "Installing ${TARGET_TRIPLET}-rel")
- file(INSTALL ${SOURCE_PATH_RELEASE}/nmap DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
+ file(INSTALL ${source_path_release}/nmap DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
endif()
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL Debug)
+ # Since nmap makefile has strong relationshop with codes, copy codes to obj path
message(STATUS "Configuring ${TARGET_TRIPLET}-dbg")
- set(SOURCE_PATH_DEBUG ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/nmap-7.70)
+ vcpkg_extract_source_archive(source_path_debug
+ ARCHIVE "${ARCHIVE}"
+ WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel"
+ )
vcpkg_execute_required_process(
COMMAND "./configure" ${OPTIONS}
- WORKING_DIRECTORY ${SOURCE_PATH_DEBUG}
+ WORKING_DIRECTORY ${source_path_debug}
LOGNAME config-${TARGET_TRIPLET}-dbg
)
message(STATUS "Building ${TARGET_TRIPLET}-dbg")
vcpkg_execute_required_process(
COMMAND make
- WORKING_DIRECTORY ${SOURCE_PATH_DEBUG}
+ WORKING_DIRECTORY ${source_path_debug}
LOGNAME build-${TARGET_TRIPLET}-dbg
)
message(STATUS "Installing ${TARGET_TRIPLET}-dbg")
- file(INSTALL ${SOURCE_PATH_RELEASE}/nmap DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools)
+ file(INSTALL ${source_path_release}/nmap DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools)
endif()
- set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/nmap-7.70)
+ set(SOURCE_PATH "${source_path_release}")
endif()
vcpkg_copy_pdbs()
diff --git a/ports/nmap/vcpkg.json b/ports/nmap/vcpkg.json
new file mode 100644
index 000000000..6aba23611
--- /dev/null
+++ b/ports/nmap/vcpkg.json
@@ -0,0 +1,25 @@
+{
+ "name": "nmap",
+ "version": "7.70",
+ "port-version": 5,
+ "description": "A library for scanning network ports.",
+ "dependencies": [
+ {
+ "name": "libpcap",
+ "platform": "!windows"
+ },
+ "libssh2",
+ "lua",
+ "openssl",
+ "pcre",
+ {
+ "name": "python2",
+ "platform": "windows"
+ },
+ {
+ "name": "winpcap",
+ "platform": "windows"
+ },
+ "zlib"
+ ]
+}