Skip to content

Commit

Permalink
[gstreamer]: fix pkgconfig parameters of gstreamer (#31301)
Browse files Browse the repository at this point in the history
  • Loading branch information
theartful committed May 9, 2023
1 parent c8b9f10 commit 461fd25
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
19 changes: 19 additions & 0 deletions ports/gstreamer/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,7 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
endif()

if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
# move plugins to ${prefix}/plugins/${PORT} instead of ${prefix}/lib/gstreamer-1.0
if(NOT VCPKG_BUILD_TYPE)
file(GLOB DBG_BINS "${CURRENT_PACKAGES_DIR}/debug/lib/gstreamer-1.0/${CMAKE_SHARED_LIBRARY_PREFIX}*${CMAKE_SHARED_LIBRARY_SUFFIX}"
"${CURRENT_PACKAGES_DIR}/debug/lib/gstreamer-1.0/*.pdb"
Expand All @@ -717,6 +718,24 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
if(NOT VCPKG_TARGET_IS_WINDOWS)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/gstreamer-1.0" "${CURRENT_PACKAGES_DIR}/lib/gstreamer-1.0")
endif()

set(_file "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/gstreamer-1.0.pc")
if(EXISTS "${_file}")
file(READ "${_file}" _contents)
string(REPLACE [[toolsdir=${exec_prefix}/bin]] "toolsdir=\${prefix}/../tools/${PORT}" _contents "${_contents}")
string(REPLACE [[pluginscannerdir=${libexecdir}/gstreamer-1.0]] "pluginscannerdir=\${prefix}/../tools/${PORT}" _contents "${_contents}")
string(REPLACE [[pluginsdir=${libdir}/gstreamer-1.0]] "pluginsdir=\${prefix}/plugins/${PORT}" _contents "${_contents}")
file(WRITE "${_file}" "${_contents}")
endif()

set(_file "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/gstreamer-1.0.pc")
if(EXISTS "${_file}")
file(READ "${_file}" _contents)
string(REPLACE [[toolsdir=${exec_prefix}/bin]] "toolsdir=\${prefix}/tools/${PORT}" _contents "${_contents}")
string(REPLACE [[pluginscannerdir=${libexecdir}/gstreamer-1.0]] "pluginscannerdir=\${prefix}/tools/${PORT}" _contents "${_contents}")
string(REPLACE [[pluginsdir=${libdir}/gstreamer-1.0]] "pluginsdir=\${prefix}/plugins/${PORT}" _contents "${_contents}")
file(WRITE "${_file}" "${_contents}")
endif()
endif()

vcpkg_fixup_pkgconfig()
Expand Down
2 changes: 1 addition & 1 deletion ports/gstreamer/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "gstreamer",
"version": "1.20.5",
"port-version": 6,
"port-version": 7,
"description": "GStreamer open-source multimedia framework core library",
"homepage": "https://gstreamer.freedesktop.org/",
"license": "LGPL-2.0-only",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2970,7 +2970,7 @@
},
"gstreamer": {
"baseline": "1.20.5",
"port-version": 6
"port-version": 7
},
"gtest": {
"baseline": "1.13.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/g-/gstreamer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "877a4687de4ef7b958624b55a558f91b4b34c32b",
"version": "1.20.5",
"port-version": 7
},
{
"git-tree": "631b03d07848f5a632168da7e3f9e1bc753d4085",
"version": "1.20.5",
Expand Down

0 comments on commit 461fd25

Please sign in to comment.