Update portfiles to use VCPKG_BUILD_TYPE (#9703)

* Update portfiles to use VCPKG_BUILD_TYPE

* Update

* Update

* Update port versions

* Update

* Update

* Update

* Update
This commit is contained in:
SeekingMeaning 2020-01-22 12:15:26 -08:00 committed by Victor Romero
parent d3a1bf9468
commit 181ec3b649
15 changed files with 182 additions and 41 deletions

View File

@ -1,4 +1,4 @@
Source: libudns
Version: 0.4
Version: 0.4-1
Homepage: https://github.com/ortclib/udns
Description: The DNS library, udns, implements thread-safe stub DNS resolver functionality, which may be used both traditional, syncronous way and asyncronously, with application-supplied event loop.
Description: The DNS library, udns, implements thread-safe stub DNS resolver functionality, which may be used both traditional, syncronous way and asyncronously, with application-supplied event loop.

View File

@ -16,10 +16,10 @@ vcpkg_configure_make(
vcpkg_build_make()
# Install
if(NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL debug)
if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug)
file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libudns.a DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
endif()
if(NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL release)
if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL release)
file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libudns.a DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
endif()
@ -28,4 +28,4 @@ file(INSTALL ${SOURCE_PATH}/udns.h DESTINATION ${CURRENT_PACKAGES_DIR}/include)
vcpkg_copy_pdbs()
# Handle copyright
file(INSTALL ${SOURCE_PATH}/COPYING.LGPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright)
file(INSTALL ${SOURCE_PATH}/COPYING.LGPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

View File

@ -1,4 +1,4 @@
Source: luajit
Version: 2.0.5-2
Version: 2.0.5-3
Homepage: https://github.com/LuaJIT/LuaJIT
Description: LuaJIT is a Just-In-Time (JIT) compiler for the Lua programming language.

View File

@ -1,8 +1,4 @@
include(vcpkg_common_functions)
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
message(FATAL_ERROR "LuaJIT currently only supports being built for desktop")
endif()
vcpkg_fail_port_install(MESSAGE "${PORT} currently only supports being built for desktop" ON_TARGET "UWP")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
@ -21,7 +17,7 @@ else()
set (LJIT_STATIC "static")
endif()
if (NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL debug)
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug)
message(STATUS "Building ${TARGET_TRIPLET}-dbg")
file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
file(MAKE_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
@ -43,7 +39,7 @@ if (NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL debug)
endif()
if (NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL release)
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL release)
message(STATUS "Building ${TARGET_TRIPLET}-rel")
file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
file(MAKE_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")

View File

@ -1,4 +1,4 @@
Source: nmap
Version: 7.70-3
Version: 7.70-4
Build-Depends: winpcap (windows), libpcap (!windows), lua, openssl, python2 (windows), libssh2, zlib, pcre
Description: A library for scanning network ports.

View File

@ -46,12 +46,12 @@ if(VCPKG_TARGET_IS_WINDOWS)
)
# Install
if (NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL Release)
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 CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL Debug)
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)
@ -68,7 +68,7 @@ else()
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 CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL Release)
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL Release)
message(STATUS "Configuring ${TARGET_TRIPLET}-rel")
set(SOURCE_PATH_RELEASE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/nmap-7.70)
@ -89,7 +89,7 @@ else()
file(INSTALL ${SOURCE_PATH_RELEASE}/nmap DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
endif()
if (NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL Debug)
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL Debug)
message(STATUS "Configuring ${TARGET_TRIPLET}-dbg")
set(SOURCE_PATH_DEBUG ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/nmap-7.70)

View File

@ -1,3 +1,3 @@
Source: openssl-uwp
Version: 1.1.1d
Version: 1.1.1d-1
Description: OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library.

View File

