From 7d425f8fa28393d0846bec5d7a6fb84a94f43241 Mon Sep 17 00:00:00 2001 From: Connor Broyles Date: Sat, 6 Aug 2022 18:32:10 -0400 Subject: [PATCH 1/7] [osg] Install plugins directly to plugins folder This change removes the stage in portfile.cmake which relocates the osg plugins from bin/ to plugins/. Instead, the OsgMacroUtils.cmake file is patched to install directly to the plugins folder. This has two primary effects. The first is correcting the exported target locations, as they still pointed to bin/ after moving the plugins. The second is fixing the process on non-Windows platforms, as the plugins were not being moved in those cases. --- ports/osg/portfile.cmake | 11 ----------- ports/osg/unofficial-export.patch | 19 ++++++++++++++----- ports/osg/vcpkg.json | 2 +- versions/baseline.json | 2 +- versions/o-/osg.json | 5 +++++ 5 files changed, 21 insertions(+), 18 deletions(-) diff --git a/ports/osg/portfile.cmake b/ports/osg/portfile.cmake index 88ec457c5bc2be..3eeed31b49499b 100644 --- a/ports/osg/portfile.cmake +++ b/ports/osg/portfile.cmake @@ -117,18 +117,7 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(APPEND "${CURRENT_PACKAGES_DIR}/include/osg/Config" "#ifndef OSG_LIBRARY_STATIC\n#define OSG_LIBRARY_STATIC 1\n#endif\n") endif() -# Move all osg plugins to [/debug]/plugins/osgPlugins-${OSG_VER}, -# as a staging area for later deployment. set(osg_plugins_subdir "osgPlugins-${OSG_VER}") -if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/${osg_plugins_subdir}") - file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/plugins") - file(RENAME "${CURRENT_PACKAGES_DIR}/bin/${osg_plugins_subdir}" "${CURRENT_PACKAGES_DIR}/plugins/${osg_plugins_subdir}") - if(NOT VCPKG_BUILD_TYPE) - file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/plugins") - file(RENAME "${CURRENT_PACKAGES_DIR}/debug/bin/${osg_plugins_subdir}" "${CURRENT_PACKAGES_DIR}/debug/plugins/${osg_plugins_subdir}") - endif() -endif() - if("tools" IN_LIST FEATURES) set(osg_plugin_pattern "${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}osgdb*${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}") file(GLOB osg_plugins "${CURRENT_PACKAGES_DIR}/plugins/${osg_plugins_subdir}/${osg_plugin_pattern}") diff --git a/ports/osg/unofficial-export.patch b/ports/osg/unofficial-export.patch index 1061f704de30d1..2142b112761905 100644 --- a/ports/osg/unofficial-export.patch +++ b/ports/osg/unofficial-export.patch @@ -22,25 +22,34 @@ index f6714c5..d58f6fd 100644 LIBRARY DESTINATION ${INSTALL_LIBDIR} COMPONENT libopenscenegraph ARCHIVE DESTINATION ${INSTALL_ARCHIVEDIR} COMPONENT libopenscenegraph-dev diff --git a/CMakeModules/OsgMacroUtils.cmake b/CMakeModules/OsgMacroUtils.cmake -index dcc1fe3..a12fcf1 100644 +index dcc1fe37d..76429b85a 100644 --- a/CMakeModules/OsgMacroUtils.cmake +++ b/CMakeModules/OsgMacroUtils.cmake -@@ -345,6 +345,7 @@ MACRO(SETUP_PLUGIN PLUGIN_NAME) +@@ -345,18 +350,20 @@ MACRO(SETUP_PLUGIN PLUGIN_NAME) #the installation path are differentiated for win32 that install in bib versus other architecture that install in lib${LIB_POSTFIX}/${OSG_PLUGINS} IF(WIN32) INSTALL(TARGETS ${TARGET_TARGETNAME} + EXPORT osg-plugins RUNTIME DESTINATION bin COMPONENT ${PACKAGE_COMPONENT} ARCHIVE DESTINATION lib/${OSG_PLUGINS} COMPONENT libopenscenegraph-dev - LIBRARY DESTINATION bin/${OSG_PLUGINS} COMPONENT ${PACKAGE_COMPONENT}) -@@ -354,6 +355,7 @@ MACRO(SETUP_PLUGIN PLUGIN_NAME) +- LIBRARY DESTINATION bin/${OSG_PLUGINS} COMPONENT ${PACKAGE_COMPONENT}) ++ LIBRARY DESTINATION plugins/${OSG_PLUGINS} COMPONENT ${PACKAGE_COMPONENT}) + IF(MSVC AND DYNAMIC_OPENSCENEGRAPH) +- INSTALL(FILES ${OUTPUT_BINDIR}/${OSG_PLUGINS}/${TARGET_TARGETNAME}${CMAKE_RELWITHDEBINFO_POSTFIX}.pdb DESTINATION bin/${OSG_PLUGINS} COMPONENT ${PACKAGE_COMPONENT} CONFIGURATIONS RelWithDebInfo) +- INSTALL(FILES $ DESTINATION bin/${OSG_PLUGINS} COMPONENT ${PACKAGE_COMPONENT} CONFIGURATIONS Debug) ++ INSTALL(FILES ${OUTPUT_BINDIR}/${OSG_PLUGINS}/${TARGET_TARGETNAME}${CMAKE_RELWITHDEBINFO_POSTFIX}.pdb DESTINATION plugins/${OSG_PLUGINS} COMPONENT ${PACKAGE_COMPONENT} CONFIGURATIONS RelWithDebInfo) ++ INSTALL(FILES $ DESTINATION plugins/${OSG_PLUGINS} COMPONENT ${PACKAGE_COMPONENT} CONFIGURATIONS Debug) ENDIF(MSVC AND DYNAMIC_OPENSCENEGRAPH) ELSE(WIN32) INSTALL(TARGETS ${TARGET_TARGETNAME} + EXPORT osg-plugins RUNTIME DESTINATION bin COMPONENT ${PACKAGE_COMPONENT} ARCHIVE DESTINATION lib${LIB_POSTFIX}/${OSG_PLUGINS} COMPONENT libopenscenegraph-dev - LIBRARY DESTINATION lib${LIB_POSTFIX}/${OSG_PLUGINS} COMPONENT ${PACKAGE_COMPONENT}) +- LIBRARY DESTINATION lib${LIB_POSTFIX}/${OSG_PLUGINS} COMPONENT ${PACKAGE_COMPONENT}) ++ LIBRARY DESTINATION plugins${LIB_POSTFIX}/${OSG_PLUGINS} COMPONENT ${PACKAGE_COMPONENT}) + ENDIF(WIN32) + ENDMACRO(SETUP_PLUGIN) + diff --git a/src/OpenThreads/pthreads/CMakeLists.txt b/src/OpenThreads/pthreads/CMakeLists.txt index e18969c..5a8ad62 100644 --- a/src/OpenThreads/pthreads/CMakeLists.txt diff --git a/ports/osg/vcpkg.json b/ports/osg/vcpkg.json index 7faa66401b483b..68996e9127b86b 100644 --- a/ports/osg/vcpkg.json +++ b/ports/osg/vcpkg.json @@ -1,7 +1,7 @@ { "name": "osg", "version": "3.6.5", - "port-version": 15, + "port-version": 16, "description": "The OpenSceneGraph is an open source high performance 3D graphics toolkit.", "homepage": "https://github.com/openscenegraph/OpenSceneGraph", "supports": "!uwp", diff --git a/versions/baseline.json b/versions/baseline.json index 78c7090499d296..ca59a6d516d669 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5338,7 +5338,7 @@ }, "osg": { "baseline": "3.6.5", - "port-version": 15 + "port-version": 16 }, "osg-qt": { "baseline": "Qt5", diff --git a/versions/o-/osg.json b/versions/o-/osg.json index 3395ad64744b8d..6a69df227787ee 100644 --- a/versions/o-/osg.json +++ b/versions/o-/osg.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "281da46b90cdaae75ab0dfa81bc00a0630424290", + "version": "3.6.5", + "port-version": 16 + }, { "git-tree": "219045e2b75fc651860c70dbf97557d543269842", "version": "3.6.5", From f5d691b15b07864b2515da4f0fd0bd535aaf1be6 Mon Sep 17 00:00:00 2001 From: Jonliu1993 <13720414433@163.com> Date: Thu, 15 Sep 2022 11:04:42 +0800 Subject: [PATCH 2/7] update version --- versions/o-/osg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/o-/osg.json b/versions/o-/osg.json index a15cdd2e771176..c95318e86e0bf4 100644 --- a/versions/o-/osg.json +++ b/versions/o-/osg.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "9b4ddf02fe84124b58b1ea60dcc9a4f553f32704", + "git-tree": "c4c0acd2f5db91063bdf5460ed0d8ef6c9cbc3b8", "version": "3.6.5", "port-version": 16 }, From 623520000752a5a7a41ff13af858f84e3952abd6 Mon Sep 17 00:00:00 2001 From: Jonliu1993 <13720414433@163.com> Date: Thu, 15 Sep 2022 11:06:17 +0800 Subject: [PATCH 3/7] update version --- ports/osg/vcpkg.json | 2 +- versions/o-/osg.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/osg/vcpkg.json b/ports/osg/vcpkg.json index 9d002b776311d7..a72f9314b7c6e0 100644 --- a/ports/osg/vcpkg.json +++ b/ports/osg/vcpkg.json @@ -1,7 +1,7 @@ { "name": "osg", "version": "3.6.5", - "port-version": 16, + "port-version": 17, "description": "The OpenSceneGraph is an open source high performance 3D graphics toolkit.", "homepage": "https://www.openscenegraph.com/", "license": null, diff --git a/versions/o-/osg.json b/versions/o-/osg.json index c95318e86e0bf4..a15cdd2e771176 100644 --- a/versions/o-/osg.json +++ b/versions/o-/osg.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "c4c0acd2f5db91063bdf5460ed0d8ef6c9cbc3b8", + "git-tree": "9b4ddf02fe84124b58b1ea60dcc9a4f553f32704", "version": "3.6.5", "port-version": 16 }, From ff8e35e72a2c38f1029b789cfcf67b2dd1a0ff52 Mon Sep 17 00:00:00 2001 From: Jonliu1993 <13720414433@163.com> Date: Thu, 15 Sep 2022 11:06:50 +0800 Subject: [PATCH 4/7] update version --- versions/baseline.json | 2 +- versions/o-/osg.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/versions/baseline.json b/versions/baseline.json index 6893fdba8d7acf..93122ab3027d54 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5442,7 +5442,7 @@ }, "osg": { "baseline": "3.6.5", - "port-version": 16 + "port-version": 17 }, "osg-qt": { "baseline": "Qt5", diff --git a/versions/o-/osg.json b/versions/o-/osg.json index a15cdd2e771176..1cd1a6f57e1529 100644 --- a/versions/o-/osg.json +++ b/versions/o-/osg.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "b32f47e0791cd4c62e764e7be35b053e54ac9031", + "version": "3.6.5", + "port-version": 17 + }, { "git-tree": "9b4ddf02fe84124b58b1ea60dcc9a4f553f32704", "version": "3.6.5", From b20bb457748480d519a613299d8399063da8408a Mon Sep 17 00:00:00 2001 From: Connor Broyles Date: Tue, 4 Oct 2022 11:19:49 -0400 Subject: [PATCH 5/7] [osg] Update version --- ports/osg/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/osg/vcpkg.json b/ports/osg/vcpkg.json index a72f9314b7c6e0..34daa77fea1bf0 100644 --- a/ports/osg/vcpkg.json +++ b/ports/osg/vcpkg.json @@ -1,7 +1,7 @@ { "name": "osg", "version": "3.6.5", - "port-version": 17, + "port-version": 18, "description": "The OpenSceneGraph is an open source high performance 3D graphics toolkit.", "homepage": "https://www.openscenegraph.com/", "license": null, From 7bd9f435f5d2a3d077915b6c8098a0cc355102ea Mon Sep 17 00:00:00 2001 From: Connor Broyles Date: Tue, 4 Oct 2022 11:20:59 -0400 Subject: [PATCH 6/7] [osg] Update port version --- versions/baseline.json | 2 +- versions/o-/osg.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/versions/baseline.json b/versions/baseline.json index 93122ab3027d54..df6580958aef00 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5442,7 +5442,7 @@ }, "osg": { "baseline": "3.6.5", - "port-version": 17 + "port-version": 18 }, "osg-qt": { "baseline": "Qt5", diff --git a/versions/o-/osg.json b/versions/o-/osg.json index 1cd1a6f57e1529..1734d339684c0f 100644 --- a/versions/o-/osg.json +++ b/versions/o-/osg.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "445f8f27379a5a7c9ff620e7e02c0757c6173fa5", + "version": "3.6.5", + "port-version": 18 + }, { "git-tree": "b32f47e0791cd4c62e764e7be35b053e54ac9031", "version": "3.6.5", From 56cf9d600facb892eb5de1ee2225cc395ba69803 Mon Sep 17 00:00:00 2001 From: Connor Broyles Date: Tue, 4 Oct 2022 18:42:00 -0400 Subject: [PATCH 7/7] [osg] Fix port version --- versions/o-/osg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/o-/osg.json b/versions/o-/osg.json index 39fad7665a4d21..2db46a0915d37f 100644 --- a/versions/o-/osg.json +++ b/versions/o-/osg.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "445f8f27379a5a7c9ff620e7e02c0757c6173fa5", + "git-tree": "cb957f4950031c9c7fedfbcfe1ba698cc435dedd", "version": "3.6.5", "port-version": 18 },