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

Two new ports added. #7071

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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
4 changes: 4 additions & 0 deletions ports/omniorb/CONTROL
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Source: omniorb
Version: 4.2.3-1
Description: OmniORB is a robust high performance CORBA ORB for C++ and Python. It is freely available under the terms of the GNU Lesser General Public License (for the libraries), and GNU General Public License (for the tools). omniORB is largely CORBA 2.6 compliant.
Build-Depends: python3, zlib, openssl
96 changes: 96 additions & 0 deletions ports/omniorb/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Common Ambient Variables:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is to help new maintainers, but it shouldn't be kept for the final PR

# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
# PORT = current port name (zlib, etc)
# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
#

include(vcpkg_common_functions)
set(VCPKG_USE_HEAD_VERSION ON)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO CaeruleusAqua/omniORB-cmake
HEAD_REF vcpkg-fixes
)


vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA # Disable this option if project cannot be built with Ninja
OPTIONS -DPython_ROOT_DIR=${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/tools/python3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If python is only needed to run scripts during the build, we can use vcpkg_find_acquire_program(PYTHON3).

OPTIONS -DPython_EXECUTABLE=${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/tools/python3/python.exe
OPTIONS_RELEASE -DPython_LIBRARIES=${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/lib/python37.lib
OPTIONS_DEBUG -DPython_LIBRARIES=${VCPKG_ROOT_DIR}/installed//${TARGET_TRIPLET}/debug/lib/python37_d.lib
)

vcpkg_install_cmake()

# Handle copyright
file(INSTALL ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/omniorb RENAME copyright)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)

# move executables to tools

file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/${PORT})

file(COPY ${CURRENT_PACKAGES_DIR}/bin/omniNames.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}/)
file(COPY ${CURRENT_PACKAGES_DIR}/bin/omniMapper.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}/)
file(COPY ${CURRENT_PACKAGES_DIR}/bin/omniidl.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}/)
file(COPY ${CURRENT_PACKAGES_DIR}/bin/omnicpp.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}/)
file(COPY ${CURRENT_PACKAGES_DIR}/bin/omniORB4.dll DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}/)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of copying a specific list of DLLs, it is better to run vcpkg_copy_tool_dependencies()[1].

[1] https://github.com/microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_copy_tool_dependencies.md

file(COPY ${CURRENT_PACKAGES_DIR}/bin/omnithread.dll DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}/)


file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/omniNames.exe)
file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/omniMapper.exe)
file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/omniidl.exe)
file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/omnicpp.exe)


file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/omniNames.exe)
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/omniMapper.exe)
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/omniidl.exe)
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/omnicpp.exe)


vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/OmniORB" TARGET_PATH "lib/cmake/OmniORB")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We conventionally place cmake config files in share/<lowercase_name>/; in this case TARGET_PATH "share/omniorb".


