Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ffnvcodec/libproxy] Update to latest release version #20169

Merged
merged 6 commits into from
Sep 17, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions ports/ffnvcodec/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# Get nvcodec
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO FFmpeg/nv-codec-headers
REF 5ee2ae591f74f53bd6028344f8690f1558a1f17a # 10.0.26.0
SHA512 f9d40a44f85016f0f76c7f630c3defb2e94858b43ae714adae546842c2801f51358b7c2b3326952e7aeb25f5b1611af4eee3024f495eaaaecbfd31851cc7edca
REF b641a195edbe3ac9788e681e22c2e2fad8aacddb # 11.1.5.0
SHA512 e8b4c21ddc9c39dadd9b69ebdfcf38cf1e61f19ffb88d0a4d9086ddbf69285d2c8c946bb02bde3ee943accae559a72468f096718ad69ac03a43746c1eb0ed483
HEAD_REF master
)

Expand All @@ -30,7 +29,7 @@ if(VCPKG_TARGET_IS_WINDOWS)
LOGNAME build-${TARGET_TRIPLET}
)

file(INSTALL ${SOURCE_PATH}/ffnvcodec.pc DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig)
file(INSTALL "${SOURCE_PATH}/ffnvcodec.pc" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig")

# Linux, etc.
else()
Expand All @@ -47,12 +46,12 @@ else()

# FFmpeg uses pkgconfig to find ffnvcodec.pc, so install it where
# FFMpeg's call to pkgconfig expects to find it.
file(INSTALL ${SOURCE_PATH}/ffnvcodec.pc DESTINATION ${CURRENT_PACKAGES_DIR}/lib/pkgconfig)
file(INSTALL ${SOURCE_PATH}/ffnvcodec.pc DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig)
file(INSTALL "${SOURCE_PATH}/ffnvcodec.pc" DESTINATION "${CURRENT_PACKAGES_DIR}/lib/pkgconfig")
file(INSTALL "${SOURCE_PATH}/ffnvcodec.pc" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig")
endif()

# Install the files to their default vcpkg locations
file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR})
file(INSTALL ${CURRENT_PORT_DIR}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})

vcpkg_fixup_pkgconfig()

