early-access version 2853
This commit is contained in:
1986
externals/vcpkg/ports/nmap/fix-msvc-prj.patch
vendored
Executable file
1986
externals/vcpkg/ports/nmap/fix-msvc-prj.patch
vendored
Executable file
File diff suppressed because it is too large
Load Diff
39
externals/vcpkg/ports/nmap/fix-snprintf.patch
vendored
Executable file
39
externals/vcpkg/ports/nmap/fix-snprintf.patch
vendored
Executable file
@@ -0,0 +1,39 @@
|
||||
diff --git a/libdnet-stripped/include/dnet_winconfig.h b/libdnet-stripped/include/dnet_winconfig.h
|
||||
index e41907c..82bc595 100644
|
||||
--- a/libdnet-stripped/include/dnet_winconfig.h
|
||||
+++ b/libdnet-stripped/include/dnet_winconfig.h
|
||||
@@ -277,7 +277,7 @@ int strlcpy(char *, const char *, int);
|
||||
char *strsep(char **, const char *);
|
||||
#endif
|
||||
|
||||
-#define snprintf _snprintf
|
||||
+//#define snprintf _snprintf
|
||||
|
||||
/* Without this, Windows will give us all sorts of crap about using functions
|
||||
like strcpy() even if they are done safely */
|
||||
diff --git a/nbase/nbase.h b/nbase/nbase.h
|
||||
index 0ecd9bc..c0eb395 100644
|
||||
--- a/nbase/nbase.h
|
||||
+++ b/nbase/nbase.h
|
||||
@@ -359,7 +359,7 @@ extern "C" int vsnprintf (char *, size_t, const char *, va_list);
|
||||
#define putenv _putenv
|
||||
|
||||
#if !defined(__GNUC__)
|
||||
-#define snprintf _snprintf
|
||||
+//#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
#define strcasecmp _stricmp
|
||||
diff --git a/nse_libssh2.cc b/nse_libssh2.cc
|
||||
index bf721b6..1fafe7f 100644
|
||||
--- a/nse_libssh2.cc
|
||||
+++ b/nse_libssh2.cc
|
||||
@@ -58,7 +58,7 @@ struct ssh_userdata {
|
||||
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
-#define snprintf c99_snprintf
|
||||
+//#define snprintf c99_snprintf
|
||||
#define vsnprintf c99_vsnprintf
|
||||
|
||||
__inline int c99_vsnprintf(char *outBuf, size_t size, const char *format, va_list ap) {
|
||||
16
externals/vcpkg/ports/nmap/fix-ssize_t.patch
vendored
Executable file
16
externals/vcpkg/ports/nmap/fix-ssize_t.patch
vendored
Executable file
@@ -0,0 +1,16 @@
|
||||
diff --git a/libdnet-stripped/include/dnet/os.h b/libdnet-stripped/include/dnet/os.h
|
||||
index 55a21b9..544ebd8 100644
|
||||
--- a/libdnet-stripped/include/dnet/os.h
|
||||
+++ b/libdnet-stripped/include/dnet/os.h
|
||||
@@ -23,7 +23,11 @@
|
||||
typedef u_short uint16_t;
|
||||
typedef u_int uint32_t;
|
||||
# ifndef __CYGWIN__
|
||||
+#ifdef _WIN64
|
||||
+ typedef __int64 ssize_t;
|
||||
+#else
|
||||
typedef long ssize_t;
|
||||
+#endif
|
||||
# endif
|
||||
#else
|
||||
# include <sys/param.h>
|
||||
120
externals/vcpkg/ports/nmap/portfile.cmake
vendored
Executable file
120
externals/vcpkg/ports/nmap/portfile.cmake
vendored
Executable file
@@ -0,0 +1,120 @@
|
||||
# nmap is a tools, so ignor POST_CHECK
|
||||
SET(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
||||
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://nmap.org/dist/nmap-7.70.tar.bz2"
|
||||
FILENAME "nmap-7.70.tar.bz2"
|
||||
SHA512 084c148b022ff6550e269d976d0077f7932a10e2ef218236fe13aa3a70b4eb6506df03329868fc68cb3ce78e4360b200f5a7a491d3145028fed679ef1c9ecae5
|
||||
)
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
vcpkg_extract_source_archive_ex(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
ARCHIVE ${ARCHIVE}
|
||||
PATCHES
|
||||
fix-snprintf.patch
|
||||
fix-ssize_t.patch
|
||||
fix-msvc-prj.patch
|
||||
)
|
||||
list(APPEND DEL_PROJS "libpcap" "libpcre" "libssh2" "libz")
|
||||
foreach (DEL_PROJ ${DEL_PROJS})
|
||||
file(REMOVE_RECURSE ${SOURCE_PATH}/${DEL_PROJ})
|
||||
endforeach()
|
||||
|
||||
# Clear
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND "devenv.exe"
|
||||
"nmap.sln"
|
||||
/Clean
|
||||
WORKING_DIRECTORY ${SOURCE_PATH}/mswin32
|
||||
)
|
||||
|
||||
# Uprade
|
||||
message(STATUS "Upgrade solution...")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND "devenv.exe"
|
||||
"nmap.sln"
|
||||
/Upgrade
|
||||
WORKING_DIRECTORY ${SOURCE_PATH}/mswin32
|
||||
LOGNAME upgrade-Packet-${TARGET_TRIPLET}
|
||||
)
|
||||
# Build
|
||||
vcpkg_build_msbuild(
|
||||
PROJECT_PATH ${SOURCE_PATH}/mswin32/nmap.vcxproj
|
||||
PLATFORM ${MSBUILD_PLATFORM}
|
||||
USE_VCPKG_INTEGRATION
|
||||
)
|
||||
|
||||
# Install
|
||||
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL Release)
|
||||
file(INSTALL ${SOURCE_PATH}/mswin32/Release/nmap.exe
|
||||
${SOURCE_PATH}/mswin32/Release/nmap.pdb
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
|
||||
endif()
|
||||
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL Debug)
|
||||
file(INSTALL ${SOURCE_PATH}/mswin32/Debug/nmap.exe
|
||||
${SOURCE_PATH}/mswin32/Debug/nmap.pdb
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
|
||||
endif()
|
||||
else()
|
||||
set(ENV{LDFLAGS} "$ENV{LDFLAGS} -pthread")
|
||||
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")
|
||||
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}"
|
||||
LOGNAME config-${TARGET_TRIPLET}-rel
|
||||
)
|
||||
|
||||
message(STATUS "Building ${TARGET_TRIPLET}-rel")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND make
|
||||
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)
|
||||
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")
|
||||
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}
|
||||
LOGNAME config-${TARGET_TRIPLET}-dbg
|
||||
)
|
||||
|
||||
message(STATUS "Building ${TARGET_TRIPLET}-dbg")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND make
|
||||
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)
|
||||
endif()
|
||||
|
||||
set(SOURCE_PATH "${source_path_release}")
|
||||
endif()
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
5
externals/vcpkg/ports/nmap/usage
vendored
Executable file
5
externals/vcpkg/ports/nmap/usage
vendored
Executable file
@@ -0,0 +1,5 @@
|
||||
The package curl is compatible with built-in CMake targets:
|
||||
|
||||
find_package(NMAP REQUIRED)
|
||||
target_link_libraries(main PRIVATE ${NMAP_LIBRARIES})
|
||||
target_include_directories(main PRIVATE ${NMAP_INCLUDE_DIRS})
|
||||
25
externals/vcpkg/ports/nmap/vcpkg.json
vendored
Executable file
25
externals/vcpkg/ports/nmap/vcpkg.json
vendored
Executable file
@@ -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"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user