file(GLOB CMAKE_FILES ${CURRENT_PACKAGES_DIR}/lib/cmake/OmniORB/*.cmake)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These lines can be removed with the above change to TARGET_PATH

foreach(CMAKE_FILE IN LISTS CMAKE_FILES)
file(COPY ${CMAKE_FILE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/OmniORB/)
endforeach()

file(COPY ${CURRENT_PACKAGES_DIR}/Lib/site-packages/ DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT})


file(READ ${CURRENT_PACKAGES_DIR}/share/OmniORB/OmniORBConfig.cmake _contents)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

share/OmniORB/ should be lowercased

string(REPLACE
"set_and_check(OMNI_PYTHON_RESOURCES"
"#set_and_check(OMNI_PYTHON_RESOURCES"
_contents "${_contents}")
file(WRITE ${CURRENT_PACKAGES_DIR}/share/OmniORB/OmniORBConfig.cmake "${_contents}")


vcpkg_copy_pdbs()

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake/)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake/)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/Lib/site-packages/)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/Lib/site-packages/)

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools/omniorb/omniidl_be/__pycache__)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools/omniorb/omniidl_be/cxx/__pycache__)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools/omniorb/omniidl_be/cxx/skel/__pycache__)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools/omniorb/omniidl_be/cxx/impl/__pycache__)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools/omniorb/omniidl_be/cxx/header/__pycache__)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools/omniorb/omniidl_be/cxx/dynskel/__pycache__)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools/omniorb/omniidl/__pycache__)



4 changes: 4 additions & 0 deletions ports/opensg/CONTROL
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Source: opensg
Version: 1.8.0
Build-Depends: glew, zlib, tiff, libjpeg-turbo, libpng, opengl, freeglut
Description: OpenSG is a realtime rendering system based on a scenegraph metaphor.
71 changes: 71 additions & 0 deletions ports/opensg/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Common Ambient Variables:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto as above.

# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
# PORT = current port name (zlib, etc)
# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
#

include(vcpkg_common_functions)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO vossg/OpenSG1x
REF 5622fc72d574c38c044cd995d3272d16f3710c5f
SHA512 b168bb2aac283f8d0daff02e1cf5647f982fcabf3be351ccf5776d476b5154baa3f128b3757c43996ebc7041c2a480e9559ad3d14e1abd8c7823358c12865e34
HEAD_REF master
)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS ${OPTIONS} -DOSGBUILD_OSGWindowQT4=OFF
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

${OPTIONS} probably shouldn't be here.

)

vcpkg_install_cmake()

vcpkg_fixup_cmake_targets()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cmake files are unfortunately not going to work if we rename the dlls and libs as below. Therefore, this command should probably be removed.


file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)

# Handle copyright
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/OpenSG RENAME copyright)

file(RENAME ${CURRENT_PACKAGES_DIR}/debug/bin/debug/OSGWindowWIN32D.dll ${CURRENT_PACKAGES_DIR}/debug/bin/OSGWindowWIN32D.dll)
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/bin/debug/OSGWindowGLUTD.dll ${CURRENT_PACKAGES_DIR}/debug/bin/OSGWindowGLUTD.dll)
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/bin/debug/OSGSystemD.dll ${CURRENT_PACKAGES_DIR}/debug/bin/OSGSystemD.dll)
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/bin/debug/OSGBaseD.dll ${CURRENT_PACKAGES_DIR}/debug/bin/OSGBaseD.dll)
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/osg2-config)

file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/debug/OSGWindowWIN32D.lib ${CURRENT_PACKAGES_DIR}/debug/lib/OSGWindowWIN32D.lib)
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/debug/OSGWindowGLUTD.lib ${CURRENT_PACKAGES_DIR}/debug/lib/OSGWindowGLUTD.lib)
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/debug/OSGSystemD.lib ${CURRENT_PACKAGES_DIR}/debug/lib/OSGSystemD.lib)
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/debug/OSGBaseD.lib ${CURRENT_PACKAGES_DIR}/debug/lib/OSGBaseD.lib)

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc)

file(RENAME ${CURRENT_PACKAGES_DIR}/bin/rel/OSGWindowWIN32.dll ${CURRENT_PACKAGES_DIR}/bin/OSGWindowWIN32.dll)
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/rel/OSGWindowGLUT.dll ${CURRENT_PACKAGES_DIR}/bin/OSGWindowGLUT.dll)
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/rel/OSGSystem.dll ${CURRENT_PACKAGES_DIR}/bin/OSGSystem.dll)
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/rel/OSGBase.dll ${CURRENT_PACKAGES_DIR}/bin/OSGBase.dll)
file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/osg2-config)

file(RENAME ${CURRENT_PACKAGES_DIR}/lib/rel/OSGWindowWIN32.lib ${CURRENT_PACKAGES_DIR}/lib/OSGWindowWIN32.lib)
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/rel/OSGWindowGLUT.lib ${CURRENT_PACKAGES_DIR}/lib/OSGWindowGLUT.lib)
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/rel/OSGSystem.lib ${CURRENT_PACKAGES_DIR}/lib/OSGSystem.lib)
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/rel/OSGBase.lib ${CURRENT_PACKAGES_DIR}/lib/OSGBase.lib)


file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/debug)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/debug)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/rel)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/rel)

vcpkg_copy_pdbs()