Skip to content

Commit

Permalink
[pangolin] Fix static build error (#15593)
Browse files Browse the repository at this point in the history
* [pangolin] Fix static build error

* Update versions

* Update dependency for pangolin

* Update pangolin.json
  • Loading branch information
NancyLi1013 committed Mar 11, 2021
1 parent f2ae282 commit 2543be2
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 56 deletions.
2 changes: 1 addition & 1 deletion ports/ffmpeg/CONTROL
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Source: ffmpeg
Version: 4.3.1
Port-Version: 11
Port-Version: 12
Homepage: https://ffmpeg.org
Description: a library to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created.
FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation. It is also highly portable: FFmpeg compiles, runs, and passes our testing infrastructure FATE across Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc. under a wide variety of build environments, machine architectures, and configurations.
Expand Down
2 changes: 2 additions & 0 deletions ports/ffmpeg/vcpkg-cmake-wrapper.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
set(FFMPEG_PREV_MODULE_PATH ${CMAKE_MODULE_PATH})
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})

cmake_policy(SET CMP0012 NEW)

_find_package(${ARGS})

set(CMAKE_MODULE_PATH ${FFMPEG_PREV_MODULE_PATH})
4 changes: 2 additions & 2 deletions ports/pangolin/CONTROL
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Source: pangolin
Version: 0.5
Port-Version: 11
Build-Depends: eigen3, glew, libpng, libjpeg-turbo, ffmpeg
Port-Version: 12
Build-Depends: eigen3, glew, libpng, libjpeg-turbo, ffmpeg[avformat]
Homepage: https://github.com/stevenlovegrove/Pangolin
Description: Lightweight GUI Library
Supports: !uwp & !osx
13 changes: 13 additions & 0 deletions ports/pangolin/add-definition.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9e0baac..bb3ef76 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -287,6 +287,8 @@ if(BUILD_PANGOLIN_VIDEO AND _LINUX_)
message(STATUS "V4L Found and Enabled")
endif()

+add_definitions(-DHAVE_FFMPEG_AVPIXELFORMAT)
+
find_package(FFMPEG QUIET)
if(BUILD_PANGOLIN_VIDEO AND FFMPEG_FOUND)
set(HAVE_FFMPEG 1)
50 changes: 0 additions & 50 deletions ports/pangolin/fix-dependeny-ffmpeg.patch

This file was deleted.

3 changes: 2 additions & 1 deletion ports/pangolin/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ vcpkg_from_github(
PATCHES
deprecated_constants.patch # Change from upstream pangolin to address build failures from latest ffmpeg library
fix-includepath-error.patch # include path has one more ../
fix-dependeny-ffmpeg.patch
fix-dependency-python.patch
add-definition.patch
)

file(REMOVE ${SOURCE_PATH}/CMakeModules/FindGLEW.cmake)
file(REMOVE ${SOURCE_PATH}/CMakeModules/FindFFMPEG.cmake)

string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" MSVC_USE_STATIC_CRT)

Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -1922,7 +1922,7 @@
},
"ffmpeg": {
"baseline": "4.3.1",
"port-version": 11
"port-version": 12
},
"ffnvcodec": {
"baseline": "10.0.26.0",
Expand Down Expand Up @@ -4498,7 +4498,7 @@
},
"pangolin": {
"baseline": "0.5",
"port-version": 11
"port-version": 12
},
"pangomm": {
"baseline": "2.40.1",
Expand Down
5 changes: 5 additions & 0 deletions versions/f-/ffmpeg.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "15e92ca783e70105ccbf4fda0225a2587a760fe9",
"version-string": "4.3.1",
"port-version": 12
},
{
"git-tree": "985bdde5191e69e38ecda3472663614fcd491052",
"version-string": "4.3.1",
Expand Down
5 changes: 5 additions & 0 deletions versions/p-/pangolin.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "a27ee268db34edfd09ce5d0b51e574c7e6719931",
"version-string": "0.5",
"port-version": 12
},
{
"git-tree": "4632fbe85a4a6afb145b500f689fe47b99b45c71",
"version-string": "0.5",
Expand Down

0 comments on commit 2543be2

Please sign in to comment.