@ -1,7 +1,5 @@
include(vcpkg_common_functions)
if (NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
message(FATAL_ERROR "This portfile only supports UWP")
if (NOT VCPKG_TARGET_IS_UWP)
message(FATAL_ERROR "${PORT} only supports UWP")
endif()
if(EXISTS "${CURRENT_INSTALLED_DIR}/include/openssl/ssl.h")
@ -96,7 +94,7 @@ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
vcpkg_execute_required_process(
COMMAND ${CONFIGURE_COMMAND} ${OPENSSL_ARCH} "--prefix=${OPENSSLDIR_RELEASE}" "--openssldir=${OPENSSLDIR_RELEASE}" -FS
WORKING_DIRECTORY ${SOURCE_PATH_RELEASE}
LOGNAME configure-perl-${TARGET_TRIPLET}-${CMAKE_BUILD_TYPE}-rel
LOGNAME configure-perl-${TARGET_TRIPLET}-${VCPKG_BUILD_TYPE}-rel
)
message(STATUS "Configure ${TARGET_TRIPLET}-rel done")
@ -135,7 +133,7 @@ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
vcpkg_execute_required_process(
COMMAND ${CONFIGURE_COMMAND} debug-${OPENSSL_ARCH} "--prefix=${OPENSSLDIR_DEBUG}" "--openssldir=${OPENSSLDIR_DEBUG}" -FS
WORKING_DIRECTORY ${SOURCE_PATH_DEBUG}
LOGNAME configure-perl-${TARGET_TRIPLET}-${CMAKE_BUILD_TYPE}-dbg
LOGNAME configure-perl-${TARGET_TRIPLET}-${VCPKG_BUILD_TYPE}-dbg
)
message(STATUS "Configure ${TARGET_TRIPLET}-dbg done")

View File

@ -1,3 +1,3 @@
Source: openssl-windows
Version: 1.1.1d
Version: 1.1.1d-1
Description: OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library.

View File

@ -1,8 +1,4 @@
include(vcpkg_common_functions)
if(VCPKG_CMAKE_SYSTEM_NAME)
message(FATAL_ERROR "This port is only for building openssl on Windows Desktop")
endif()
vcpkg_fail_port_install(MESSAGE "${PORT} is only for Windows Desktop" ON_TARGET "UWP" "Linux" "OSX")
if(EXISTS "${CURRENT_INSTALLED_DIR}/include/openssl/ssl.h")
message(WARNING "Can't build openssl if libressl is installed. Please remove libressl, and try install openssl again if you need it. Build will continue but there might be problems since libressl is only a subset of openssl")
@ -81,7 +77,7 @@ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
vcpkg_execute_required_process(
COMMAND ${CONFIGURE_COMMAND} ${OPENSSL_ARCH} "--prefix=${OPENSSLDIR_RELEASE}" "--openssldir=${OPENSSLDIR_RELEASE}" -FS
WORKING_DIRECTORY ${SOURCE_PATH_RELEASE}
LOGNAME configure-perl-${TARGET_TRIPLET}-${CMAKE_BUILD_TYPE}-rel
LOGNAME configure-perl-${TARGET_TRIPLET}-${VCPKG_BUILD_TYPE}-rel
)
message(STATUS "Configure ${TARGET_TRIPLET}-rel done")
@ -120,7 +116,7 @@ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
vcpkg_execute_required_process(
COMMAND ${CONFIGURE_COMMAND} debug-${OPENSSL_ARCH} "--prefix=${OPENSSLDIR_DEBUG}" "--openssldir=${OPENSSLDIR_DEBUG}" -FS
WORKING_DIRECTORY ${SOURCE_PATH_DEBUG}
LOGNAME configure-perl-${TARGET_TRIPLET}-${CMAKE_BUILD_TYPE}-dbg
LOGNAME configure-perl-${TARGET_TRIPLET}-${VCPKG_BUILD_TYPE}-dbg
)
message(STATUS "Configure ${TARGET_TRIPLET}-dbg done")

View File

@ -1,4 +1,5 @@
Source: pfring
Version: 2019-10-17
Version: 2019-10-17-1
Homepage: https://github.com/ntop/PF_RING
Description: PF_RING™ is a Linux kernel module and user-space framework that allows you to process packets at high-rates while providing you a consistent API for packet processing applications.
Build-Depends: libpcap

View File

@ -6,6 +6,8 @@ vcpkg_from_github(
REF 582fa09bc58411cfe6f27facd7e6438924f779d2
SHA512 78dd2d2f9df259483196905f80a904534632a835f742d1f8b3ad645ea80f2dad78356960a2b35e2678525786a7344fa248b708bd3f86101c43fb36c7abc05598
HEAD_REF dev
PATCHES
use-vcpkg-libpcap.patch
)
vcpkg_configure_make(
@ -13,14 +15,16 @@ vcpkg_configure_make(
SKIP_CONFIGURE
)
set(ENV{VCPKG_LIBPCAP_DIR} "${CURRENT_INSTALLED_DIR}")
vcpkg_build_make()
vcpkg_copy_pdbs()
# Install manually because pfring cannot set prefix
if (NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL debug)
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug)
set(PFRING_OBJ_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)
if (CMAKE_BUILD_TYPE STREQUAL debug)
if (VCPKG_BUILD_TYPE STREQUAL debug)
file(GLOB_RECURSE PFRING_KO_FILES "${PFRING_OBJ_DIR}/*.ko")
file(INSTALL ${PFRING_KO_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/share/${PORT})
@ -36,7 +40,7 @@ if (NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL debug)
endif()
endif()
if (NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL release)
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL release)
set(PFRING_OBJ_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)
file(GLOB_RECURSE PFRING_KO_FILES "${PFRING_OBJ_DIR}/*.ko")

View File

@ -0,0 +1,146 @@
diff --git a/userland/Makefile b/userland/Makefile
index d5392c09..959470c0 100644
--- a/userland/Makefile
+++ b/userland/Makefile
@@ -1,4 +1,4 @@
-all: libpfring pcap build_examples build_examples_zc build_examples_ft build_extcap
+all: libpfring build_extcap
# build_tcpdump build_c++
###################
@@ -14,52 +14,25 @@ libpfring: config
build_nbpf: config
cd nbpf; make
-libpcap/Makefile:
- cd libpcap; ./configure --enable-ipv6 --enable-dbus=no --without-libnl --with-snf=no --disable-bluetooth --disable-canusb --with-dag=no
-
-pcap: libpfring libpcap/Makefile
- cd libpcap; make
-
-build_examples: config
- cd examples; make
-
-build_examples_zc: config
- cd examples_zc; make
-
-build_examples_ft: config
- cd examples_ft; make
-
build_c++: libpfring
cd c++; make
tcpdump/Makefile:
- cd tcpdump; ./configure
+ cd tcpdump; ./configure --with_system_libpcap=yes
-build_tcpdump: libpfring pcap tcpdump/Makefile
+build_tcpdump: libpfring tcpdump/Makefile
cd tcpdump; make
-build_extcap: libpfring pcap
+build_extcap: libpfring
cd wireshark/extcap; make
###################
-clean: libpfring_clean pcap_clean examples_clean examples_ft_clean examples_zc_clean c++_clean tcpdump_clean nbpf_clean extcap_clean
+clean: libpfring_clean c++_clean tcpdump_clean nbpf_clean extcap_clean
libpfring_clean:
cd lib; make clean
-pcap_clean:
- if test -f libpcap/config.status; then cd libpcap; make clean; fi
-
-examples_clean:
- cd examples; make clean
-
-examples_zc_clean:
- cd examples_zc; make clean
-
-examples_ft_clean:
- cd examples_ft; make clean
-
c++_clean:
cd c++; make clean
@@ -72,8 +45,5 @@ nbpf_clean:
extcap_clean:
cd wireshark/extcap; make clean
-install: libpfring pcap examples examples_zc examples_ft
+install: libpfring
cd lib; make install
- cd libpcap; make install
- cd examples; make install
- cd examples_zc; make install
diff --git a/userland/c++/Makefile.in b/userland/c++/Makefile.in
index 02bf5164..b0442d84 100644
--- a/userland/c++/Makefile.in
+++ b/userland/c++/Makefile.in
@@ -1,8 +1,7 @@
CPP=g++ -g
KERNEL_DIR=../../kernel
-LIBPCAP_DIR=../libpcap
-INCLUDE=-I$(KERNEL_DIR) -I$(LIBPCAP_DIR) -I../lib `../lib/pfring_config --include`
+INCLUDE=-I$(KERNEL_DIR) -I$(VCPKG_LIBPCAP_DIR)/include -I../lib `../lib/pfring_config --include`
LIBPFRING_CPP=libpfring_cpp.a
RANLIB=ranlib
OBJ=PFring.o
@@ -11,7 +10,7 @@ LIBS=../lib/libpfring.a `../lib/pfring_config --libs` -lpthread
all: $(LIBPFRING_CPP) pf_test
pf_test: pf_test.cpp $(LIBPFRING_CPP)
- $(CPP) $(INCLUDE) $< $(LIBPFRING_CPP) -o $@ $(LIBS) $(LIBPCAP_DIR)/libpcap.a @SYSLIBS@
+ $(CPP) $(INCLUDE) $< $(LIBPFRING_CPP) -o $@ $(LIBS) $(VCPKG_LIBPCAP_DIR)/lib/libpcap.a @SYSLIBS@
$(LIBPFRING_CPP): $(OBJ)
@rm -f $@
diff --git a/userland/snort/pfring-daq-module-zc/Makefile.am b/userland/snort/pfring-daq-module-zc/Makefile.am
index 7123de18..45998688 100644
--- a/userland/snort/pfring-daq-module-zc/Makefile.am
+++ b/userland/snort/pfring-daq-module-zc/Makefile.am
@@ -4,5 +4,5 @@ ACLOCAL_AMFLAGS = -I m4
pkglib_LTLIBRARIES = daq_pfring_zc.la
daq_pfring_zc_la_SOURCES = daq_pfring_zc.c
-daq_pfring_zc_la_CFLAGS = -DBUILDING_SO -I../../libpcap
-daq_pfring_zc_la_LDFLAGS = -module -export-dynamic -avoid-version -shared -lrt ../../libpcap/libpcap.a
+daq_pfring_zc_la_CFLAGS = -DBUILDING_SO -I${VCPKG_LIBPCAP_DIR}/include
+daq_pfring_zc_la_LDFLAGS = -module -export-dynamic -avoid-version -shared -lrt ${VCPKG_LIBPCAP_DIR}/lib/libpcap.a
diff --git a/userland/tcpdump-4.9.2/Makefile.in b/userland/tcpdump-4.9.2/Makefile.in
index e2c74d13..47d9e2cc 100644
--- a/userland/tcpdump-4.9.2/Makefile.in
+++ b/userland/tcpdump-4.9.2/Makefile.in
@@ -373,7 +373,7 @@ TEST_DIST= `find tests \( -name 'DIFF' -prune \) -o \( -name NEW -prune \) -o -t
all: $(PROG) $(LIBNETDISSECT)
-$(PROG): $(OBJ) @V_PCAPDEP@
+$(PROG): $(OBJ) $(VCPKG_LIBPCAP_DIR)/lib/libpcap.a
@rm -f $@
$(CC) $(FULL_CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
diff --git a/userland/wireshark/extcap/Makefile.in b/userland/wireshark/extcap/Makefile.in
index 970b9680..3e34ccc8 100644
--- a/userland/wireshark/extcap/Makefile.in
+++ b/userland/wireshark/extcap/Makefile.in
@@ -20,14 +20,13 @@ LIBPFRING = ${PFRINGDIR}/libpfring.a
#
O_FLAG = -O2 -DHAVE_PF_RING
EXTRA_LIBS =
-PCAPDIR = ../../libpcap
-LIBPCAP = ${PCAPDIR}/libpcap.a ${EXTRA_LIBS}
+LIBPCAP = ${VCPKG_LIBPCAP_DIR}/lib/libpcap.a ${EXTRA_LIBS}
#
# Search directories
#
PFRING_KERNEL=../../../kernel
-INCLUDE = -I${PFRING_KERNEL} -I${PFRINGDIR} -I${PCAPDIR} -Ithird-party `../../lib/pfring_config --include`
+INCLUDE = -I${PFRING_KERNEL} -I${PFRINGDIR} -I${VCPKG_LIBPCAP_DIR}/include -Ithird-party `../../lib/pfring_config --include`
#
# C compiler and flags

View File

@ -1,5 +1,5 @@
Source: tcl
Version: 8.6.10-2
Version: 8.6.10-3
Homepage: https://github.com/tcltk/tcl
Description: Tcl provides a powerful platform for creating integration applications that tie together diverse applications, protocols, devices, and frameworks. When paired with the Tk toolkit, Tcl provides the fastest and most powerful way to create GUI applications that run on PCs, Unix, and Mac OS X. Tcl can also be used for a variety of web-related tasks and for creating powerful command languages for applications.
@ -13,4 +13,4 @@ Feature: unchecked
Description: Allows a symbols build to not use the debug enabled runtime (msvcrt.dll not msvcrtd.dll or libcmt.lib not libcmtd.lib).
Feature: utfmax
Description: Forces Tcl_UniChar to be a 32-bit quantity in stead of 16-bits
Description: Forces Tcl_UniChar to be a 32-bit quantity in stead of 16-bits

View File

@ -53,7 +53,7 @@ if (VCPKG_TARGET_IS_WINDOWS)
SCRIPT_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/tools/tcl/lib/tcl9.0
)
# Install
if (NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL release)
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL release)
file(GLOB_RECURSE TOOLS
${CURRENT_PACKAGES_DIR}/lib/dde1.4/*
${CURRENT_PACKAGES_DIR}/lib/nmake/*
@ -75,7 +75,7 @@ if (VCPKG_TARGET_IS_WINDOWS)
${CURRENT_PACKAGES_DIR}/lib/tdbcsqlite31.1.0
)
endif()
if (NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL debug)
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/dde1.4
${CURRENT_PACKAGES_DIR}/debug/lib/nmake
${CURRENT_PACKAGES_DIR}/debug/lib/reg1.3