# Install the files to their default vcpkg locations
file(INSTALL "${SOURCE_PATH}/include" DESTINATION "${CURRENT_PACKAGES_DIR}")
file(INSTALL "${CURRENT_PORT_DIR}/copyright" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
3 changes: 1 addition & 2 deletions ports/ffnvcodec/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "ffnvcodec",
"version-string": "10.0.26.0",
"port-version": 2,
"version-string": "11.1.5.0",
"description": "FFmpeg version of Nvidia Codec SDK headers.",
"homepage": "https://github.com/FFmpeg/nv-codec-headers",
"supports": "(windows | linux) & !uwp"
Expand Down
7 changes: 3 additions & 4 deletions ports/libproxy/fix-arm-build.patch
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 51b0e5e..aa94b87 100644
index 1c68939..9ef6895 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -51,6 +51,10 @@ else()
endif()
@@ -42,6 +42,9 @@ else()
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
endif()

+if (WIN32)
+ link_libraries(Advapi32)
+endif()
+
# Conditionally build bindings
if(NOT WIN32)
add_subdirectory(bindings)
59 changes: 45 additions & 14 deletions ports/libproxy/fix-dependency-libmodman.patch
Original file line number Diff line number Diff line change
@@ -1,21 +1,52 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 451e7a6..b6782fb 100644
index 4f51e38..32a0319 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -32,13 +32,15 @@ option(WITH_WEBKIT3 "Build against gtk-3 version of webkitgtk" OFF)
### Subdirectories
# Conditionally build bundled libmodman
option(FORCE_SYSTEM_LIBMODMAN "Force using system libmodman" OFF)
-find_package(libmodman QUIET)
@@ -31,11 +31,15 @@ include(cmake/ctest.cmk)
include(cmake/paths.cmk)

option(WITH_WEBKIT3 "Build against gtk-3 version of webkitgtk" OFF)
-
-### Subdirectories
-
-add_subdirectory(libmodman)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+find_package(libmodman REQUIRED)
if(LIBMODMAN_FOUND)
if("${LIBMODMAN_VERSION_MAJOR}" STREQUAL "2")
message(STATUS "Building with system libmodman")
else()
message(FATAL_ERROR "Found incompatible libmodman on your system (libmodman 2.X is needed)")
endif()
+if(LIBMODMAN_FOUND)
+ include_directories(${LIBMODMAN_INCLUDE_DIR})
+ link_libraries(${LIBMODMAN_LIBRARIES})
+else()
+ ### Subdirectories
+ add_subdirectory(libmodman)
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+endif()

# Conditionally build bindings
if(NOT WIN32)
diff --git a/libproxy/cmake/libproxy.cmk b/libproxy/cmake/libproxy.cmk
index 9356486..f9eed2c 100644
--- a/libproxy/cmake/libproxy.cmk
+++ b/libproxy/cmake/libproxy.cmk
@@ -1,8 +1,8 @@
add_library(libproxy SHARED extension_config.cpp extension_pacrunner.cpp extension_wpad.cpp proxy.cpp url.cpp ${LIBPROXY_SOURCES})
if(WIN32)
- target_link_libraries(libproxy modman;ws2_32;${LIBPROXY_LIBRARIES})
+ target_link_libraries(libproxy ${LIBMODMAN_LIBRARIES};ws2_32;${LIBPROXY_LIBRARIES})
else()
if(FORCE_SYSTEM_LIBMODMAN)
message(FATAL_ERROR "Libmodman could not be found on your system")
- target_link_libraries(libproxy modman;m;pthread;${CMAKE_DL_LIBS};${LIBPROXY_LIBRARIES})
+ target_link_libraries(libproxy ${LIBMODMAN_LIBRARIES};m;pthread;${CMAKE_DL_LIBS};${LIBPROXY_LIBRARIES})
endif()
file(TO_NATIVE_PATH ${MODULE_INSTALL_DIR} MODULE_INSTALL_DIR)
if(WIN32)
@@ -21,8 +21,8 @@ set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/proxy.cpp
set_target_properties(libproxy PROPERTIES PREFIX "" VERSION 1.0.0 SOVERSION 1)
set_target_properties(libproxy PROPERTIES INTERFACE_LINK_LIBRARIES "")
set_target_properties(libproxy PROPERTIES LINK_INTERFACE_LIBRARIES "")
-if(NOT APPLE)
- set_target_properties(libproxy PROPERTIES LINK_FLAGS "-Wl,--version-script,${CMAKE_CURRENT_SOURCE_DIR}/libproxy.map")
-endif()
+#if(NOT APPLE)
+# set_target_properties(libproxy PROPERTIES LINK_FLAGS "-Wl,--version-script,${CMAKE_CURRENT_SOURCE_DIR}/libproxy.map")
+#endif()
install(TARGETS libproxy RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
install(FILES proxy.h DESTINATION ${INCLUDE_INSTALL_DIR})
26 changes: 13 additions & 13 deletions ports/libproxy/fix-module-lib-name.patch
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
diff --git a/libproxy/Findlibproxy.cmake.in b/libproxy/Findlibproxy.cmake.in
index ef44489..c0bd2ae 100644
--- a/libproxy/Findlibproxy.cmake.in
+++ b/libproxy/Findlibproxy.cmake.in
@@ -12,7 +12,7 @@
# Find proxy.h and the corresponding library (libproxy.so)
FIND_PATH(LIBPROXY_INCLUDE_DIR proxy.h )
-FIND_LIBRARY(LIBPROXY_LIBRARIES NAMES proxy )
+FIND_LIBRARY(LIBPROXY_LIBRARIES NAMES proxy libproxy)
# Set library version
SET(LIBPROXY_VERSION @PROJECT_VERSION@)
diff --git a/libproxy/Findlibproxy.cmake.in b/libproxy/Findlibproxy.cmake.in
index ef44489..c0bd2ae 100644
--- a/libproxy/Findlibproxy.cmake.in
+++ b/libproxy/Findlibproxy.cmake.in
@@ -12,7 +12,7 @@

# Find proxy.h and the corresponding library (libproxy.so)
FIND_PATH(LIBPROXY_INCLUDE_DIR proxy.h )
-FIND_LIBRARY(LIBPROXY_LIBRARIES NAMES proxy )
+FIND_LIBRARY(LIBPROXY_LIBRARIES NAMES proxy libproxy)

# Set library version
SET(LIBPROXY_VERSION @PROJECT_VERSION@)
39 changes: 19 additions & 20 deletions ports/libproxy/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO libproxy/libproxy
REF 5924d4223e2b7238607749d977c0a878fe33cdbc #0.4.15
SHA512 3c3be46e1ccd7e25a9b6e5fd71bfac5c1075bc9230a9a7ca94ee5e82bdbf090ab08dd53d8c6946db1353024409b234b35822d22f95a02cfb48bb54705b07d478
REF e78a5ccfe0a2340f2c73e419767f8492ffc2787a #0.4.17
SHA512 b22251f73f7a94dade5dcdcd9d5510170038b0d101ee98ab427106c20a3d9979c2b16c57d6cf8d8ae59c3a28ccffcecafc0bed399926dc2416a27837fd2f043c
HEAD_REF master
PATCHES
fix-tools-path.patch
Expand All @@ -21,30 +21,29 @@ vcpkg_from_github(
)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
bindings-csharp WITH_DOTNET
bindings-python WITH_PYTHON2
bindings-python WITH_PYTHON3
bindings-perl WITH_PERL
bindings-vala WITH_VALA
tools BUILD_TOOLS
tests BUILD_TESTING
FEATURES
bindings-csharp WITH_DOTNET
bindings-python WITH_PYTHON2
bindings-python WITH_PYTHON3
bindings-perl WITH_PERL
bindings-vala WITH_VALA
tools BUILD_TOOLS
tests BUILD_TESTING
)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS ${FEATURE_OPTIONS}
-DWITH_WEBKIT3=OFF
-DFORCE_SYSTEM_LIBMODMAN=ON
)

vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/Modules)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH share/cmake/Modules)
vcpkg_copy_pdbs()

file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake
${CMAKE_CURRENT_LIST_DIR}/usage
DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
file(REMOVE_RECURSE ${LIBPROXY_TOOLS} ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)
file(COPY "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake"
"${CMAKE_CURRENT_LIST_DIR}/usage"
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(REMOVE_RECURSE "${LIBPROXY_TOOLS}" "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")

file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
62 changes: 5 additions & 57 deletions ports/libproxy/support-windows.patch
Original file line number Diff line number Diff line change
Expand Up @@ -19,65 +19,13 @@ index 0301dce..0eb5f83 100644
set (PKGCONFIG_PREFIX ${CMAKE_INSTALL_PREFIX})

diff --git a/libproxy/cmake/libproxy.cmk b/libproxy/cmake/libproxy.cmk
index aab7593..465685f 100644
index de68e5c..9356486 100644
--- a/libproxy/cmake/libproxy.cmk
+++ b/libproxy/cmake/libproxy.cmk
@@ -21,5 +21,5 @@ set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/proxy.cpp
set_target_properties(libproxy PROPERTIES PREFIX "" VERSION 1.0.0 SOVERSION 1)
set_target_properties(libproxy PROPERTIES INTERFACE_LINK_LIBRARIES "")
set_target_properties(libproxy PROPERTIES LINK_INTERFACE_LIBRARIES "")
@@ -24,5 +24,5 @@ set_target_properties(libproxy PROPERTIES LINK_INTERFACE_LIBRARIES "")
if(NOT APPLE)
set_target_properties(libproxy PROPERTIES LINK_FLAGS "-Wl,--version-script,${CMAKE_CURRENT_SOURCE_DIR}/libproxy.map")
endif()
-install(TARGETS libproxy DESTINATION ${LIB_INSTALL_DIR})
+install(TARGETS libproxy RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
install(FILES proxy.h DESTINATION ${INCLUDE_INSTALL_DIR})
diff --git a/libproxy/modules/config_kde.cpp b/libproxy/modules/config_kde.cpp
index b9bd241..73b978e 100644
--- a/libproxy/modules/config_kde.cpp
+++ b/libproxy/modules/config_kde.cpp
@@ -19,7 +19,9 @@
******************************************************************************/

#include <sys/stat.h>
+#if !defined(WIN32)
#include <unistd.h>
+#endif

#include <algorithm>
#include <cstdlib>
@@ -137,7 +139,11 @@ private:
string command_output(const string &cmdline) throw (runtime_error) {
// Capture stderr as well
const string command = "(" + cmdline + ")2>&1";
+#if !defined(WIN32)
FILE *pipe = popen(command.c_str(), "r");
+#else
+ FILE *pipe = _popen(command.c_str(), "r");
+#endif
if (!pipe)
throw runtime_error("Unable to run command");

@@ -148,7 +154,11 @@ private:
result += buffer; // TODO: If this throws bad_alloc, pipe is leaked
}

+#if !defined(WIN32)
if(pclose(pipe) != 0)
+#else
+ if(_pclose(pipe) != 0)
+#endif
throw runtime_error("Command failed");

// Trim newlines and whitespace at end
diff --git a/libproxy/url.cpp b/libproxy/url.cpp
index b61a9bc..021763e 100644
--- a/libproxy/url.cpp
+++ b/libproxy/url.cpp
@@ -33,7 +33,9 @@
#include <cstdlib> // For atoi()
#include <sys/stat.h> // For stat()
#include <algorithm> // For transform()
+#if !defined(WIN32)
#include <unistd.h> // For read() close()
+#endif

#ifdef WIN32
#include <io.h>
13 changes: 10 additions & 3 deletions ports/libproxy/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
{
"name": "libproxy",
"version-string": "0.4.15",
"port-version": 3,
"version": "0.4.17",
"description": "libproxy is a library that provides automatic proxy configuration management.",
"homepage": "https://github.com/libproxy/libproxy",
"dependencies": [
"libmodman"
"libmodman",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"features": {
"bindings-csharp": {
Expand Down
8 changes: 4 additions & 4 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2085,8 +2085,8 @@
"port-version": 14
},
"ffnvcodec": {
"baseline": "10.0.26.0",
"port-version": 2
"baseline": "11.1.5.0",
"port-version": 0
},
"fftw3": {
"baseline": "3.3.9",
Expand Down Expand Up @@ -3637,8 +3637,8 @@
"port-version": 0
},
"libproxy": {
"baseline": "0.4.15",
"port-version": 3
"baseline": "0.4.17",
"port-version": 0
},
"libqcow": {
"baseline": "20210419",
Expand Down
5 changes: 5 additions & 0 deletions versions/f-/ffnvcodec.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "0de8743d8b658aae8571e68449fd88c0193d7e7e",
"version-string": "11.1.5.0",
"port-version": 0
},
{
"git-tree": "8f66cad42ef3e7749e345075f467f357ca061acd",
"version-string": "10.0.26.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libproxy.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "ab650ac3327ba4cd214ca5de79a626574594c63f",
"version": "0.4.17",
"port-version": 0
},
{
"git-tree": "49aac7c55ac89c54daa7d91d8eed713a79ab2713",
"version-string": "0.4.15",
Expand Down