From 59744f406ef9026b5ea53aa1b9b5f1a6fce696cd Mon Sep 17 00:00:00 2001 From: Lennart Trunk Date: Thu, 7 Mar 2019 02:04:24 +0100 Subject: [PATCH] [libqglviewer] add new port (#5024) * add initial portfile * [libqglviewer] Fix invalid msvc argument in build * [qt5-base] make whitespace change to force rebuild in CI system --- ports/libqglviewer/CONTROL | 4 +++ ports/libqglviewer/portfile.cmake | 22 +++++++++++++ .../use-default-config-on-all-platforms.patch | 33 +++++++++++++++++++ ports/qt5-base/portfile.cmake | 2 +- 4 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 ports/libqglviewer/CONTROL create mode 100644 ports/libqglviewer/portfile.cmake create mode 100644 ports/libqglviewer/use-default-config-on-all-platforms.patch diff --git a/ports/libqglviewer/CONTROL b/ports/libqglviewer/CONTROL new file mode 100644 index 0000000000..7112016f58 --- /dev/null +++ b/ports/libqglviewer/CONTROL @@ -0,0 +1,4 @@ +Source: libqglviewer +Version: 2.7.1 +Description: libQGLViewer is an open source C++ library based on Qt that eases the creation of OpenGL 3D viewers. +Build-Depends: qt5-base diff --git a/ports/libqglviewer/portfile.cmake b/ports/libqglviewer/portfile.cmake new file mode 100644 index 0000000000..52fb41ed44 --- /dev/null +++ b/ports/libqglviewer/portfile.cmake @@ -0,0 +1,22 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO GillesDebunne/libQGLViewer + REF 28a23f14997dc2e08990b884c07075b48979cac7 + SHA512 58058543e07857f8b1480301b72f789290eee2d65382bee29773bcc1e3f45cedcee33b762bdb870b6cae8a0daab38ebdecde40e2f02720cf0f6fcf10f2007f25 + HEAD_REF master + PATCHES "use-default-config-on-all-platforms.patch" +) + +vcpkg_configure_qmake(SOURCE_PATH ${SOURCE_PATH}/QGLViewer/QGLViewer.pro) + +vcpkg_build_qmake() + +file(INSTALL ${SOURCE_PATH}/QGLViewer DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN "*.h") +file(INSTALL ${SOURCE_PATH}/QGLViewer/QGLViewer2.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) +file(INSTALL ${SOURCE_PATH}/QGLViewer/QGLViewer2.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(INSTALL ${SOURCE_PATH}/QGLViewer/QGLViewerd2.dll ${SOURCE_PATH}/QGLViewer/QGLViewerd2.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +file(INSTALL ${SOURCE_PATH}/QGLViewer/QGLViewerd2.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + +file(INSTALL ${SOURCE_PATH}/LICENCE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libqglviewer RENAME copyright) diff --git a/ports/libqglviewer/use-default-config-on-all-platforms.patch b/ports/libqglviewer/use-default-config-on-all-platforms.patch new file mode 100644 index 0000000000..bd8281f226 --- /dev/null +++ b/ports/libqglviewer/use-default-config-on-all-platforms.patch @@ -0,0 +1,33 @@ +diff --git a/QGLViewer/QGLViewer.pro b/QGLViewer/QGLViewer.pro +index e0205e5..6db4c81 100644 +--- a/QGLViewer/QGLViewer.pro ++++ b/QGLViewer/QGLViewer.pro +@@ -108,9 +108,6 @@ contains( DEFINES, NO_VECTORIAL_RENDER ) { + # -- U n i x -- + # --------------- + unix { +- CONFIG -= debug debug_and_release +- CONFIG *= release +- + # INCLUDE_DIR and LIB_DIR specify where to install the include files and the library. + # Use qmake INCLUDE_DIR=... LIB_DIR=... , or qmake PREFIX=... to customize your installation. + isEmpty( PREFIX ) { +@@ -250,9 +247,6 @@ macx|darwin-g++ { + # -- W i n d o w s -- + # --------------------- + win32 { +- # Windows requires a debug lib version to link against debug applications +- CONFIG *= debug_and_release build_all +- + # Needed by Intel C++, (icl.exe) so that WINGDIAPI is a defined symbol in gl.h. + DEFINES *= WIN32 + +@@ -279,7 +273,7 @@ win32 { + QMAKE_CXXFLAGS *= -TP -GR + DEFINES += NOMINMAX + win32-msvc { +- QMAKE_CXXFLAGS *= -EH -FS ++ QMAKE_CXXFLAGS *= -EHs -FS + } else { + QMAKE_CXXFLAGS *= -EHs + } diff --git a/ports/qt5-base/portfile.cmake b/ports/qt5-base/portfile.cmake index 2d069c6f3a..8f7d0f0120 100644 --- a/ports/qt5-base/portfile.cmake +++ b/ports/qt5-base/portfile.cmake @@ -188,4 +188,4 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/qtdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_ file(COPY ${CMAKE_CURRENT_LIST_DIR}/qtdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/debug/plugins) file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) -# \ No newline at end of file +# \ No newline at end of file