From 1831ce4bcc6f0ca18c3425563bc2de8857f30e41 Mon Sep 17 00:00:00 2001 From: sigman Date: Wed, 7 Jun 2017 22:08:08 +0300 Subject: [PATCH 01/39] Magnum OpengGL 3d library port Added ports to support Magnum C++ OpenGL engine http://mosra.cz/blog/magnum.php and its direct dependencies --- ports/corrade/CONTROL | 3 +++ ports/corrade/portfile.cmake | 45 ++++++++++++++++++++++++++++++++++++ ports/magnum/CONTROL | 4 ++++ ports/magnum/portfile.cmake | 33 ++++++++++++++++++++++++++ 4 files changed, 85 insertions(+) create mode 100644 ports/corrade/CONTROL create mode 100644 ports/corrade/portfile.cmake create mode 100644 ports/magnum/CONTROL create mode 100644 ports/magnum/portfile.cmake diff --git a/ports/corrade/CONTROL b/ports/corrade/CONTROL new file mode 100644 index 0000000000..487766e89e --- /dev/null +++ b/ports/corrade/CONTROL @@ -0,0 +1,3 @@ +Source: corrade +Version: jun2017 +Description: C++11/C++14 multiplatform utility library http://mosra.cz/blog/corrade.php diff --git a/ports/corrade/portfile.cmake b/ports/corrade/portfile.cmake new file mode 100644 index 0000000000..91251ea6be --- /dev/null +++ b/ports/corrade/portfile.cmake @@ -0,0 +1,45 @@ +# + +set(CORRADE_HASH b87c50db3543367b6eb20dc72246c6687449b029) + +include(vcpkg_common_functions) + + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/corrade-${CORRADE_HASH}) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/mosra/corrade/archive/${CORRADE_HASH}.zip" + FILENAME "corrade-${CORRADE_HASH}.zip" + SHA512 b15b544f996b8c95fbdf73ff9b76deea465fdcf06f431b09f4bbb9a786f4e864fdb4f8c5a2977cb366ee2398c54eac4c469da29c2ab7c67d3b8f7cbf7d2120dc +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 + # OPTIONS_RELEASE -DOPTIMIZE=1 + # OPTIONS_DEBUG -DDEBUGGABLE=1 +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Drop a copy of tools +file(COPY ${CURRENT_PACKAGES_DIR}/bin/corrade-rc.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/) +# Tools require dlls +file(GLOB TO_COPY + ${CURRENT_PACKAGES_DIR}/bin/*.dll) +file(COPY ${TO_COPY} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/) + +file(GLOB_RECURSE TO_REMOVE + ${CURRENT_PACKAGES_DIR}/bin/*.exe + ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) +file(REMOVE ${TO_REMOVE}) + +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/corrade) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/corrade/COPYING ${CURRENT_PACKAGES_DIR}/share/corrade/copyright) + +vcpkg_copy_pdbs() \ No newline at end of file diff --git a/ports/magnum/CONTROL b/ports/magnum/CONTROL new file mode 100644 index 0000000000..d07dd31607 --- /dev/null +++ b/ports/magnum/CONTROL @@ -0,0 +1,4 @@ +Source: magnum +Version: jun2017 +Build-Depends: corrade, sdl2 +Description: C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php diff --git a/ports/magnum/portfile.cmake b/ports/magnum/portfile.cmake new file mode 100644 index 0000000000..10f9be3c5a --- /dev/null +++ b/ports/magnum/portfile.cmake @@ -0,0 +1,33 @@ +### + +set(MAGNUM_HASH c8416ca4c3e9b68ba62acc9f73de235526cb3d6e) + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/magnum-${MAGNUM_HASH}) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/mosra/magnum/archive/${MAGNUM_HASH}.zip" + FILENAME "magnum-${MAGNUM_HASH}.zip" + SHA512 1248efaba22568a753396192624690a478c69946cdbbffe83e34cb85d54ec65756b693e025bf477fc192e6fecce56dc1b68631e1a763986267b83d6530af6ef4 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS -DWITH_SDL2APPLICATION=ON + # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 + # OPTIONS_RELEASE -DOPTIMIZE=1 + # OPTIONS_DEBUG -DDEBUGGABLE=1 +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + + +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/magnum) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/magnum/COPYING ${CURRENT_PACKAGES_DIR}/share/magnum/copyright) + +vcpkg_copy_pdbs() \ No newline at end of file From f0605ca60a560ab1358177beec58a53068128753 Mon Sep 17 00:00:00 2001 From: sigman Date: Thu, 8 Jun 2017 02:48:04 +0300 Subject: [PATCH 02/39] [Magnum] Fix static library build Fixes cmake scripts to build a static version of the libraries. --- ports/corrade/portfile.cmake | 12 ++++++++++++ ports/magnum/portfile.cmake | 11 +++++++++++ 2 files changed, 23 insertions(+) diff --git a/ports/corrade/portfile.cmake b/ports/corrade/portfile.cmake index 91251ea6be..2f5578b435 100644 --- a/ports/corrade/portfile.cmake +++ b/ports/corrade/portfile.cmake @@ -13,9 +13,16 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(BUILD_STATIC 1) +else() + set(BUILD_STATIC 0) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS -DBUILD_STATIC=${BUILD_STATIC} # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 # OPTIONS_RELEASE -DOPTIMIZE=1 # OPTIONS_DEBUG -DDEBUGGABLE=1 @@ -38,6 +45,11 @@ file(GLOB_RECURSE TO_REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) file(REMOVE ${TO_REMOVE}) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + # Handle copyright file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/corrade) file(RENAME ${CURRENT_PACKAGES_DIR}/share/corrade/COPYING ${CURRENT_PACKAGES_DIR}/share/corrade/copyright) diff --git a/ports/magnum/portfile.cmake b/ports/magnum/portfile.cmake index 10f9be3c5a..71517c15c2 100644 --- a/ports/magnum/portfile.cmake +++ b/ports/magnum/portfile.cmake @@ -11,10 +11,17 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(BUILD_STATIC 1) +else() + set(BUILD_STATIC 0) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA # Disable this option if project cannot be built with Ninja OPTIONS -DWITH_SDL2APPLICATION=ON + OPTIONS -DBUILD_STATIC=${BUILD_STATIC} # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 # OPTIONS_RELEASE -DOPTIMIZE=1 # OPTIONS_DEBUG -DDEBUGGABLE=1 @@ -25,6 +32,10 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() # Handle copyright file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/magnum) From 741caef3fb352f6fbd5d4d59592f0c2629892064 Mon Sep 17 00:00:00 2001 From: sigman Date: Fri, 9 Jun 2017 15:09:05 +0300 Subject: [PATCH 03/39] [Magnum][Corrade] Cleanup and Audio support Enabled audio support in magnum by default via openal-soft dependency. --- ports/corrade/portfile.cmake | 3 --- ports/magnum/CONTROL | 2 +- ports/magnum/portfile.cmake | 5 ++--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/ports/corrade/portfile.cmake b/ports/corrade/portfile.cmake index 2f5578b435..76979496b8 100644 --- a/ports/corrade/portfile.cmake +++ b/ports/corrade/portfile.cmake @@ -23,9 +23,6 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA # Disable this option if project cannot be built with Ninja OPTIONS -DBUILD_STATIC=${BUILD_STATIC} - # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 ) vcpkg_install_cmake() diff --git a/ports/magnum/CONTROL b/ports/magnum/CONTROL index d07dd31607..f934ba0a6e 100644 --- a/ports/magnum/CONTROL +++ b/ports/magnum/CONTROL @@ -1,4 +1,4 @@ Source: magnum Version: jun2017 -Build-Depends: corrade, sdl2 +Build-Depends: corrade, sdl2, openal-soft Description: C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php diff --git a/ports/magnum/portfile.cmake b/ports/magnum/portfile.cmake index 71517c15c2..dd934b31de 100644 --- a/ports/magnum/portfile.cmake +++ b/ports/magnum/portfile.cmake @@ -21,10 +21,9 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA # Disable this option if project cannot be built with Ninja OPTIONS -DWITH_SDL2APPLICATION=ON + OPTIONS -DWITH_AUDIO=ON + OPTIONS -DWITH_WAVAUDIOIMPORTER=ON OPTIONS -DBUILD_STATIC=${BUILD_STATIC} - # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 ) vcpkg_install_cmake() From 1b761052002a9466704d53ea5b5029df9e89aaa0 Mon Sep 17 00:00:00 2001 From: sigman Date: Fri, 9 Jun 2017 15:17:01 +0300 Subject: [PATCH 04/39] [Magnum-plugins] Import plugins for the magnum opengl library Added magnum-plugins library with the reasonable defaults and minimal dependencies . --- ports/magnum-plugins/CONTROL | 4 +++ ports/magnum-plugins/portfile.cmake | 52 +++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 ports/magnum-plugins/CONTROL create mode 100644 ports/magnum-plugins/portfile.cmake diff --git a/ports/magnum-plugins/CONTROL b/ports/magnum-plugins/CONTROL new file mode 100644 index 0000000000..0aec0062d1 --- /dev/null +++ b/ports/magnum-plugins/CONTROL @@ -0,0 +1,4 @@ +Source: magnum-plugins +Version: jun2017 +Build-Depends: stb, magnum +Description: Plugins for C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php diff --git a/ports/magnum-plugins/portfile.cmake b/ports/magnum-plugins/portfile.cmake new file mode 100644 index 0000000000..fae2b08e71 --- /dev/null +++ b/ports/magnum-plugins/portfile.cmake @@ -0,0 +1,52 @@ +### + +set(MAGNUM_PLUGINS_HASH 645b50647d5164c5ec8f5bc83ba2578f6cfe7d80) + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/magnum-plugins-${MAGNUM_PLUGINS_HASH}) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/mosra/magnum-plugins/archive/${MAGNUM_PLUGINS_HASH}.zip" + FILENAME "magnum-plugins-${MAGNUM_PLUGINS_HASH}.zip" + SHA512 5ab603f50cee325113e3f1ccd67d294d32f7386334136304ad8135ac8ff0218cbd2834197c7db85bb5fd11c69e28d00217fa5d9dbdad71a83e372722a6f8bda0 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(BUILD_STATIC 1) +else() + set(BUILD_STATIC 0) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS -DWITH_STBIMAGECONVERTER=ON + OPTIONS -DWITH_STBIMAGEIMPORTER=ON + OPTIONS -DWITH_STBTRUETYPEFONT=ON + OPTIONS -DWITH_STBTRUETYPEFONT=ON + OPTIONS -DWITH_MINIEXRIMAGECONVERTER=ON + OPTIONS -DWITH_OPENGEXIMPORTER=ON + OPTIONS -DWITH_OPENGEXIMPORTER=ON + OPTIONS -DWITH_STANFORDIMPORTER=ON + OPTIONS -DWITH_DRWAVAUDIOIMPORTER=ON + OPTIONS -DWITH_ANYAUDIOIMPORTER=ON + OPTIONS -DWITH_ANYIMAGECONVERTER=ON + OPTIONS -DWITH_ANYSCENEIMPORTER=ON + OPTIONS -DBUILD_STATIC=${BUILD_STATIC} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/magnum-plugins) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/magnum-plugins/COPYING ${CURRENT_PACKAGES_DIR}/share/magnum-plugins/copyright) + +vcpkg_copy_pdbs() \ No newline at end of file From 8cbadbffdcf0f1f4d5acd16012ecbb47532bdac9 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 9 Jun 2017 20:38:25 -0700 Subject: [PATCH 05/39] [corrade][magnum-plugins][magnum] Use vcpkg_from_github() --- ports/corrade/CONTROL | 2 +- ports/corrade/portfile.cmake | 25 ++++++----------- ports/magnum-plugins/CONTROL | 2 +- ports/magnum-plugins/portfile.cmake | 43 ++++++++++++++--------------- ports/magnum/CONTROL | 2 +- ports/magnum/portfile.cmake | 25 ++++++++--------- 6 files changed, 43 insertions(+), 56 deletions(-) diff --git a/ports/corrade/CONTROL b/ports/corrade/CONTROL index 487766e89e..748d0c61af 100644 --- a/ports/corrade/CONTROL +++ b/ports/corrade/CONTROL @@ -1,3 +1,3 @@ Source: corrade -Version: jun2017 +Version: jun2017-1 Description: C++11/C++14 multiplatform utility library http://mosra.cz/blog/corrade.php diff --git a/ports/corrade/portfile.cmake b/ports/corrade/portfile.cmake index 76979496b8..113d24dc72 100644 --- a/ports/corrade/portfile.cmake +++ b/ports/corrade/portfile.cmake @@ -1,17 +1,11 @@ -# - -set(CORRADE_HASH b87c50db3543367b6eb20dc72246c6687449b029) - include(vcpkg_common_functions) - - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/corrade-${CORRADE_HASH}) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/mosra/corrade/archive/${CORRADE_HASH}.zip" - FILENAME "corrade-${CORRADE_HASH}.zip" - SHA512 b15b544f996b8c95fbdf73ff9b76deea465fdcf06f431b09f4bbb9a786f4e864fdb4f8c5a2977cb366ee2398c54eac4c469da29c2ab7c67d3b8f7cbf7d2120dc +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mosra/corrade + REF b87c50db3543367b6eb20dc72246c6687449b029 + SHA512 882ccba210c6db7dc8a70e425e1cc119dd1c1a880b8b7d36b2c9478a2105294294680495e7bafb8c0bc7f667bd247dbd008e8ff133a8ea26b13df781a8896297 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(BUILD_STATIC 1) @@ -31,11 +25,10 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) # Drop a copy of tools -file(COPY ${CURRENT_PACKAGES_DIR}/bin/corrade-rc.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/) +file(COPY ${CURRENT_PACKAGES_DIR}/bin/corrade-rc.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/corrade) + # Tools require dlls -file(GLOB TO_COPY - ${CURRENT_PACKAGES_DIR}/bin/*.dll) -file(COPY ${TO_COPY} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/corrade) file(GLOB_RECURSE TO_REMOVE ${CURRENT_PACKAGES_DIR}/bin/*.exe diff --git a/ports/magnum-plugins/CONTROL b/ports/magnum-plugins/CONTROL index 0aec0062d1..1bf1111c4c 100644 --- a/ports/magnum-plugins/CONTROL +++ b/ports/magnum-plugins/CONTROL @@ -1,4 +1,4 @@ Source: magnum-plugins -Version: jun2017 +Version: jun2017-1 Build-Depends: stb, magnum Description: Plugins for C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php diff --git a/ports/magnum-plugins/portfile.cmake b/ports/magnum-plugins/portfile.cmake index fae2b08e71..199789c999 100644 --- a/ports/magnum-plugins/portfile.cmake +++ b/ports/magnum-plugins/portfile.cmake @@ -1,15 +1,11 @@ -### - -set(MAGNUM_PLUGINS_HASH 645b50647d5164c5ec8f5bc83ba2578f6cfe7d80) - include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/magnum-plugins-${MAGNUM_PLUGINS_HASH}) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/mosra/magnum-plugins/archive/${MAGNUM_PLUGINS_HASH}.zip" - FILENAME "magnum-plugins-${MAGNUM_PLUGINS_HASH}.zip" - SHA512 5ab603f50cee325113e3f1ccd67d294d32f7386334136304ad8135ac8ff0218cbd2834197c7db85bb5fd11c69e28d00217fa5d9dbdad71a83e372722a6f8bda0 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mosra/magnum-plugins + REF 645b50647d5164c5ec8f5bc83ba2578f6cfe7d80 + SHA512 73c7fb7e9a5a9e2a4ee7314b5d41d98ada9cf1a50c1cd833c2ae19c5bdab66862f3696f142e987f9d2b551142e94f96a2d8ccad37625682c8391400091dcf879 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(BUILD_STATIC 1) @@ -20,19 +16,20 @@ endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA # Disable this option if project cannot be built with Ninja - OPTIONS -DWITH_STBIMAGECONVERTER=ON - OPTIONS -DWITH_STBIMAGEIMPORTER=ON - OPTIONS -DWITH_STBTRUETYPEFONT=ON - OPTIONS -DWITH_STBTRUETYPEFONT=ON - OPTIONS -DWITH_MINIEXRIMAGECONVERTER=ON - OPTIONS -DWITH_OPENGEXIMPORTER=ON - OPTIONS -DWITH_OPENGEXIMPORTER=ON - OPTIONS -DWITH_STANFORDIMPORTER=ON - OPTIONS -DWITH_DRWAVAUDIOIMPORTER=ON - OPTIONS -DWITH_ANYAUDIOIMPORTER=ON - OPTIONS -DWITH_ANYIMAGECONVERTER=ON - OPTIONS -DWITH_ANYSCENEIMPORTER=ON - OPTIONS -DBUILD_STATIC=${BUILD_STATIC} + OPTIONS + -DWITH_STBIMAGECONVERTER=ON + -DWITH_STBIMAGEIMPORTER=ON + -DWITH_STBTRUETYPEFONT=ON + -DWITH_STBTRUETYPEFONT=ON + -DWITH_MINIEXRIMAGECONVERTER=ON + -DWITH_OPENGEXIMPORTER=ON + -DWITH_OPENGEXIMPORTER=ON + -DWITH_STANFORDIMPORTER=ON + -DWITH_DRWAVAUDIOIMPORTER=ON + -DWITH_ANYAUDIOIMPORTER=ON + -DWITH_ANYIMAGECONVERTER=ON + -DWITH_ANYSCENEIMPORTER=ON + -DBUILD_STATIC=${BUILD_STATIC} ) vcpkg_install_cmake() diff --git a/ports/magnum/CONTROL b/ports/magnum/CONTROL index f934ba0a6e..a110136f23 100644 --- a/ports/magnum/CONTROL +++ b/ports/magnum/CONTROL @@ -1,4 +1,4 @@ Source: magnum -Version: jun2017 +Version: jun2017-1 Build-Depends: corrade, sdl2, openal-soft Description: C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php diff --git a/ports/magnum/portfile.cmake b/ports/magnum/portfile.cmake index dd934b31de..67d1f825a8 100644 --- a/ports/magnum/portfile.cmake +++ b/ports/magnum/portfile.cmake @@ -1,15 +1,11 @@ -### - -set(MAGNUM_HASH c8416ca4c3e9b68ba62acc9f73de235526cb3d6e) - include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/magnum-${MAGNUM_HASH}) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/mosra/magnum/archive/${MAGNUM_HASH}.zip" - FILENAME "magnum-${MAGNUM_HASH}.zip" - SHA512 1248efaba22568a753396192624690a478c69946cdbbffe83e34cb85d54ec65756b693e025bf477fc192e6fecce56dc1b68631e1a763986267b83d6530af6ef4 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mosra/magnum + REF c8416ca4c3e9b68ba62acc9f73de235526cb3d6e + SHA512 d595be48ae44d944d5747880e0108bdc445b92fcc306f0169699e2b80500919647063ac88ef67491b2d8e92ae1f0612cd8768fc63d8cc4ffe4c625988b63504d + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(BUILD_STATIC 1) @@ -20,10 +16,11 @@ endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA # Disable this option if project cannot be built with Ninja - OPTIONS -DWITH_SDL2APPLICATION=ON - OPTIONS -DWITH_AUDIO=ON - OPTIONS -DWITH_WAVAUDIOIMPORTER=ON - OPTIONS -DBUILD_STATIC=${BUILD_STATIC} + OPTIONS + -DWITH_SDL2APPLICATION=ON + -DWITH_AUDIO=ON + -DWITH_WAVAUDIOIMPORTER=ON + -DBUILD_STATIC=${BUILD_STATIC} ) vcpkg_install_cmake() From 27db5c14bbe9025dd5953b6cd4accb51e4be0501 Mon Sep 17 00:00:00 2001 From: sigman Date: Sat, 10 Jun 2017 17:48:40 +0300 Subject: [PATCH 06/39] [magnum-plugins] Patch for missing include vs2017 regression --- ports/magnum-plugins/001-fix-include.patch | 12 ++++++++++++ ports/magnum-plugins/CONTROL | 2 +- ports/magnum-plugins/portfile.cmake | 5 +++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 ports/magnum-plugins/001-fix-include.patch diff --git a/ports/magnum-plugins/001-fix-include.patch b/ports/magnum-plugins/001-fix-include.patch new file mode 100644 index 0000000000..c6aa9c755b --- /dev/null +++ b/ports/magnum-plugins/001-fix-include.patch @@ -0,0 +1,12 @@ +diff --git a/src/MagnumPlugins/OpenGexImporter/OpenDdl/OpenDdl.cpp b/src/MagnumPlugins/OpenGexImporter/OpenDdl/OpenDdl.cpp +index c94ee98..843d1ec 100644 +--- a/src/MagnumPlugins/OpenGexImporter/OpenDdl/OpenDdl.cpp ++++ b/src/MagnumPlugins/OpenGexImporter/OpenDdl/OpenDdl.cpp +@@ -25,6 +25,7 @@ + + #include + #include ++#include + #include + + #include "MagnumPlugins/OpenGexImporter/OpenDdl/Document.h" diff --git a/ports/magnum-plugins/CONTROL b/ports/magnum-plugins/CONTROL index 1bf1111c4c..087383c4ae 100644 --- a/ports/magnum-plugins/CONTROL +++ b/ports/magnum-plugins/CONTROL @@ -1,4 +1,4 @@ Source: magnum-plugins -Version: jun2017-1 +Version: jun2017-2 Build-Depends: stb, magnum Description: Plugins for C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php diff --git a/ports/magnum-plugins/portfile.cmake b/ports/magnum-plugins/portfile.cmake index 199789c999..dde435ee41 100644 --- a/ports/magnum-plugins/portfile.cmake +++ b/ports/magnum-plugins/portfile.cmake @@ -7,6 +7,11 @@ vcpkg_from_github( HEAD_REF master ) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/001-fix-include.patch +) + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(BUILD_STATIC 1) else() From 61dbead6fc9dc3b27515db9fbc4d48e772f298bd Mon Sep 17 00:00:00 2001 From: sigman78 Date: Tue, 13 Jun 2017 12:35:54 +0300 Subject: [PATCH 07/39] [magnum] Patch SDL2 includes, msbuild compatibility Concerning SDL2 includes and how do they work. It is seems what the common practice is to append 'SDL2' include path to the compiler options and then do plain #include "SDL.h". While it works in cmake based projects it won't pass in msbuild ones. This patch changes #include to 'global' style and solves the problem. --- ports/magnum/001-sdl-includes.patch | 20 ++++++++++++++++++++ ports/magnum/CONTROL | 2 +- ports/magnum/portfile.cmake | 5 +++++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 ports/magnum/001-sdl-includes.patch diff --git a/ports/magnum/001-sdl-includes.patch b/ports/magnum/001-sdl-includes.patch new file mode 100644 index 0000000000..afa1301d91 --- /dev/null +++ b/ports/magnum/001-sdl-includes.patch @@ -0,0 +1,20 @@ +diff --git a/src/Magnum/Platform/Sdl2Application.h b/src/Magnum/Platform/Sdl2Application.h +index 99c3174..311b2c1 100644 +--- a/src/Magnum/Platform/Sdl2Application.h ++++ b/src/Magnum/Platform/Sdl2Application.h +@@ -42,11 +42,11 @@ + #ifdef CORRADE_TARGET_WINDOWS /* Windows version of SDL2 redefines main(), we don't want that */ + #define SDL_MAIN_HANDLED + #endif +-#include +-#include ++#include ++#include + + #ifdef CORRADE_TARGET_WINDOWS_RT +-#include /* For SDL_WinRTRunApp */ ++#include /* For SDL_WinRTRunApp */ + #include /* For the WinMain entrypoint */ + #endif + + diff --git a/ports/magnum/CONTROL b/ports/magnum/CONTROL index a110136f23..c4530c2548 100644 --- a/ports/magnum/CONTROL +++ b/ports/magnum/CONTROL @@ -1,4 +1,4 @@ Source: magnum -Version: jun2017-1 +Version: jun2017-2 Build-Depends: corrade, sdl2, openal-soft Description: C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php diff --git a/ports/magnum/portfile.cmake b/ports/magnum/portfile.cmake index 67d1f825a8..81e2123b69 100644 --- a/ports/magnum/portfile.cmake +++ b/ports/magnum/portfile.cmake @@ -7,6 +7,11 @@ vcpkg_from_github( HEAD_REF master ) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/001-sdl-includes.patch +) + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(BUILD_STATIC 1) else() From 4167807f09e3f772a87d0f1f0ae5f51f9cdc5610 Mon Sep 17 00:00:00 2001 From: sigman78 Date: Tue, 13 Jun 2017 15:20:29 +0300 Subject: [PATCH 08/39] [magnum] Emit plugin binary path to the header Drop-in solution for the msbuild users. --- ports/magnum/002-magnum-defs.patch | 26 ++++++++++++++++++++++++++ ports/magnum/CONTROL | 2 +- ports/magnum/portfile.cmake | 6 +++++- 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 ports/magnum/002-magnum-defs.patch diff --git a/ports/magnum/002-magnum-defs.patch b/ports/magnum/002-magnum-defs.patch new file mode 100644 index 0000000000..de7d1cb10e --- /dev/null +++ b/ports/magnum/002-magnum-defs.patch @@ -0,0 +1,26 @@ +diff --git a/src/Magnum/configure.h.cmake b/src/Magnum/configure.h.cmake +index 6a752d4..cd1277b 100644 +--- a/src/Magnum/configure.h.cmake ++++ b/src/Magnum/configure.h.cmake +@@ -35,4 +35,23 @@ + #cmakedefine MAGNUM_TARGET_WEBGL + #cmakedefine MAGNUM_TARGET_HEADLESS + ++// Plugin directories ++#ifdef _DEBUG ++#define MAGNUM_PLUGINS_DIR "${MAGNUM_PLUGINS_DEBUG_DIR}" ++#define MAGNUM_PLUGINS_FONT_DIR "${MAGNUM_PLUGINS_FONT_DEBUG_DIR}" ++#define MAGNUM_PLUGINS_FONTCONVERTER_DIR "${MAGNUM_PLUGINS_FONTCONVERTER_DEBUG_DIR}" ++#define MAGNUM_PLUGINS_IMAGECONVERTER_DIR "${MAGNUM_PLUGINS_IMAGECONVERTER_DEBUG_DIR}" ++#define MAGNUM_PLUGINS_IMPORTER_DIR "${MAGNUM_PLUGINS_IMPORTER_DEBUG_DIR}" ++#define MAGNUM_PLUGINS_AUDIOIMPORTER_DIR "${MAGNUM_PLUGINS_AUDIOIMPORTER_DEBUG_DIR}" ++#else ++#define MAGNUM_PLUGINS_DIR "${MAGNUM_PLUGINS_RELEASE_DIR}" ++#define MAGNUM_PLUGINS_FONT_DIR "${MAGNUM_PLUGINS_FONT_RELEASE_DIR}" ++#define MAGNUM_PLUGINS_FONTCONVERTER_DIR "${MAGNUM_PLUGINS_FONTCONVERTER_RELEASE_DIR}" ++#define MAGNUM_PLUGINS_IMAGECONVERTER_DIR "${MAGNUM_PLUGINS_IMAGECONVERTER_RELEASE_DIR}" ++#define MAGNUM_PLUGINS_IMPORTER_DIR "${MAGNUM_PLUGINS_IMPORTER_RELEASE_DIR}" ++#define MAGNUM_PLUGINS_AUDIOIMPORTER_DIR "${MAGNUM_PLUGINS_AUDIOIMPORTER_RELEASE_DIR}" ++#endif ++ + #endif diff --git a/ports/magnum/CONTROL b/ports/magnum/CONTROL index c4530c2548..9160e22873 100644 --- a/ports/magnum/CONTROL +++ b/ports/magnum/CONTROL @@ -1,4 +1,4 @@ Source: magnum -Version: jun2017-2 +Version: jun2017-3 Build-Depends: corrade, sdl2, openal-soft Description: C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php diff --git a/ports/magnum/portfile.cmake b/ports/magnum/portfile.cmake index 81e2123b69..3aed5a7374 100644 --- a/ports/magnum/portfile.cmake +++ b/ports/magnum/portfile.cmake @@ -9,7 +9,9 @@ vcpkg_from_github( vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/001-sdl-includes.patch + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/001-sdl-includes.patch + ${CMAKE_CURRENT_LIST_DIR}/002-magnum-defs.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) @@ -26,6 +28,8 @@ vcpkg_configure_cmake( -DWITH_AUDIO=ON -DWITH_WAVAUDIOIMPORTER=ON -DBUILD_STATIC=${BUILD_STATIC} + -DMAGNUM_PLUGINS_DEBUG_DIR=${CURRENT_INSTALLED_DIR}/debug/bin/magnum-d + -DMAGNUM_PLUGINS_RELEASE_DIR=${CURRENT_INSTALLED_DIR}/bin/magnum ) vcpkg_install_cmake() From 7b9275f1b35e6533dc63d1f1dd7b61066216e3f1 Mon Sep 17 00:00:00 2001 From: sigman Date: Thu, 15 Jun 2017 17:49:43 +0300 Subject: [PATCH 09/39] [corrade][magnum][magnum-plugins] Updated to upstream, enabled more features in [magnum] Removed plugin location defines. Fixed tools search path in FindCorrade, FindMagnum cmake modules. --- ports/corrade/CONTROL | 2 +- ports/corrade/portfile.cmake | 4 +-- ports/magnum-plugins/001-fix-include.patch | 12 --------- ports/magnum-plugins/001-tools-path.patch | 26 +++++++++++++++++++ ports/magnum-plugins/CONTROL | 2 +- ports/magnum-plugins/portfile.cmake | 7 ++--- ports/magnum/002-magnum-defs.patch | 26 ------------------- ports/magnum/002-tools-path.patch | 26 +++++++++++++++++++ ports/magnum/CONTROL | 2 +- ports/magnum/portfile.cmake | 30 +++++++++++++++++++--- 10 files changed, 88 insertions(+), 49 deletions(-) delete mode 100644 ports/magnum-plugins/001-fix-include.patch create mode 100644 ports/magnum-plugins/001-tools-path.patch delete mode 100644 ports/magnum/002-magnum-defs.patch create mode 100644 ports/magnum/002-tools-path.patch diff --git a/ports/corrade/CONTROL b/ports/corrade/CONTROL index 748d0c61af..d8fb3681ae 100644 --- a/ports/corrade/CONTROL +++ b/ports/corrade/CONTROL @@ -1,3 +1,3 @@ Source: corrade -Version: jun2017-1 +Version: jun2017-2 Description: C++11/C++14 multiplatform utility library http://mosra.cz/blog/corrade.php diff --git a/ports/corrade/portfile.cmake b/ports/corrade/portfile.cmake index 113d24dc72..3ae3710f60 100644 --- a/ports/corrade/portfile.cmake +++ b/ports/corrade/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mosra/corrade - REF b87c50db3543367b6eb20dc72246c6687449b029 - SHA512 882ccba210c6db7dc8a70e425e1cc119dd1c1a880b8b7d36b2c9478a2105294294680495e7bafb8c0bc7f667bd247dbd008e8ff133a8ea26b13df781a8896297 + REF c182fe636894a998f241212d0205d0c126b7926f + SHA512 e62486368eab9c5f90ef9f4af91500f465d9e3baa6e5f6e9f2a49844d09676faefcb965a9d5b27a54eda19436af6b23dcda19504be6cd0dcd52dfad2ad4bfa21 HEAD_REF master ) diff --git a/ports/magnum-plugins/001-fix-include.patch b/ports/magnum-plugins/001-fix-include.patch deleted file mode 100644 index c6aa9c755b..0000000000 --- a/ports/magnum-plugins/001-fix-include.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/src/MagnumPlugins/OpenGexImporter/OpenDdl/OpenDdl.cpp b/src/MagnumPlugins/OpenGexImporter/OpenDdl/OpenDdl.cpp -index c94ee98..843d1ec 100644 ---- a/src/MagnumPlugins/OpenGexImporter/OpenDdl/OpenDdl.cpp -+++ b/src/MagnumPlugins/OpenGexImporter/OpenDdl/OpenDdl.cpp -@@ -25,6 +25,7 @@ - - #include - #include -+#include - #include - - #include "MagnumPlugins/OpenGexImporter/OpenDdl/Document.h" diff --git a/ports/magnum-plugins/001-tools-path.patch b/ports/magnum-plugins/001-tools-path.patch new file mode 100644 index 0000000000..18a351c2ea --- /dev/null +++ b/ports/magnum-plugins/001-tools-path.patch @@ -0,0 +1,26 @@ +diff --git a/modules/FindCorrade.cmake b/modules/FindCorrade.cmake +index e63bc03..052006f 100644 +--- a/modules/FindCorrade.cmake ++++ b/modules/FindCorrade.cmake +@@ -397,7 +397,7 @@ foreach(_component ${Corrade_FIND_COMPONENTS}) + if(_component MATCHES ${_CORRADE_EXECUTABLE_COMPONENTS}) + add_executable(Corrade::${_component} IMPORTED) + +- find_program(CORRADE_${_COMPONENT}_EXECUTABLE corrade-${_component}) ++ find_program(CORRADE_${_COMPONENT}_EXECUTABLE corrade-${_component} PATH_SUFFIXES corrade) + mark_as_advanced(CORRADE_${_COMPONENT}_EXECUTABLE) + + if(CORRADE_${_COMPONENT}_EXECUTABLE) +diff --git a/modules/FindMagnum.cmake b/modules/FindMagnum.cmake +index 8df555d..12f7aa4 100644 +--- a/modules/FindMagnum.cmake ++++ b/modules/FindMagnum.cmake +@@ -493,7 +493,7 @@ foreach(_component ${Magnum_FIND_COMPONENTS}) + if(_component MATCHES ${_MAGNUM_EXECUTABLE_COMPONENTS}) + add_executable(Magnum::${_component} IMPORTED) + +- find_program(MAGNUM_${_COMPONENT}_EXECUTABLE magnum-${_component}) ++ find_program(MAGNUM_${_COMPONENT}_EXECUTABLE magnum-${_component} PATH_SUFFIXES magnum) + mark_as_advanced(MAGNUM_${_COMPONENT}_EXECUTABLE) + + if(MAGNUM_${_COMPONENT}_EXECUTABLE) diff --git a/ports/magnum-plugins/CONTROL b/ports/magnum-plugins/CONTROL index 087383c4ae..9d684689a1 100644 --- a/ports/magnum-plugins/CONTROL +++ b/ports/magnum-plugins/CONTROL @@ -1,4 +1,4 @@ Source: magnum-plugins -Version: jun2017-2 +Version: jun2017-3 Build-Depends: stb, magnum Description: Plugins for C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php diff --git a/ports/magnum-plugins/portfile.cmake b/ports/magnum-plugins/portfile.cmake index dde435ee41..0fe8f83a10 100644 --- a/ports/magnum-plugins/portfile.cmake +++ b/ports/magnum-plugins/portfile.cmake @@ -2,14 +2,15 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mosra/magnum-plugins - REF 645b50647d5164c5ec8f5bc83ba2578f6cfe7d80 - SHA512 73c7fb7e9a5a9e2a4ee7314b5d41d98ada9cf1a50c1cd833c2ae19c5bdab66862f3696f142e987f9d2b551142e94f96a2d8ccad37625682c8391400091dcf879 + REF 34a3bc34335ca05097e735db19fe1fae81dbfbb5 + SHA512 918c3eeae246d1ac67e3595c50ff599872a0c1498e9a8a0386ad656f3d9d2209b048b53c25f198660e15201147795578c5c931b00116da46fd77d8e91c0826cb HEAD_REF master ) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/001-fix-include.patch + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/001-tools-path.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) diff --git a/ports/magnum/002-magnum-defs.patch b/ports/magnum/002-magnum-defs.patch deleted file mode 100644 index de7d1cb10e..0000000000 --- a/ports/magnum/002-magnum-defs.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/src/Magnum/configure.h.cmake b/src/Magnum/configure.h.cmake -index 6a752d4..cd1277b 100644 ---- a/src/Magnum/configure.h.cmake -+++ b/src/Magnum/configure.h.cmake -@@ -35,4 +35,23 @@ - #cmakedefine MAGNUM_TARGET_WEBGL - #cmakedefine MAGNUM_TARGET_HEADLESS - -+// Plugin directories -+#ifdef _DEBUG -+#define MAGNUM_PLUGINS_DIR "${MAGNUM_PLUGINS_DEBUG_DIR}" -+#define MAGNUM_PLUGINS_FONT_DIR "${MAGNUM_PLUGINS_FONT_DEBUG_DIR}" -+#define MAGNUM_PLUGINS_FONTCONVERTER_DIR "${MAGNUM_PLUGINS_FONTCONVERTER_DEBUG_DIR}" -+#define MAGNUM_PLUGINS_IMAGECONVERTER_DIR "${MAGNUM_PLUGINS_IMAGECONVERTER_DEBUG_DIR}" -+#define MAGNUM_PLUGINS_IMPORTER_DIR "${MAGNUM_PLUGINS_IMPORTER_DEBUG_DIR}" -+#define MAGNUM_PLUGINS_AUDIOIMPORTER_DIR "${MAGNUM_PLUGINS_AUDIOIMPORTER_DEBUG_DIR}" -+#else -+#define MAGNUM_PLUGINS_DIR "${MAGNUM_PLUGINS_RELEASE_DIR}" -+#define MAGNUM_PLUGINS_FONT_DIR "${MAGNUM_PLUGINS_FONT_RELEASE_DIR}" -+#define MAGNUM_PLUGINS_FONTCONVERTER_DIR "${MAGNUM_PLUGINS_FONTCONVERTER_RELEASE_DIR}" -+#define MAGNUM_PLUGINS_IMAGECONVERTER_DIR "${MAGNUM_PLUGINS_IMAGECONVERTER_RELEASE_DIR}" -+#define MAGNUM_PLUGINS_IMPORTER_DIR "${MAGNUM_PLUGINS_IMPORTER_RELEASE_DIR}" -+#define MAGNUM_PLUGINS_AUDIOIMPORTER_DIR "${MAGNUM_PLUGINS_AUDIOIMPORTER_RELEASE_DIR}" -+#endif -+ - #endif diff --git a/ports/magnum/002-tools-path.patch b/ports/magnum/002-tools-path.patch new file mode 100644 index 0000000000..18a351c2ea --- /dev/null +++ b/ports/magnum/002-tools-path.patch @@ -0,0 +1,26 @@ +diff --git a/modules/FindCorrade.cmake b/modules/FindCorrade.cmake +index e63bc03..052006f 100644 +--- a/modules/FindCorrade.cmake ++++ b/modules/FindCorrade.cmake +@@ -397,7 +397,7 @@ foreach(_component ${Corrade_FIND_COMPONENTS}) + if(_component MATCHES ${_CORRADE_EXECUTABLE_COMPONENTS}) + add_executable(Corrade::${_component} IMPORTED) + +- find_program(CORRADE_${_COMPONENT}_EXECUTABLE corrade-${_component}) ++ find_program(CORRADE_${_COMPONENT}_EXECUTABLE corrade-${_component} PATH_SUFFIXES corrade) + mark_as_advanced(CORRADE_${_COMPONENT}_EXECUTABLE) + + if(CORRADE_${_COMPONENT}_EXECUTABLE) +diff --git a/modules/FindMagnum.cmake b/modules/FindMagnum.cmake +index 8df555d..12f7aa4 100644 +--- a/modules/FindMagnum.cmake ++++ b/modules/FindMagnum.cmake +@@ -493,7 +493,7 @@ foreach(_component ${Magnum_FIND_COMPONENTS}) + if(_component MATCHES ${_MAGNUM_EXECUTABLE_COMPONENTS}) + add_executable(Magnum::${_component} IMPORTED) + +- find_program(MAGNUM_${_COMPONENT}_EXECUTABLE magnum-${_component}) ++ find_program(MAGNUM_${_COMPONENT}_EXECUTABLE magnum-${_component} PATH_SUFFIXES magnum) + mark_as_advanced(MAGNUM_${_COMPONENT}_EXECUTABLE) + + if(MAGNUM_${_COMPONENT}_EXECUTABLE) diff --git a/ports/magnum/CONTROL b/ports/magnum/CONTROL index 9160e22873..9245e4380e 100644 --- a/ports/magnum/CONTROL +++ b/ports/magnum/CONTROL @@ -1,4 +1,4 @@ Source: magnum -Version: jun2017-3 +Version: jun2017-4 Build-Depends: corrade, sdl2, openal-soft Description: C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php diff --git a/ports/magnum/portfile.cmake b/ports/magnum/portfile.cmake index 3aed5a7374..14d5e0846a 100644 --- a/ports/magnum/portfile.cmake +++ b/ports/magnum/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mosra/magnum - REF c8416ca4c3e9b68ba62acc9f73de235526cb3d6e - SHA512 d595be48ae44d944d5747880e0108bdc445b92fcc306f0169699e2b80500919647063ac88ef67491b2d8e92ae1f0612cd8768fc63d8cc4ffe4c625988b63504d + REF ed7eac0b42a598dff8984830e7f943dd6af07deb + SHA512 843e209b82b4f6f7c3f9612aec2641a28cb09361eefefe435bb7d2c06d0e4df65b6b9adf5893222cf31ddc3ccec967eb343da1da6180e9fbfef1b26234e145d5 HEAD_REF master ) @@ -11,7 +11,7 @@ vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/001-sdl-includes.patch - ${CMAKE_CURRENT_LIST_DIR}/002-magnum-defs.patch + ${CMAKE_CURRENT_LIST_DIR}/002-tools-path.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) @@ -25,15 +25,39 @@ vcpkg_configure_cmake( PREFER_NINJA # Disable this option if project cannot be built with Ninja OPTIONS -DWITH_SDL2APPLICATION=ON + -DWITH_WINDOWLESSWGLAPPLICATION=ON + -DWITH_WGLCONTEXT=ON + -DWITH_OPENGLTESTER=ON -DWITH_AUDIO=ON -DWITH_WAVAUDIOIMPORTER=ON + -DWITH_MAGNUMFONT=ON + -DWITH_MAGNUMFONTCONVERTER=ON + -DWITH_OBJIMPORTER=ON + -DWITH_TGAIMPORTER=ON + -DWITH_DISTANCEFIELDCONVERTER=ON + -DWITH_FONTCONVERTER=ON + -DWITH_TGAIMAGECONVERTER=ON -DBUILD_STATIC=${BUILD_STATIC} -DMAGNUM_PLUGINS_DEBUG_DIR=${CURRENT_INSTALLED_DIR}/debug/bin/magnum-d -DMAGNUM_PLUGINS_RELEASE_DIR=${CURRENT_INSTALLED_DIR}/bin/magnum + --trace ) vcpkg_install_cmake() +# Drop a copy of tools +file(COPY ${CURRENT_PACKAGES_DIR}/bin/magnum-distancefieldconverter.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/magnum) +file(COPY ${CURRENT_PACKAGES_DIR}/bin/magnum-fontconverter.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/magnum) + +# Tools require dlls +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/magnum) + +file(GLOB_RECURSE TO_REMOVE + ${CURRENT_PACKAGES_DIR}/bin/*.exe + ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) +file(REMOVE ${TO_REMOVE}) + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) From 032692ad9e15537e6f6793498c7fea0515c77a35 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Tue, 20 Jun 2017 15:37:31 -0700 Subject: [PATCH 10/39] added thor #1319 --- ports/thor/CONTROL | 4 +++ ports/thor/portfile.cmake | 71 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 ports/thor/CONTROL create mode 100644 ports/thor/portfile.cmake diff --git a/ports/thor/CONTROL b/ports/thor/CONTROL new file mode 100644 index 0000000000..9da28972ac --- /dev/null +++ b/ports/thor/CONTROL @@ -0,0 +1,4 @@ +Source: thor +Version: +Description: +Build-Depends: sfml diff --git a/ports/thor/portfile.cmake b/ports/thor/portfile.cmake new file mode 100644 index 0000000000..046dd57b56 --- /dev/null +++ b/ports/thor/portfile.cmake @@ -0,0 +1,71 @@ +include(vcpkg_common_functions) + + + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/tests) +vcpkg_from_github(ARCHIVE + OUT_SOURCE_PATH SOURCE_PATH + REPO Bromeon/Thor + REF v2.0 + SHA512 634fa5286405d9a8a837c082ace98bbb02e609521418935855b9e2fcad57003dbe35088bd771cf6a9292e55d3787f7e463d7a4cca0d0f007509de2520d9a8cf9 + HEAD_REF master +) + + +set(ENV{SFML_ROOT} ${CURRENT_INSTALLED_DIR}) + +if(VCPKG_CRT_LINKAGE STREQUAL static) + set(THOR_STATIC_STD_LIBS ON) +else() + set(THOR_STATIC_STD_LIBS OFF) +endif() + + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(THOR_SHARED_LIBS ON) +else() + set(THOR_SHARED_LIBS OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DTHOR_SHARED_LIBS=${THOR_SHARED_LIBS} + -DTHOR_STATIC_STD_LIBS=${THOR_STATIC_STD_LIBS} +) + +vcpkg_build_cmake() + +file(GLOB DLLS + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/src/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/src/*.dll" +) +file(GLOB LIBS + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/src/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/src/*.lib" +) +file(GLOB DEBUG_DLLS + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/src/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/src/*.dll" +) +file(GLOB DEBUG_LIBS + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/src/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/src/*.lib" +) +if(DLLS) + file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) +endif() +file(INSTALL ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +if(DEBUG_DLLS) + file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + +file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}/include/thor) +file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/thor RENAME copyright) From ab3b3e4fa435c560383367cd8f836f06d35b0460 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Tue, 20 Jun 2017 15:39:42 -0700 Subject: [PATCH 11/39] added description and version to control --- ports/thor/CONTROL | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/thor/CONTROL b/ports/thor/CONTROL index 9da28972ac..ddaad1c5de 100644 --- a/ports/thor/CONTROL +++ b/ports/thor/CONTROL @@ -1,4 +1,4 @@ Source: thor -Version: -Description: +Version: v2.0 +Description: Extends the multimedia library SFML with higher-level features Build-Depends: sfml From 0cb1ec56b14c7906c48c28cc8f430cdd12386e44 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Tue, 20 Jun 2017 15:56:52 -0700 Subject: [PATCH 12/39] fix include folder --- ports/thor/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/thor/portfile.cmake b/ports/thor/portfile.cmake index 046dd57b56..710d464b90 100644 --- a/ports/thor/portfile.cmake +++ b/ports/thor/portfile.cmake @@ -67,5 +67,5 @@ endif() file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}/include/thor) +file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}) file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/thor RENAME copyright) From 053f3ee32f309208ac3af9c71b95253d4a144436 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Thu, 22 Jun 2017 00:21:29 +0900 Subject: [PATCH 13/39] Fix QHull port to use release version Fix QHull port to use latest release version, because master/HEAD of QHull has some bugs. --- ports/qhull/CONTROL | 2 +- ports/qhull/portfile.cmake | 46 ++++++++++++++++++++++++-------------- 2 files changed, 30 insertions(+), 18 deletions(-) diff --git a/ports/qhull/CONTROL b/ports/qhull/CONTROL index aaf569f25b..a360612852 100644 --- a/ports/qhull/CONTROL +++ b/ports/qhull/CONTROL @@ -1,3 +1,3 @@ Source: qhull -Version:1.0 +Version: 2015.2 Description: computes the convex hull, Delaunay triangulation, Voronoi diagram diff --git a/ports/qhull/portfile.cmake b/ports/qhull/portfile.cmake index 77c585b403..493a14e385 100644 --- a/ports/qhull/portfile.cmake +++ b/ports/qhull/portfile.cmake @@ -1,7 +1,7 @@ # Common Ambient Variables: # 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} +# 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) @@ -13,33 +13,45 @@ include(vcpkg_common_functions) vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH + OUT_SOURCE_PATH SOURCE_PATH REPO qhull/qhull - REF master - SHA512 16aa9f93ce6fe8342a3b579881f10bb417679b0a70849e6b0cc5a89551e4de773a43bb0d54948196690d68d168f3a2a215e4600745ff1566302b0b426565fb25 + REF 5a79a0009454c86e9848646b3c296009125231bf # Qhull 2015.2 + SHA512 ebcbf452eff420c62f92b734e5359b275493930b3e6798801eb1a81aa4fbf631b41e298a6071698c3b18c0939c55ddbc1b66b7019091bb4988dcfc7deb25e287 + HEAD_REF master ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - #PREFER_NINJA # Disable this option if project cannot be built with Ninja - OPTIONS - -DINCLUDE_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/include - -DMAN_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/doc/qhull - -DDOC_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/doc/qhull - - OPTIONS_RELEASE - -Dqhull_TARGETS_INSTALL=qhullcpp - -DLIB_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/lib - - OPTIONS_DEBUG - -Dqhull_TARGETS_INSTALL=qhullcpp_d - -DLIB_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/lib + #PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DINCLUDE_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/include + -DMAN_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/doc/qhull + -DDOC_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/doc/qhull + OPTIONS_RELEASE + -DLIB_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/lib + OPTIONS_DEBUG + -DLIB_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/lib ) vcpkg_install_cmake() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(GLOB_RECURSE HTMFILES ${CURRENT_PACKAGES_DIR}/include/*.htm) file(REMOVE ${HTMFILES}) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/doc) + +file(GLOB EXEFILES_RELEASE ${CURRENT_PACKAGES_DIR}/bin/*.exe) +file(GLOB EXEFILES_DEBUG ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) +file(COPY ${EXEFILES_RELEASE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qhull) +file(COPY ${EXEFILES_DEBUG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/qhull) +file(REMOVE ${EXEFILES_RELEASE} ${EXEFILES_DEBUG}) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qhull.lib ${CURRENT_PACKAGES_DIR}/debug/lib/qhull_d.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qhull_p.lib ${CURRENT_PACKAGES_DIR}/debug/lib/qhull_pd.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qhull_r.lib ${CURRENT_PACKAGES_DIR}/debug/lib/qhull_rd.lib) +endif() # Handle copyright file(COPY ${SOURCE_PATH}/README.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/qhull) From dab6693550dcee29544058e72e108b540a4c08e3 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Wed, 21 Jun 2017 08:23:27 -0700 Subject: [PATCH 14/39] Added aurora as independant portfile --- ports/aurora/CONTROL | 3 +++ ports/aurora/portfile.cmake | 11 +++++++++++ 2 files changed, 14 insertions(+) create mode 100644 ports/aurora/CONTROL create mode 100644 ports/aurora/portfile.cmake diff --git a/ports/aurora/CONTROL b/ports/aurora/CONTROL new file mode 100644 index 0000000000..172c019cd0 --- /dev/null +++ b/ports/aurora/CONTROL @@ -0,0 +1,3 @@ +Source: aurora +Version: 2017-06-21-c75699d2a8caa726260c29b6d7a0fd35f8f28933 +Description: Aurora is an open-source C++ library providing various rather uncommon C++ utilities diff --git a/ports/aurora/portfile.cmake b/ports/aurora/portfile.cmake new file mode 100644 index 0000000000..32e3d804f9 --- /dev/null +++ b/ports/aurora/portfile.cmake @@ -0,0 +1,11 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Bromeon/Aurora + REF c75699d2a8caa726260c29b6d7a0fd35f8f28933 + SHA512 862253e281eb441b773feb330d5ce4d7fe10769f516e927c0f875477ec912671fc35132a48986b2394f6d0a7160a5cb70afe868c597350c385ce23686b9613d6 + HEAD_REF master +) +file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/aurora RENAME copyright) +vcpkg_copy_pdbs() From f58052047adb5d9a3e3dee17feb9ff8f784d48e9 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Wed, 21 Jun 2017 09:04:57 -0700 Subject: [PATCH 15/39] [thor] Fixes aurora headers, defines SFML_STATIC, uses install target --- ports/thor/CONTROL | 2 +- ports/thor/portfile.cmake | 53 ++++++++++++++++++--------------------- 2 files changed, 26 insertions(+), 29 deletions(-) diff --git a/ports/thor/CONTROL b/ports/thor/CONTROL index ddaad1c5de..46396427bc 100644 --- a/ports/thor/CONTROL +++ b/ports/thor/CONTROL @@ -1,4 +1,4 @@ Source: thor Version: v2.0 Description: Extends the multimedia library SFML with higher-level features -Build-Depends: sfml +Build-Depends: sfml, aurora diff --git a/ports/thor/portfile.cmake b/ports/thor/portfile.cmake index 710d464b90..32602a84cc 100644 --- a/ports/thor/portfile.cmake +++ b/ports/thor/portfile.cmake @@ -35,37 +35,34 @@ vcpkg_configure_cmake( -DTHOR_STATIC_STD_LIBS=${THOR_STATIC_STD_LIBS} ) -vcpkg_build_cmake() +vcpkg_install_cmake() -file(GLOB DLLS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/src/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/src/*.dll" + +set(CONFIG_FILE "${CURRENT_PACKAGES_DIR}/include/Thor/Config.hpp") + +file(READ ${CONFIG_FILE} CONFIG_H) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + string(REPLACE "defined(SFML_STATIC)" "1" CONFIG_H "${CONFIG_H}") + else() + string(REPLACE "defined(SFML_STATIC)" "0" CONFIG_H "${CONFIG_H}") + endif() + +file(WRITE ${CONFIG_FILE} "${CONFIG_H}") + +file(GLOB LICENSE + "${CURRENT_PACKAGES_DIR}/debug/LicenseThor.txt" + "${CURRENT_PACKAGES_DIR}/debug/LicenseAurora.txt" + "${CURRENT_PACKAGES_DIR}/LicenseThor.txt" + "${CURRENT_PACKAGES_DIR}/LicenseAurora.txt" ) -file(GLOB LIBS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/src/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/src/*.lib" -) -file(GLOB DEBUG_DLLS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/src/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/src/*.dll" -) -file(GLOB DEBUG_LIBS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/src/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/src/*.lib" -) -if(DLLS) - file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) -endif() -file(INSTALL ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -if(DEBUG_DLLS) - file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + +if(LICENSE) + file(REMOVE ${LICENSE}) endif() -file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/Aurora) -file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}) file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/thor RENAME copyright) + +vcpkg_copy_pdbs() From cf27696e5a213bed7077dd33d6012a88bbcabd96 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Wed, 21 Jun 2017 09:29:50 -0700 Subject: [PATCH 16/39] remove internal copy used during build --- ports/thor/portfile.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/thor/portfile.cmake b/ports/thor/portfile.cmake index 32602a84cc..c96df47284 100644 --- a/ports/thor/portfile.cmake +++ b/ports/thor/portfile.cmake @@ -11,6 +11,8 @@ vcpkg_from_github(ARCHIVE HEAD_REF master ) +file(COPY ${CURRENT_INSTALLED_DIR}/include/Aurora DESTINATION ${SOURCE_PATH}/extlibs/aurora/include) + set(ENV{SFML_ROOT} ${CURRENT_INSTALLED_DIR}) From bffa100a43c995b56b782f0de64dbaabb4f1f2a1 Mon Sep 17 00:00:00 2001 From: sigman Date: Thu, 22 Jun 2017 13:29:00 +0300 Subject: [PATCH 17/39] [magnum][magnum-plugins] Fixed plugins location, static plugins build Static libray linkage should work now, including plugins. --- ports/magnum-plugins/CONTROL | 2 +- ports/magnum-plugins/portfile.cmake | 20 ++++++++++++++++++++ ports/magnum/CONTROL | 2 +- ports/magnum/portfile.cmake | 15 +++++++++++++++ 4 files changed, 37 insertions(+), 2 deletions(-) diff --git a/ports/magnum-plugins/CONTROL b/ports/magnum-plugins/CONTROL index 9d684689a1..f6e194c9f4 100644 --- a/ports/magnum-plugins/CONTROL +++ b/ports/magnum-plugins/CONTROL @@ -1,4 +1,4 @@ Source: magnum-plugins -Version: jun2017-3 +Version: jun2017-4 Build-Depends: stb, magnum Description: Plugins for C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php diff --git a/ports/magnum-plugins/portfile.cmake b/ports/magnum-plugins/portfile.cmake index 0fe8f83a10..b262624909 100644 --- a/ports/magnum-plugins/portfile.cmake +++ b/ports/magnum-plugins/portfile.cmake @@ -15,8 +15,10 @@ vcpkg_apply_patches( if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(BUILD_STATIC 1) + set(BUILD_PLUGINS_STATIC 1) else() set(BUILD_STATIC 0) + set(BUILD_PLUGINS_STATIC 0) endif() vcpkg_configure_cmake( @@ -36,6 +38,9 @@ vcpkg_configure_cmake( -DWITH_ANYIMAGECONVERTER=ON -DWITH_ANYSCENEIMPORTER=ON -DBUILD_STATIC=${BUILD_STATIC} + -DBUILD_PLUGINS_STATIC=${BUILD_PLUGINS_STATIC} + -DMAGNUM_PLUGINS_DEBUG_DIR=${CURRENT_INSTALLED_DIR}/debug/bin/magnum-d + -DMAGNUM_PLUGINS_RELEASE_DIR=${CURRENT_INSTALLED_DIR}/bin/magnum ) vcpkg_install_cmake() @@ -46,6 +51,21 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) + # move plugin libs to conventional place + file(GLOB_RECURSE LIB_TO_MOVE ${CURRENT_PACKAGES_DIR}/lib/magnum/*) + file(COPY ${LIB_TO_MOVE} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/magnum) + file(GLOB_RECURSE LIB_TO_MOVE_DBG ${CURRENT_PACKAGES_DIR}/debug/lib/magnum/*) + file(COPY ${LIB_TO_MOVE_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum) +else() + # remove headers and libs for plugins + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) + # hint vcpkg + set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) + set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) endif() # Handle copyright diff --git a/ports/magnum/CONTROL b/ports/magnum/CONTROL index 9245e4380e..a040014daf 100644 --- a/ports/magnum/CONTROL +++ b/ports/magnum/CONTROL @@ -1,4 +1,4 @@ Source: magnum -Version: jun2017-4 +Version: jun2017-5 Build-Depends: corrade, sdl2, openal-soft Description: C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php diff --git a/ports/magnum/portfile.cmake b/ports/magnum/portfile.cmake index 14d5e0846a..9eff36dcff 100644 --- a/ports/magnum/portfile.cmake +++ b/ports/magnum/portfile.cmake @@ -16,8 +16,10 @@ vcpkg_apply_patches( if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(BUILD_STATIC 1) + set(BUILD_PLUGINS_STATIC 1) else() set(BUILD_STATIC 0) + set(BUILD_PLUGINS_STATIC 0) endif() vcpkg_configure_cmake( @@ -38,6 +40,7 @@ vcpkg_configure_cmake( -DWITH_FONTCONVERTER=ON -DWITH_TGAIMAGECONVERTER=ON -DBUILD_STATIC=${BUILD_STATIC} + -DBUILD_PLUGINS_STATIC=${BUILD_PLUGINS_STATIC} -DMAGNUM_PLUGINS_DEBUG_DIR=${CURRENT_INSTALLED_DIR}/debug/bin/magnum-d -DMAGNUM_PLUGINS_RELEASE_DIR=${CURRENT_INSTALLED_DIR}/bin/magnum --trace @@ -64,6 +67,18 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) + # move plugin libs to conventional place + file(GLOB_RECURSE LIB_TO_MOVE ${CURRENT_PACKAGES_DIR}/lib/magnum/*) + file(COPY ${LIB_TO_MOVE} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/magnum) + file(GLOB_RECURSE LIB_TO_MOVE_DBG ${CURRENT_PACKAGES_DIR}/debug/lib/magnum/*) + file(COPY ${LIB_TO_MOVE_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum) +else() + # remove headers and libs for plugins + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/MagnumPlugins) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/magnum) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum-d) endif() # Handle copyright From c21a0604e0b0590444f13aac632143f6df6685ff Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 23 Jun 2017 12:25:20 -0700 Subject: [PATCH 18/39] [apr] port update --- ports/apr/CONTROL | 2 +- ports/apr/portfile.cmake | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/apr/CONTROL b/ports/apr/CONTROL index eed3c518d2..ac1b7d5c33 100644 --- a/ports/apr/CONTROL +++ b/ports/apr/CONTROL @@ -1,3 +1,3 @@ Source: apr -Version: 1.5.2 +Version: 1.6.2 Description: The Apache Portable Runtime (APR) is a C library that forms a system portability layer that covers many operating systems. diff --git a/ports/apr/portfile.cmake b/ports/apr/portfile.cmake index f65b446491..414ca1dda5 100644 --- a/ports/apr/portfile.cmake +++ b/ports/apr/portfile.cmake @@ -7,11 +7,11 @@ # include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/apr-1.5.2) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/apr-1.6.2) vcpkg_download_distfile(ARCHIVE - URLS "https://www.apache.org/dist/apr/apr-1.5.2.tar.bz2" - FILENAME "apr-1.5.2.tar.bz2" - SHA512 d1156ad16abf07887797777b56c2147c890f16d8445829b3e3b4917950d24c5fd2f8febd439992467a5ea0511da562c0fb4a7cfd8a235ab55882388bfa2b919d + URLS "https://www.apache.org/dist/apr/apr-1.6.2.tar.bz2" + FILENAME "apr-1.6.2.tar.bz2" + SHA512 20f449fde522f186b919b64ce6f90073b267557e17438607d31af917eca7941222dd7a7379d66f1430ff68f7e28fbccd140d24f3ca7aae8a876a550b19de284a ) vcpkg_extract_source_archive(${ARCHIVE}) From bffc9699991d51bd627b606d6dc47eef2cfd3955 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 23 Jun 2017 14:58:52 -0700 Subject: [PATCH 19/39] [dirent] new port need by #1343 --- ports/dirent/CONTROL | 3 +++ ports/dirent/portfile.cmake | 11 +++++++++++ 2 files changed, 14 insertions(+) create mode 100644 ports/dirent/CONTROL create mode 100644 ports/dirent/portfile.cmake diff --git a/ports/dirent/CONTROL b/ports/dirent/CONTROL new file mode 100644 index 0000000000..50f6d7ede0 --- /dev/null +++ b/ports/dirent/CONTROL @@ -0,0 +1,3 @@ +Source: dirent +Version: 2017-06-23-5c7194c2fe2c68c1a8212712c0b4b6195382d27d +Description: Dirent is a C/C++ programming interface that allows programmers to retrieve information about files and directories under Linux/UNIX. This project provides Linux compatible Dirent interface for Microsoft Windows. diff --git a/ports/dirent/portfile.cmake b/ports/dirent/portfile.cmake new file mode 100644 index 0000000000..9476a8dcdb --- /dev/null +++ b/ports/dirent/portfile.cmake @@ -0,0 +1,11 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO tronkko/dirent + REF 8b1db5092479a73d47eafd3de739b27e876e6bf3 + SHA512 f529aa65c2a4b8249c1291f3bccad25fa3a9c2146a2c74abc0a4710f68e2bd6f73cd52682bb406fbcab71d6a5225a354f9e8bdc22ce63b7a4e64bb65bab34b9f + HEAD_REF master +) +file(INSTALL ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/dirent RENAME copyright) +vcpkg_copy_pdbs() From d7989ade6913b95a84c1e57069fd82bd3a623c11 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 23 Jun 2017 16:25:31 -0700 Subject: [PATCH 20/39] [rtmidi] init port #582 --- ports/rtmidi/CMakeLists.txt | 41 +++++++++++++++++++++++++++++++++++++ ports/rtmidi/CONTROL | 3 +++ ports/rtmidi/portfile.cmake | 20 ++++++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 ports/rtmidi/CMakeLists.txt create mode 100644 ports/rtmidi/CONTROL create mode 100644 ports/rtmidi/portfile.cmake diff --git a/ports/rtmidi/CMakeLists.txt b/ports/rtmidi/CMakeLists.txt new file mode 100644 index 0000000000..eac2d2f549 --- /dev/null +++ b/ports/rtmidi/CMakeLists.txt @@ -0,0 +1,41 @@ +cmake_minimum_required(VERSION 3.8) +project(rtmidi CXX) +set(RTMIDI_SOURCES + ${PROJECT_SOURCE_DIR}/RtMidi.cpp + ${PROJECT_SOURCE_DIR}/rtmidi_c.cpp +) + +set(RTMIDI_HEADERS + ${PROJECT_SOURCE_DIR}/RtMidi.h + ${PROJECT_SOURCE_DIR}/rtmidi_c.h +) + +include_directories(${RTMIDI_HEADERS}) + +if(BUILD_SHARED) + add_library(rtmidi SHARED ${RTMIDI_SOURCES}) + target_compile_definitions(rtmidi PRIVATE -DRTMIDI_EXPORT) +else() + add_library(rtmidi STATIC ${RTMIDI_SOURCES}) +endif() + + +file(READ "${PROJECT_SOURCE_DIR}/rtmidi_c.h" RTMIDI_EXPORT) +if (BUILD_SHARED) + string(REPLACE "if defined(RTMIDI_EXPORT)" "if 1" RTMIDI_EXPORT "${RTMIDI_EXPORT}") +else() + string(REPLACE "if defined(RTMIDI_EXPORT)" "if 0" RTMIDI_EXPORT "${RTMIDI_EXPORT}") +endif() +file(WRITE "${PROJECT_BINARY_DIR}/rtmidi_c.h" "${RTMIDI_EXPORT}") + +install( + TARGETS rtmidi + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES "${PROJECT_SOURCE_DIR}/RtMidi.h" DESTINATION include) + install(FILES "${PROJECT_BINARY_DIR}/rtmidi_c.h" DESTINATION include) +endif() diff --git a/ports/rtmidi/CONTROL b/ports/rtmidi/CONTROL new file mode 100644 index 0000000000..9cf64df9ed --- /dev/null +++ b/ports/rtmidi/CONTROL @@ -0,0 +1,3 @@ +Source: rtmidi +Version: 2.1.1 +Description: A set of C++ classes that provide a common API for realtime MIDI input/output across Linux (ALSA & JACK), Macintosh OS X (CoreMidi & JACK) and Windows (Multimedia) diff --git a/ports/rtmidi/portfile.cmake b/ports/rtmidi/portfile.cmake new file mode 100644 index 0000000000..cee6e1a73a --- /dev/null +++ b/ports/rtmidi/portfile.cmake @@ -0,0 +1,20 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO thestk/rtmidi + REF 2.1.1 + SHA512 4d378720dd0f7c0e1a87741c088756839878ed56465b053040f70a1e039828fe221a6b1669b77b2fdd146cb192934c5719cc934c2c6a6304f44dbee2972c68e8 + HEAD_REF master +) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/readme DESTINATION ${CURRENT_PACKAGES_DIR}/share/rtmidi RENAME copyright) From ac9cec6e1c3eea8d9dd28f94a3299bb4062fc224 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 23 Jun 2017 16:31:26 -0700 Subject: [PATCH 21/39] Small fix BUILD_SHARED_LIBS --- ports/rtmidi/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/rtmidi/CMakeLists.txt b/ports/rtmidi/CMakeLists.txt index eac2d2f549..6a09540b8d 100644 --- a/ports/rtmidi/CMakeLists.txt +++ b/ports/rtmidi/CMakeLists.txt @@ -12,7 +12,7 @@ set(RTMIDI_HEADERS include_directories(${RTMIDI_HEADERS}) -if(BUILD_SHARED) +if(BUILD_SHARED_LIBS) add_library(rtmidi SHARED ${RTMIDI_SOURCES}) target_compile_definitions(rtmidi PRIVATE -DRTMIDI_EXPORT) else() From 2100e95c25db8b76058d9e125c5b2fcdce9fd74a Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 23 Jun 2017 16:33:25 -0700 Subject: [PATCH 22/39] Small fix BUILD_SHARED_LIBS --- ports/rtmidi/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/rtmidi/CMakeLists.txt b/ports/rtmidi/CMakeLists.txt index 6a09540b8d..f334a598ec 100644 --- a/ports/rtmidi/CMakeLists.txt +++ b/ports/rtmidi/CMakeLists.txt @@ -21,7 +21,7 @@ endif() file(READ "${PROJECT_SOURCE_DIR}/rtmidi_c.h" RTMIDI_EXPORT) -if (BUILD_SHARED) +if (BUILD_SHARED_LIBS) string(REPLACE "if defined(RTMIDI_EXPORT)" "if 1" RTMIDI_EXPORT "${RTMIDI_EXPORT}") else() string(REPLACE "if defined(RTMIDI_EXPORT)" "if 0" RTMIDI_EXPORT "${RTMIDI_EXPORT}") From 9eca90f2d1c4f2ddc0cd0153b7addbff3757bac4 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 23 Jun 2017 16:37:25 -0700 Subject: [PATCH 23/39] Small fix BUILD_SHARED_LIBS use vcpkg lib linkage --- ports/rtmidi/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ports/rtmidi/CMakeLists.txt b/ports/rtmidi/CMakeLists.txt index f334a598ec..0603fdcb85 100644 --- a/ports/rtmidi/CMakeLists.txt +++ b/ports/rtmidi/CMakeLists.txt @@ -12,6 +12,13 @@ set(RTMIDI_HEADERS include_directories(${RTMIDI_HEADERS}) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(BUILD_SHARED_LIBS ON) +else() + set(BUILD_SHARED_LIBS OFF) +endif() + + if(BUILD_SHARED_LIBS) add_library(rtmidi SHARED ${RTMIDI_SOURCES}) target_compile_definitions(rtmidi PRIVATE -DRTMIDI_EXPORT) From 88fd6f14d8a66a20ccdaea06b5a22067a94387e9 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 23 Jun 2017 23:27:31 -0700 Subject: [PATCH 24/39] [ctemplate] new port #543 --- ports/ctemplate/CMakeLists.txt | 97 ++++++++++++++++++++++++++++++++++ ports/ctemplate/CONTROL | 3 ++ ports/ctemplate/fix-msvc.patch | 17 ++++++ ports/ctemplate/portfile.cmake | 39 ++++++++++++++ 4 files changed, 156 insertions(+) create mode 100644 ports/ctemplate/CMakeLists.txt create mode 100644 ports/ctemplate/CONTROL create mode 100644 ports/ctemplate/fix-msvc.patch create mode 100644 ports/ctemplate/portfile.cmake diff --git a/ports/ctemplate/CMakeLists.txt b/ports/ctemplate/CMakeLists.txt new file mode 100644 index 0000000000..22869f7c5d --- /dev/null +++ b/ports/ctemplate/CMakeLists.txt @@ -0,0 +1,97 @@ +cmake_minimum_required(VERSION 3.5.1) +project(libctemplate C CXX) + +# find_package(PythonInterp) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) + add_definitions(-D_VARIADIC_MAX=10) +endif() + +set(SOURCE_PATH ${PROJECT_SOURCE_DIR}/src) +set(BASE_SOURCE_PATH ${SOURCE_PATH}/base) +set(WINDOWS_SOURCE_PATH ${SOURCE_PATH}/windows) +set(HTMLPARSER_SOURCE_PATH ${SOURCE_PATH}/htmlparser) + +set(COMMON_INCLUDES ${PROJECT_BINARY_DIR}/include) + +set(HTMLPARSER_CONFIG ${HTMLPARSER_SOURCE_PATH}/htmlparser_fsm.config) +set(JSPASPER_CONFIG ${HTMLPARSER_SOURCE_PATH}/jsparser_fsm.config) +set(FSM_GENERATOR ${HTMLPARSER_SOURCE_PATH}/generate_fsm.py) + +set(BASE_HEADERS + "${BASE_SOURCE_PATH}/arena.h" + "${BASE_SOURCE_PATH}/manual_constructor.h" + "${BASE_SOURCE_PATH}/mutex.h" + "${BASE_SOURCE_PATH}/small_map.h" + "${BASE_SOURCE_PATH}/thread_annotations.h" + "${BASE_SOURCE_PATH}/util.h" + "${BASE_SOURCE_PATH}/arena-inl.h" +) + +set( + HTMLPARSER_HEADERS + "${HTMLPARSER_SOURCE_PATH}/htmlparser.h" + "${HTMLPARSER_SOURCE_PATH}/htmlparser_cpp.h" + "${HTMLPARSER_SOURCE_PATH}/jsparser.h" + "${HTMLPARSER_SOURCE_PATH}/statemachine.h" +) +set(SRC_FILES + "${SOURCE_PATH}/base/arena.cc" + "${SOURCE_PATH}/htmlparser/htmlparser.cc" + "${SOURCE_PATH}/htmlparser/jsparser.cc" + "${SOURCE_PATH}/htmlparser/statemachine.cc" + "${SOURCE_PATH}/per_expand_data.cc" + "${SOURCE_PATH}/template.cc" + "${SOURCE_PATH}/template_annotator.cc" + "${SOURCE_PATH}/template_cache.cc" + "${SOURCE_PATH}/template_dictionary.cc" + "${SOURCE_PATH}/template_modifiers.cc" + "${SOURCE_PATH}/template_namelist.cc" + "${SOURCE_PATH}/template_pathops.cc" + "${SOURCE_PATH}/template_string.cc" + "${SOURCE_PATH}/windows/port.cc" +) + +file(COPY "${WINDOWS_SOURCE_PATH}/" DESTINATION ${COMMON_INCLUDES}) +file(COPY "${WINDOWS_SOURCE_PATH}/config.h" DESTINATION ${COMMON_INCLUDES}/windows) +file(COPY "${WINDOWS_SOURCE_PATH}/port.h" DESTINATION ${COMMON_INCLUDES}/windows) +file(COPY ${HTMLPARSER_HEADERS} DESTINATION ${COMMON_INCLUDES}/htmlparser) +file(COPY ${BASE_HEADERS} DESTINATION ${COMMON_INCLUDES}/base) + +execute_process( + COMMAND ${PYTHON_EXECUTABLE} ${FSM_GENERATOR} ${HTMLPARSER_CONFIG} + WORKING_DIRECTORY ${COMMON_INCLUDES}/htmlparser + OUTPUT_VARIABLE HTMLPARSER_CONFIG_H +) +execute_process( + COMMAND ${PYTHON_EXECUTABLE} ${FSM_GENERATOR} ${JSPASPER_CONFIG} + WORKING_DIRECTORY ${COMMON_INCLUDES}/htmlparser + OUTPUT_VARIABLE JSPASPER_CONFIG_H +) + +file(WRITE "${COMMON_INCLUDES}/htmlparser/htmlparser_fsm.h" "${HTMLPARSER_CONFIG_H}") +file(WRITE "${COMMON_INCLUDES}/htmlparser/jsparser_fsm.h" "${JSPASPER_CONFIG_H}") + +option(BUILD_SHARED_LIBRARY "Building shared library" ON) + +include_directories(${COMMON_INCLUDES}) + +if(BUILD_SHARED_LIBRARY) + add_library(libctemplate SHARED ${SRC_FILES}) +else() + add_library(libctemplate STATIC ${SRC_FILES} ) + # Note: CTEMPLATE_DLL_DECL should be empty to build static file + target_compile_definitions(libctemplate PRIVATE -DCTEMPLATE_DLL_DECL=) +endif() + +install( + TARGETS libctemplate + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(DIRECTORY "${COMMON_INCLUDES}/" DESTINATION include FILES_MATCHING PATTERN "*.h") +endif() diff --git a/ports/ctemplate/CONTROL b/ports/ctemplate/CONTROL new file mode 100644 index 0000000000..eb78d4c0f7 --- /dev/null +++ b/ports/ctemplate/CONTROL @@ -0,0 +1,3 @@ +Source: ctemplate +Version: 2017-06-23-44b7c5b918a08ad561c63e9d28beecb40c10ebca +Description: C++ CTemplate system diff --git a/ports/ctemplate/fix-msvc.patch b/ports/ctemplate/fix-msvc.patch new file mode 100644 index 0000000000..acfbce4bfb --- /dev/null +++ b/ports/ctemplate/fix-msvc.patch @@ -0,0 +1,17 @@ +diff --git a/src/per_expand_data.cc b/src/per_expand_data.cc +index f8f3025..0a468cf 100644 +--- a/src/per_expand_data.cc ++++ b/src/per_expand_data.cc +@@ -42,10 +42,12 @@ namespace ctemplate { + + using std::string; + ++#ifndef _MSC_VER + bool PerExpandData::DataEq::operator()(const char* s1, const char* s2) const { + return ((s1 == 0 && s2 == 0) || + (s1 && s2 && *s1 == *s2 && strcmp(s1, s2) == 0)); + } ++#endif + + PerExpandData::~PerExpandData() { + delete map_; diff --git a/ports/ctemplate/portfile.cmake b/ports/ctemplate/portfile.cmake new file mode 100644 index 0000000000..cb1e07b742 --- /dev/null +++ b/ports/ctemplate/portfile.cmake @@ -0,0 +1,39 @@ +include(vcpkg_common_functions) + +set(GIT_REF 44b7c5b918a08ad561c63e9d28beecb40c10ebca) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO OlafvdSpek/ctemplate + REF 44b7c5b918a08ad561c63e9d28beecb40c10ebca + SHA512 b572f6d0d182e977d3a459e68bde6244dad7196c44c16407990dc1fb6a7a93bcd8d6851e515d50b6051c1d011f71695f895f6ab233664baadae0bf6a3d464305 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_find_acquire_program(PYTHON2) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/fix-msvc.patch +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set (BUILD_SHARED_LIBRARY ON) +else() + set(BUILD_SHARED_LIBRARY OFF) +endif() + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS -DPYTHON_EXECUTABLE=${PYTHON2} -DBUILD_SHARED_LIBRARY=${BUILD_SHARED_LIBRARY} + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/ctemplate RENAME copyright) + +vcpkg_copy_pdbs() From b64935e67ac6817defd862fc7fbc3a1f4819d79c Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Sun, 25 Jun 2017 04:07:09 +0900 Subject: [PATCH 25/39] Add Kinect SDK v1.x port Add Kinect for Windows SDK v1.x port. --- ports/kinectsdk1/CONTROL | 3 ++ ports/kinectsdk1/portfile.cmake | 52 +++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 ports/kinectsdk1/CONTROL create mode 100644 ports/kinectsdk1/portfile.cmake diff --git a/ports/kinectsdk1/CONTROL b/ports/kinectsdk1/CONTROL new file mode 100644 index 0000000000..21f5314257 --- /dev/null +++ b/ports/kinectsdk1/CONTROL @@ -0,0 +1,3 @@ +Source: kinectsdk1 +Version: 1.8 +Description: Kinect for Windows SDK for Kinect v1 sensor. diff --git a/ports/kinectsdk1/portfile.cmake b/ports/kinectsdk1/portfile.cmake new file mode 100644 index 0000000000..61f006492f --- /dev/null +++ b/ports/kinectsdk1/portfile.cmake @@ -0,0 +1,52 @@ +# Common Ambient Variables: +# 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 = +# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) +# + +include(vcpkg_common_functions) + +get_filename_component(KINECTSDK10_DIR "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Kinect;SDKInstallPath]" ABSOLUTE CACHE) +if(NOT EXISTS "${KINECTSDK10_DIR}") + message(FATAL_ERROR "Error: Could not find Kinect for Windows SDK v1.x.") +endif() + +file( + INSTALL + "${KINECTSDK10_DIR}/inc/NuiApi.h" + "${KINECTSDK10_DIR}/inc/NuiImageCamera.h" + "${KINECTSDK10_DIR}/inc/NuiSensor.h" + "${KINECTSDK10_DIR}/inc/NuiSkeleton.h" + DESTINATION + ${CURRENT_PACKAGES_DIR}/include/kinectsdk1 +) + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(ARCHITECTURE x86) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(ARCHITECTURE amd64) +endif() + +file( + INSTALL + "${KINECTSDK10_DIR}/lib/${ARCHITECTURE}/Kinect10.lib" + DESTINATION + ${CURRENT_PACKAGES_DIR}/lib +) + +file( + INSTALL + "${KINECTSDK10_DIR}/lib/${ARCHITECTURE}/Kinect10.lib" + DESTINATION + ${CURRENT_PACKAGES_DIR}/debug/lib +) + +# Handle copyright +file(COPY "${KINECTSDK10_DIR}/SDKEula.rtf" DESTINATION ${CURRENT_PACKAGES_DIR}/share/kinectsdk1) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/kinectsdk1/SDKEula.rtf ${CURRENT_PACKAGES_DIR}/share/kinectsdk1/copyright) \ No newline at end of file From 6c9d51451091470a6414a1e466a1f6f6d9b870ff Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 22 Jun 2017 00:26:41 -0700 Subject: [PATCH 26/39] [angle] Initial commit with cmake buildsystem --- ports/angle/CMakeLists.txt | 149 +++++++++++++++++++++++++++++++++++++ ports/angle/CONTROL | 4 + ports/angle/portfile.cmake | 22 ++++++ 3 files changed, 175 insertions(+) create mode 100644 ports/angle/CMakeLists.txt create mode 100644 ports/angle/CONTROL create mode 100644 ports/angle/portfile.cmake diff --git a/ports/angle/CMakeLists.txt b/ports/angle/CMakeLists.txt new file mode 100644 index 0000000000..4f4138a058 --- /dev/null +++ b/ports/angle/CMakeLists.txt @@ -0,0 +1,149 @@ +cmake_minimum_required(VERSION 3.8) +project(angle) + +add_compile_options(/d2guard4 /Wv:18 /WX) +set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /guard:cf") + +add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -DNOMINMAX -DANGLE_STANDALONE_BUILD -DANGLE_ENABLE_DEBUG_ANNOTATIONS) + +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/include/id/commit.h" "#define ANGLE_COMMIT_HASH \"invalid-hash\"\n#define ANGLE_COMMIT_HASH_SIZE 12\n#define ANGLE_COMMIT_DATE \"invalid-date\"\n") + +include_directories(include src ${CMAKE_CURRENT_BINARY_DIR}/include) + +########## +# numerics +add_library(numerics INTERFACE) +file(GLOB_RECURSE NUMERICS_SOURCES "src/common/third_party/numerics/*.h") +target_sources(numerics INTERFACE ${NUMERICS_SOURCES}) +target_include_directories(numerics INTERFACE src/common/third_party/numerics) + +########## +# angle_common +file(GLOB ANGLE_COMMON_SOURCES "src/common/*.h" "src/common/*.inl" "src/common/*.cpp") +list(FILTER ANGLE_COMMON_SOURCES EXCLUDE REGEX "_unittest|event_tracer|_linux|_mac") +add_library(angle_common STATIC ${ANGLE_COMMON_SOURCES} ${NUMERICS_SOURCES}) +target_link_libraries(angle_common PUBLIC numerics) + +########## +# angle_image_util +file(GLOB ANGLE_IMAGE_UTIL_SOURCES "src/image_util/*.h" "src/image_util/*.inl" "src/image_util/*.cpp") +add_library(angle_image_util STATIC ${ANGLE_IMAGE_UTIL_SOURCES}) +target_link_libraries(angle_image_util PRIVATE angle_common) + +########## +# translator +file(GLOB TRANSLATOR_SOURCES + "src/compiler/translator/glslang.l" + "src/compiler/translator/glslang.y" + "src/compiler/translator/*.h" + "src/compiler/translator/*.cpp" + "src/third_party/compiler/ArrayBoundsClamper.cpp" +) +add_library(translator STATIC ${TRANSLATOR_SOURCES}) +target_compile_definitions(translator PUBLIC + -DANGLE_ENABLE_ESSL + -DANGLE_ENABLE_GLSL + -DANGLE_ENABLE_HLSL +) +target_link_libraries(translator PRIVATE angle_common) + +########## +# preprocessor +file(GLOB PREPROCESSOR_SOURCES + "src/compiler/preprocessor/*.h" + "src/compiler/preprocessor/*.cpp" +) +add_library(preprocessor STATIC ${PREPROCESSOR_SOURCES}) +target_link_libraries(preprocessor PRIVATE angle_common) + +########## +# libANGLE +file(GLOB LIBANGLE_SOURCES + "src/third_party/systeminfo/SystemInfo.cpp" + "src/third_party/murmurhash/MurmurHash3.cpp" + "src/common/event_tracer.cpp" + + "src/libANGLE/*.cpp" + "src/libANGLE/*.inl" + "src/libANGLE/*.h" + + "src/libANGLE/renderer/*.cpp" + "src/libANGLE/renderer/*.inl" + "src/libANGLE/renderer/*.h" + + "src/libANGLE/renderer/gl/*.cpp" + "src/libANGLE/renderer/gl/*.inl" + "src/libANGLE/renderer/gl/*.h" + + "src/libANGLE/renderer/gl/wgl/*.cpp" + "src/libANGLE/renderer/gl/wgl/*.inl" + "src/libANGLE/renderer/gl/wgl/*.h" + + "src/libANGLE/renderer/vulkan/*.cpp" + "src/libANGLE/renderer/vulkan/*.inl" + "src/libANGLE/renderer/vulkan/*.h" + + "src/libANGLE/renderer/null/*.cpp" + "src/libANGLE/renderer/null/*.inl" + "src/libANGLE/renderer/null/*.h" +) +file(GLOB_RECURSE LIBANGLE_D3D_SOURCES "src/libANGLE/renderer/d3d/*.h" "src/libANGLE/renderer/d3d/*.cpp" "src/libANGLE/renderer/d3d/*.inl") +list(FILTER LIBANGLE_SOURCES EXCLUDE REGEX "_unittest") +list(FILTER LIBANGLE_D3D_SOURCES EXCLUDE REGEX "_unittest|winrt") +add_library(libANGLE STATIC ${LIBANGLE_SOURCES} ${LIBANGLE_D3D_SOURCES}) +# kernel32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;user32.lib;uuid.lib;odbc32.lib;odbccp32.lib;delayimp.lib;d3d9.lib;dxguid.lib +find_library(D3D9_LIB NAMES d3d9) +find_library(DXGUID_LIB NAMES dxguid) +target_link_libraries(libANGLE PRIVATE angle_common angle_image_util translator ${D3D9_LIB} ${DXGUID_LIB} preprocessor) +target_include_directories(libANGLE PRIVATE "src/third_party/khronos") +target_compile_definitions(libANGLE PUBLIC + -DANGLE_ENABLE_D3D9 + -DANGLE_ENABLE_D3D11 + -DANGLE_ENABLE_OPENGL + -DANGLE_ENABLE_VULKAN + -DANGLE_ENABLE_NULL +) +target_compile_definitions(libANGLE PRIVATE -DLIBANGLE_IMPLEMENTATION) + +########## +# libGLESv2 +file(GLOB LIBGLESV2_SOURCES "src/libGLESv2/*.h" "src/libGLESv2/*.cpp" "src/libGLESv2/libGLESv2.def") +add_library(libGLESv2 ${LIBGLESV2_SOURCES}) +target_link_libraries(libGLESv2 PRIVATE angle_common libANGLE) +target_compile_definitions(libGLESv2 PRIVATE + -DLIBGLESV2_IMPLEMENTATION + -DLIBANGLE_IMPLEMENTATION + -DGL_GLEXT_PROTOTYPES + "-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ \"d3dcompiler_47.dll\", \"d3dcompiler_46.dll\", \"d3dcompiler_43.dll\" }" + -DGL_APICALL= + -DEGLAPI= +) + +########## +# libEGL +add_library(libEGL "src/libEGL/libEGL.def" "src/libEGL/libEGL.cpp" "src/libEGL/libEGL.rc" "src/libEGL/resource.h") +target_link_libraries(libEGL PRIVATE angle_common libANGLE libGLESv2) +target_compile_definitions(libEGL PRIVATE + -DLIBANGLE_IMPLEMENTATION + -DGL_GLEXT_PROTOTYPES + "-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ \"d3dcompiler_47.dll\", \"d3dcompiler_46.dll\", \"d3dcompiler_43.dll\" }" + -DGL_APICALL= + -DEGLAPI= +) + + +install(TARGETS libEGL libGLESv2 + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install( + DIRECTORY include/ + DESTINATION include + FILES_MATCHING PATTERN "*.h" + PATTERN "GLSLANG" EXCLUDE + PATTERN "export.h" EXCLUDE + ) +endif() diff --git a/ports/angle/CONTROL b/ports/angle/CONTROL new file mode 100644 index 0000000000..4f5f8880da --- /dev/null +++ b/ports/angle/CONTROL @@ -0,0 +1,4 @@ +Source: angle +Version: 2017-06-14-8d471f +Description: A conformant OpenGL ES implementation for Windows, Mac and Linux. + The goal of ANGLE is to allow users of multiple operating systems to seamlessly run WebGL and other OpenGL ES content by translating OpenGL ES API calls to one of the hardware-supported APIs available for that platform. ANGLE currently provides translation from OpenGL ES 2.0 and 3.0 to desktop OpenGL, OpenGL ES, Direct3D 9, and Direct3D 11. Support for translation from OpenGL ES to Vulkan is underway, and future plans include compute shader support (ES 3.1) and MacOS support. diff --git a/ports/angle/portfile.cmake b/ports/angle/portfile.cmake new file mode 100644 index 0000000000..1499fa6232 --- /dev/null +++ b/ports/angle/portfile.cmake @@ -0,0 +1,22 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/angle + REF 8d471f907d8d4ec1d46bc9366493bd76c11c1870 + SHA512 b9235d2a98330bc8533c3fe871129e7235c680420eac16610eae4ca7224c5284313ab6377f30ddfb8a2da39b69f3ef0d16023fe1e7cec3fc2198f4eb4bdccb26 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=1 +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/angle RENAME copyright) From 52d5091f85d182abb9b6581cfbb8b73909da1696 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 22 Jun 2017 00:33:28 -0700 Subject: [PATCH 27/39] [angle] Disable static builds --- ports/angle/CMakeLists.txt | 1 - ports/angle/portfile.cmake | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ports/angle/CMakeLists.txt b/ports/angle/CMakeLists.txt index 4f4138a058..a4895f9386 100644 --- a/ports/angle/CMakeLists.txt +++ b/ports/angle/CMakeLists.txt @@ -91,7 +91,6 @@ file(GLOB_RECURSE LIBANGLE_D3D_SOURCES "src/libANGLE/renderer/d3d/*.h" "src/libA list(FILTER LIBANGLE_SOURCES EXCLUDE REGEX "_unittest") list(FILTER LIBANGLE_D3D_SOURCES EXCLUDE REGEX "_unittest|winrt") add_library(libANGLE STATIC ${LIBANGLE_SOURCES} ${LIBANGLE_D3D_SOURCES}) -# kernel32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;user32.lib;uuid.lib;odbc32.lib;odbccp32.lib;delayimp.lib;d3d9.lib;dxguid.lib find_library(D3D9_LIB NAMES d3d9) find_library(DXGUID_LIB NAMES dxguid) target_link_libraries(libANGLE PRIVATE angle_common angle_image_util translator ${D3D9_LIB} ${DXGUID_LIB} preprocessor) diff --git a/ports/angle/portfile.cmake b/ports/angle/portfile.cmake index 1499fa6232..4668b7dea9 100644 --- a/ports/angle/portfile.cmake +++ b/ports/angle/portfile.cmake @@ -1,5 +1,10 @@ include(vcpkg_common_functions) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(STATUS "ANGLE currently only supports being built as a dynamic library") + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/angle From 305d649307464ef439b241fb66f5718e8bc9af01 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 22 Jun 2017 14:52:35 -0700 Subject: [PATCH 28/39] [angle] Fix build --- ports/angle/CMakeLists.txt | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/ports/angle/CMakeLists.txt b/ports/angle/CMakeLists.txt index a4895f9386..2d7af54cc0 100644 --- a/ports/angle/CMakeLists.txt +++ b/ports/angle/CMakeLists.txt @@ -11,18 +11,18 @@ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/include/id/commit.h" "#define ANGLE_COMM include_directories(include src ${CMAKE_CURRENT_BINARY_DIR}/include) ########## -# numerics -add_library(numerics INTERFACE) -file(GLOB_RECURSE NUMERICS_SOURCES "src/common/third_party/numerics/*.h") -target_sources(numerics INTERFACE ${NUMERICS_SOURCES}) -target_include_directories(numerics INTERFACE src/common/third_party/numerics) +# anglebase +add_library(anglebase INTERFACE) +file(GLOB_RECURSE anglebase_SOURCES "src/common/third_party/base/*.h") +target_sources(anglebase INTERFACE ${anglebase_SOURCES}) +target_include_directories(anglebase INTERFACE src/common/third_party/base) ########## # angle_common file(GLOB ANGLE_COMMON_SOURCES "src/common/*.h" "src/common/*.inl" "src/common/*.cpp") list(FILTER ANGLE_COMMON_SOURCES EXCLUDE REGEX "_unittest|event_tracer|_linux|_mac") -add_library(angle_common STATIC ${ANGLE_COMMON_SOURCES} ${NUMERICS_SOURCES}) -target_link_libraries(angle_common PUBLIC numerics) +add_library(angle_common STATIC ${ANGLE_COMMON_SOURCES}) +target_link_libraries(angle_common PUBLIC anglebase) ########## # angle_image_util @@ -60,7 +60,7 @@ target_link_libraries(preprocessor PRIVATE angle_common) # libANGLE file(GLOB LIBANGLE_SOURCES "src/third_party/systeminfo/SystemInfo.cpp" - "src/third_party/murmurhash/MurmurHash3.cpp" + "src/common/third_party/murmurhash/MurmurHash3.cpp" "src/common/event_tracer.cpp" "src/libANGLE/*.cpp" @@ -79,9 +79,9 @@ file(GLOB LIBANGLE_SOURCES "src/libANGLE/renderer/gl/wgl/*.inl" "src/libANGLE/renderer/gl/wgl/*.h" - "src/libANGLE/renderer/vulkan/*.cpp" - "src/libANGLE/renderer/vulkan/*.inl" - "src/libANGLE/renderer/vulkan/*.h" + # "src/libANGLE/renderer/vulkan/*.cpp" + # "src/libANGLE/renderer/vulkan/*.inl" + # "src/libANGLE/renderer/vulkan/*.h" "src/libANGLE/renderer/null/*.cpp" "src/libANGLE/renderer/null/*.inl" @@ -99,7 +99,7 @@ target_compile_definitions(libANGLE PUBLIC -DANGLE_ENABLE_D3D9 -DANGLE_ENABLE_D3D11 -DANGLE_ENABLE_OPENGL - -DANGLE_ENABLE_VULKAN + # -DANGLE_ENABLE_VULKAN -DANGLE_ENABLE_NULL ) target_compile_definitions(libANGLE PRIVATE -DLIBANGLE_IMPLEMENTATION) From 4509e764cc691a0ae097ef512bda2095cf477152 Mon Sep 17 00:00:00 2001 From: bagong Date: Tue, 20 Jun 2017 00:31:34 +0200 Subject: [PATCH 29/39] [AUBIO] Add new package --- ports/aubio/CONTROL | 4 + ports/aubio/aubio-5.def | 442 ++++++++++++++++++++++++++++++ ports/aubio/crt_lib_linkage.patch | 68 +++++ ports/aubio/portfile.cmake | 106 +++++++ 4 files changed, 620 insertions(+) create mode 100644 ports/aubio/CONTROL create mode 100644 ports/aubio/aubio-5.def create mode 100644 ports/aubio/crt_lib_linkage.patch create mode 100644 ports/aubio/portfile.cmake diff --git a/ports/aubio/CONTROL b/ports/aubio/CONTROL new file mode 100644 index 0000000000..f7aee6191a --- /dev/null +++ b/ports/aubio/CONTROL @@ -0,0 +1,4 @@ +Source: aubio +Version: 0.46~alpha +Description: Aubio is a tool designed for the extraction of annotations from audio signals. Its features include segmenting a sound file before each of its attacks, performing pitch detection, tapping the beat and producing midi streams from live audio. +Build-Depends: ffmpeg, libsndfile diff --git a/ports/aubio/aubio-5.def b/ports/aubio/aubio-5.def new file mode 100644 index 0000000000..8b3fb9b7de --- /dev/null +++ b/ports/aubio/aubio-5.def @@ -0,0 +1,442 @@ +EXPORTS +aubio_autocorr +aubio_beattracking_checkstate +aubio_beattracking_do +aubio_beattracking_get_bpm +aubio_beattracking_get_confidence +aubio_beattracking_get_period +aubio_beattracking_get_period_s +aubio_bintofreq +aubio_bintomidi +aubio_cleanup +aubio_db_spl +aubio_default_log +aubio_fft_do +aubio_fft_do_complex +aubio_fft_get_imag +aubio_fft_get_norm +aubio_fft_get_phas +aubio_fft_get_real +aubio_fft_get_realimag +aubio_fft_get_spectrum +aubio_fft_rdo +aubio_fft_rdo_complex +aubio_filter_do +aubio_filter_do_filtfilt +aubio_filter_do_outplace +aubio_filter_do_reset +aubio_filter_get_feedback +aubio_filter_get_feedforward +aubio_filter_get_order +aubio_filter_get_samplerate +aubio_filter_set_a_weighting +aubio_filter_set_biquad +aubio_filter_set_c_weighting +aubio_filter_set_samplerate +aubio_filterbank_do +aubio_filterbank_get_coeffs +aubio_filterbank_set_coeffs +aubio_filterbank_set_mel_coeffs_slaney +aubio_filterbank_set_triangle_bands +aubio_freqtobin +aubio_freqtomidi +aubio_hist_do +aubio_hist_do_notnull +aubio_hist_dyn_notnull +aubio_hist_mean +aubio_hist_weight +aubio_io_validate_channels +aubio_io_validate_samplerate +aubio_is_power_of_two +aubio_level_detection +aubio_level_lin +aubio_log +aubio_log_reset +aubio_log_set_function +aubio_log_set_level_function +aubio_mfcc_do +aubio_miditobin +aubio_miditofreq +aubio_next_power_of_two +aubio_notes_do +aubio_notes_get_minioi_ms +aubio_notes_get_silence +aubio_notes_set_minioi_ms +aubio_notes_set_silence +aubio_onset_do +aubio_onset_get_awhitening +aubio_onset_get_compression +aubio_onset_get_delay +aubio_onset_get_delay_ms +aubio_onset_get_delay_s +aubio_onset_get_descriptor +aubio_onset_get_last +aubio_onset_get_last_ms +aubio_onset_get_last_s +aubio_onset_get_minioi +aubio_onset_get_minioi_ms +aubio_onset_get_minioi_s +aubio_onset_get_silence +aubio_onset_get_threshold +aubio_onset_get_thresholded_descriptor +aubio_onset_reset +aubio_onset_set_awhitening +aubio_onset_set_compression +aubio_onset_set_default_parameters +aubio_onset_set_delay +aubio_onset_set_delay_ms +aubio_onset_set_delay_s +aubio_onset_set_minioi +aubio_onset_set_minioi_ms +aubio_onset_set_minioi_s +aubio_onset_set_silence +aubio_onset_set_threshold +aubio_ooura_cdft +aubio_ooura_ddct +aubio_ooura_ddst +aubio_ooura_dfct +aubio_ooura_dfst +aubio_ooura_rdft +aubio_parameter_get_current_value +aubio_parameter_get_max_value +aubio_parameter_get_min_value +aubio_parameter_get_next_value +aubio_parameter_get_steps +aubio_parameter_set_current_value +aubio_parameter_set_max_value +aubio_parameter_set_min_value +aubio_parameter_set_steps +aubio_parameter_set_target_value +aubio_peakpicker_do +aubio_peakpicker_get_threshold +aubio_peakpicker_get_thresholded_input +aubio_peakpicker_get_thresholdfn +aubio_peakpicker_set_threshold +aubio_peakpicker_set_thresholdfn +aubio_pitch_cands +aubio_pitch_do +aubio_pitch_get_confidence +aubio_pitch_get_silence +aubio_pitch_get_tolerance +aubio_pitch_set_silence +aubio_pitch_set_tolerance +aubio_pitch_set_unit +aubio_pitch_slideblock +aubio_pitchfcomb_do +aubio_pitchmcomb_combdet +aubio_pitchmcomb_do +aubio_pitchmcomb_get_root_peak +aubio_pitchmcomb_quadpick +aubio_pitchmcomb_sort_cand_ene +aubio_pitchmcomb_sort_cand_freq +aubio_pitchmcomb_sort_peak +aubio_pitchmcomb_spectral_pp +aubio_pitchschmitt_do +aubio_pitchspecacf_do +aubio_pitchspecacf_get_confidence +aubio_pitchspecacf_get_tolerance +aubio_pitchspecacf_set_tolerance +aubio_pitchyin_diff +aubio_pitchyin_do +aubio_pitchyin_get_confidence +aubio_pitchyin_get_tolerance +aubio_pitchyin_getcum +aubio_pitchyin_getpitch +aubio_pitchyin_set_tolerance +aubio_pitchyinfft_do +aubio_pitchyinfft_get_confidence +aubio_pitchyinfft_get_tolerance +aubio_pitchyinfft_set_tolerance +aubio_pvoc_do +aubio_pvoc_rdo +aubio_quadfrac +aubio_resampler_do +aubio_sampler_do +aubio_sampler_do_multi +aubio_sampler_get_playing +aubio_sampler_load +aubio_sampler_play +aubio_sampler_set_playing +aubio_sampler_stop +aubio_scale_do +aubio_scale_set_limits +aubio_schmittS16LE +aubio_silence_detection +aubio_sink_close +aubio_sink_do +aubio_sink_do_multi +aubio_sink_get_channels +aubio_sink_get_samplerate +aubio_sink_preset_channels +aubio_sink_preset_samplerate +aubio_sink_sndfile_close +aubio_sink_sndfile_do +aubio_sink_sndfile_do_multi +aubio_sink_sndfile_get_channels +aubio_sink_sndfile_get_samplerate +aubio_sink_sndfile_open +aubio_sink_sndfile_preset_channels +aubio_sink_sndfile_preset_samplerate +aubio_sink_wavwrite_close +aubio_sink_wavwrite_do +aubio_sink_wavwrite_do_multi +aubio_sink_wavwrite_get_channels +aubio_sink_wavwrite_get_samplerate +aubio_sink_wavwrite_open +aubio_sink_wavwrite_preset_channels +aubio_sink_wavwrite_preset_samplerate +aubio_source_avcodec_close +aubio_source_avcodec_do +aubio_source_avcodec_do_multi +aubio_source_avcodec_get_channels +aubio_source_avcodec_get_duration +aubio_source_avcodec_get_samplerate +aubio_source_avcodec_has_network_url +aubio_source_avcodec_readframe +aubio_source_avcodec_reset_resampler +aubio_source_avcodec_seek +aubio_source_close +aubio_source_do +aubio_source_do_multi +aubio_source_get_channels +aubio_source_get_duration +aubio_source_get_samplerate +aubio_source_seek +aubio_source_sndfile_close +aubio_source_sndfile_do +aubio_source_sndfile_do_multi +aubio_source_sndfile_get_channels +aubio_source_sndfile_get_duration +aubio_source_sndfile_get_samplerate +aubio_source_sndfile_seek +aubio_source_wavread_close +aubio_source_wavread_do +aubio_source_wavread_do_multi +aubio_source_wavread_get_channels +aubio_source_wavread_get_duration +aubio_source_wavread_get_samplerate +aubio_source_wavread_readframe +aubio_source_wavread_seek +aubio_specdesc_centroid +aubio_specdesc_complex +aubio_specdesc_decrease +aubio_specdesc_do +aubio_specdesc_energy +aubio_specdesc_hfc +aubio_specdesc_kl +aubio_specdesc_kurtosis +aubio_specdesc_mkl +aubio_specdesc_phase +aubio_specdesc_rolloff +aubio_specdesc_skewness +aubio_specdesc_slope +aubio_specdesc_specdiff +aubio_specdesc_specflux +aubio_specdesc_spread +aubio_specdesc_wphase +aubio_spectral_whitening_do +aubio_spectral_whitening_get_floor +aubio_spectral_whitening_get_relax_time +aubio_spectral_whitening_reset +aubio_spectral_whitening_set_floor +aubio_spectral_whitening_set_relax_time +aubio_tempo_do +aubio_tempo_get_bpm +aubio_tempo_get_confidence +aubio_tempo_get_delay +aubio_tempo_get_delay_ms +aubio_tempo_get_delay_s +aubio_tempo_get_last +aubio_tempo_get_last_ms +aubio_tempo_get_last_s +aubio_tempo_get_last_tatum +aubio_tempo_get_period +aubio_tempo_get_period_s +aubio_tempo_get_silence +aubio_tempo_get_threshold +aubio_tempo_set_delay +aubio_tempo_set_delay_ms +aubio_tempo_set_delay_s +aubio_tempo_set_silence +aubio_tempo_set_tatum_signature +aubio_tempo_set_threshold +aubio_tempo_was_tatum +aubio_tss_do +aubio_tss_set_alpha +aubio_tss_set_beta +aubio_tss_set_threshold +aubio_unwrap2pi +aubio_wavetable_do +aubio_wavetable_do_multi +aubio_wavetable_get_amp +aubio_wavetable_get_freq +aubio_wavetable_get_playing +aubio_wavetable_play +aubio_wavetable_set_amp +aubio_wavetable_set_freq +aubio_wavetable_set_playing +aubio_wavetable_stop +aubio_zero_crossing_rate +cvec_centroid +cvec_copy +cvec_logmag +cvec_mean +cvec_moment +cvec_norm_get_data +cvec_norm_get_sample +cvec_norm_ones +cvec_norm_set_all +cvec_norm_set_sample +cvec_norm_zeros +cvec_phas_get_data +cvec_phas_get_sample +cvec_phas_ones +cvec_phas_set_all +cvec_phas_set_sample +cvec_phas_zeros +cvec_print +cvec_sum +cvec_zeros +del_aubio_beattracking +del_aubio_fft +del_aubio_filter +del_aubio_filterbank +del_aubio_hist +del_aubio_mfcc +del_aubio_notes +del_aubio_onset +del_aubio_parameter +del_aubio_peakpicker +del_aubio_pitch +del_aubio_pitchfcomb +del_aubio_pitchmcomb +del_aubio_pitchschmitt +del_aubio_pitchspecacf +del_aubio_pitchyin +del_aubio_pitchyinfft +del_aubio_pvoc +del_aubio_resampler +del_aubio_sampler +del_aubio_scale +del_aubio_sink +del_aubio_sink_sndfile +del_aubio_sink_wavwrite +del_aubio_source +del_aubio_source_avcodec +del_aubio_source_sndfile +del_aubio_source_wavread +del_aubio_specdesc +del_aubio_spectral_whitening +del_aubio_tempo +del_aubio_tss +del_aubio_wavetable +del_cvec +del_fmat +del_fvec +del_lvec +fmat_copy +fmat_get_channel +fmat_get_channel_data +fmat_get_data +fmat_get_sample +fmat_ones +fmat_print +fmat_rev +fmat_set +fmat_set_sample +fmat_vecmul +fmat_weight +fmat_zeros +fvec_abs +fvec_adapt_thres +fvec_add +fvec_alpha_norm +fvec_alpha_normalise +fvec_ceil +fvec_clamp +fvec_copy +fvec_cos +fvec_exp +fvec_floor +fvec_get_data +fvec_get_sample +fvec_gettimesig +fvec_ishift +fvec_local_hfc +fvec_log +fvec_log10 +fvec_max +fvec_max_elem +fvec_mean +fvec_median +fvec_min +fvec_min_elem +fvec_min_removal +fvec_moving_thres +fvec_ones +fvec_peakpick +fvec_pow +fvec_print +fvec_push +fvec_quadratic_peak_mag +fvec_quadratic_peak_pos +fvec_rev +fvec_round +fvec_set_all +fvec_set_sample +fvec_set_window +fvec_shift +fvec_sin +fvec_sqrt +fvec_sum +fvec_weight +fvec_weighted_copy +fvec_zeros +lvec_get_data +lvec_get_sample +lvec_ones +lvec_print +lvec_set_all +lvec_set_sample +lvec_zeros +new_aubio_beattracking +new_aubio_fft +new_aubio_filter +new_aubio_filter_a_weighting +new_aubio_filter_biquad +new_aubio_filter_c_weighting +new_aubio_filterbank +new_aubio_hist +new_aubio_mfcc +new_aubio_notes +new_aubio_onset +new_aubio_parameter +new_aubio_peakpicker +new_aubio_pitch +new_aubio_pitchfcomb +new_aubio_pitchmcomb +new_aubio_pitchschmitt +new_aubio_pitchspecacf +new_aubio_pitchyin +new_aubio_pitchyinfft +new_aubio_pvoc +new_aubio_resampler +new_aubio_sampler +new_aubio_scale +new_aubio_sink +new_aubio_sink_sndfile +new_aubio_sink_wavwrite +new_aubio_source +new_aubio_source_avcodec +new_aubio_source_sndfile +new_aubio_source_wavread +new_aubio_specdesc +new_aubio_spectral_whitening +new_aubio_tempo +new_aubio_tss +new_aubio_wavetable +new_aubio_window +new_cvec +new_fmat +new_fvec +new_lvec diff --git a/ports/aubio/crt_lib_linkage.patch b/ports/aubio/crt_lib_linkage.patch new file mode 100644 index 0000000000..36a8a3640c --- /dev/null +++ b/ports/aubio/crt_lib_linkage.patch @@ -0,0 +1,68 @@ +diff --git a/src/wscript_build b/src/wscript_build +index 0a7d72a..bf84227 100644 +--- a/src/wscript_build ++++ b/src/wscript_build +@@ -24,7 +24,12 @@ ctx(features = 'c', + if ctx.env['DEST_OS'] in ['ios', 'iosimulator']: + build_features = ['cstlib', 'cshlib'] + elif ctx.env['DEST_OS'] in ['win32', 'win64']: +- build_features = ['cstlib', 'cshlib'] ++ if ctx.options.library_linkage == "static": ++ build_features = ['cstlib'] ++ elif ctx.options.library_linkage == "dynamic": ++ build_features = ['cshlib'] ++ else: ++ build_features = ['cstlib', 'cshlib'] + elif ctx.env['DEST_OS'] in ['emscripten']: + build_features = ['cstlib'] + elif '--static' in ctx.env['LDFLAGS'] or '--static' in ctx.env['LINKFLAGS']: +diff --git a/wscript b/wscript +index 6363f1e..e0d57a4 100644 +--- a/wscript ++++ b/wscript +@@ -44,6 +44,16 @@ def options(ctx): + dest = 'build_type', + help = 'whether to compile with (--build-type=release) or without (--build-type=debug) '\ + ' compiler opimizations [default: release]') ++ ctx.add_option('--crt-linkage', action = 'store', ++ default = "dynamic", ++ choices = ('static', 'dynamic'), ++ dest = 'crt_linkage', ++ help = 'whether to compile with static CRT linkage (--crt-linkage=static) or the default dynamic (--crt-linkage=dynamic)') ++ ctx.add_option('--library-linkage', action = 'store', ++ default = "both", ++ choices = ('dynamic', 'static', 'both'), ++ dest = 'library_linkage', ++ help = 'whether to compile a dynamic (shared) (--library-linkage=dynamic) or static library (--library-linkage=static) ("both" is broken for msvc)') + add_option_enable_disable(ctx, 'fftw3f', default = False, + help_str = 'compile with fftw3f instead of ooura (recommended)', + help_disable_str = 'do not compile with fftw3f') +@@ -139,16 +149,25 @@ def configure(ctx): + else: + # enable debug symbols + ctx.env.CFLAGS += ['/Z7', '/FS'] +- ctx.env.LINKFLAGS += ['/DEBUG', '/INCREMENTAL:NO'] ++ if ctx.options.library_linkage == "dynamic": ++ ctx.env.LINKFLAGS += ['/DEBUG', '/INCREMENTAL:NO', '/DEF:..\\aubio-5.def'] ++ else: ++ ctx.env.LINKFLAGS += ['/DEBUG', '/INCREMENTAL:NO'] + # configure warnings + ctx.env.CFLAGS += ['/W4', '/D_CRT_SECURE_NO_WARNINGS'] + # set optimization level and runtime libs + if (ctx.options.build_type == "release"): + ctx.env.CFLAGS += ['/Ox'] +- ctx.env.CFLAGS += ['/MD'] ++ if (ctx.options.crt_linkage == "static"): ++ ctx.env.CFLAGS += ['/MT'] ++ else: ++ ctx.env.CFLAGS += ['/MD'] + else: + assert(ctx.options.build_type == "debug") +- ctx.env.CFLAGS += ['/MDd'] ++ if (ctx.options.crt_linkage == "static"): ++ ctx.env.CFLAGS += ['/MTd'] ++ else: ++ ctx.env.CFLAGS += ['/MDd'] + + ctx.check_cc(lib='m', uselib_store='M', mandatory=False) + diff --git a/ports/aubio/portfile.cmake b/ports/aubio/portfile.cmake new file mode 100644 index 0000000000..714ec3ae8c --- /dev/null +++ b/ports/aubio/portfile.cmake @@ -0,0 +1,106 @@ +# NOTES +# - if you get a codepage/unicode related error (non-critical) during configuration, +# ignore it or, try switching the console codepage to windows english (`chcp 1252`) +# - the build breaks with "missing pthreads" if --enable-fftw3(f) is added (if fftw3 +# is not added, the embedded ooura fft lib is used) +# - the port uses ffmpeg and libsndfile as dependencies and also depends on possibilty to acquire waf and pkg-config(-lite) in vcpkg. +# - crt-linkage is handled here, not in the generic waf-configure function because it is controlled via a patch to the aubio wscript +# Waf seems to have no generic way to switch crt-linkage. +# - The static build works, but: vcpkg's static ffmpegs build is fake ;), therefore it is still required to make the ffmpeg dlls +# available in order to run exectables with statically linked aubio. + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/aubio-3c230fae309e9ea3298783368dd71bae6172359a) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/aubio/aubio/archive/3c230fae309e9ea3298783368dd71bae6172359a.zip" + FILENAME "aubio-0.4.6-3c230f.zip" + SHA512 081fe59612f0b1860f465208739b1377869c64b91cecf4a6f6fbdea19204b801c650ff956b34be5988ef1905f3546d3c55846037487e0b34b014f1adbb68629c +) +vcpkg_extract_source_archive(${ARCHIVE}) + +# Pkg-config is equired by aubio to detect ffmpeg and libsndfile +vcpkg_find_acquire_program(PKG-CONFIG) + +# Waf depends on python, so this also installs python3 +vcpkg_acquire_waf() + +# Configure pkg-config dir +get_filename_component(PKG_CONFIG_DIR ${PKG-CONFIG} DIRECTORY) +# Add pkg-config and vcpkg-bin-dir to environment search path +set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/bin;${CURRENT_INSTALLED_DIR}/debug/bin;${PKG_CONFIG_DIR};$ENV{PATH}") +# Set pkg-config search-path +set(ENV{PKG_CONFIG_PATH} "${CURRENT_INSTALLED_DIR}/lib/pkgconfig") + +# Add waf executable if missing +if(NOT EXISTS "${SOURCE_PATH}/waf") + file(COPY "${WAF_DIR}/waf" DESTINATION "${SOURCE_PATH}") +endif() + +# Add arguments for crt linkage and library linkage +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/crt_lib_linkage.patch" +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/aubio-5.def DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_waf( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + --library-linkage=${VCPKG_LIBRARY_LINKAGE} + --crt-linkage=${VCPKG_CRT_LINKAGE} + --enable-sndfile + --enable-avcodec + --disable-docs + --verbose + # OPTIONS_DEBUG + # OPTIONS_RELEASE + OPTIONS_BUILD + --library-linkage=${VCPKG_LIBRARY_LINKAGE} + --verbose + --notests + # OPTIONS_BUILD_RELEASE + # OPTIONS_BUILD_DEBUG + # TARGETS +) + +# Postinstall cleanup debug +message(STATUS "Cleaning up build") +# Remove unused files +# Debug executable and include folder +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(GLOB DEBUG_EXECS ${CURRENT_PACKAGES_DIR}/debug/bin/*) +file(REMOVE ${DEBUG_EXECS}) +# In release branch move execs to tools +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/aubio) +file(GLOB RELEASE_EXECS ${CURRENT_PACKAGES_DIR}/bin/*.exe) +file(GLOB RELEASE_EXE_SYMBOLS ${CURRENT_PACKAGES_DIR}/bin/*.pdb) +FILE(COPY ${RELEASE_EXECS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/aubio) +FILE(REMOVE ${RELEASE_EXECS} ${RELEASE_EXE_SYMBOLS}) + +# Prepare (re-)moving dynamic libs +file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll ${CURRENT_PACKAGES_DIR}/debug/lib/*.pdb) +file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/lib/*.dll ${CURRENT_PACKAGES_DIR}/lib/*.pdb) + +if(${VCPKG_LIBRARY_LINKAGE} MATCHES "dynamic") + # Move dlls + file(COPY ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(COPY ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${DEBUG_DLLS} ${RELEASE_DLLS}) +elseif(${VCPKG_LIBRARY_LINKAGE} MATCHES "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +# Handle copyright and credentials +file(COPY + ${SOURCE_PATH}/COPYING + ${SOURCE_PATH}/AUTHORS + ${SOURCE_PATH}/ChangeLog + ${SOURCE_PATH}/README.md + DESTINATION + ${CURRENT_PACKAGES_DIR}/share/aubio) + +file(RENAME ${CURRENT_PACKAGES_DIR}/share/aubio/COPYING ${CURRENT_PACKAGES_DIR}/share/aubio/copyright) + +# TODO +# Add python script for dynamic symbols export in dynamic linking From a2cee615e4c444d5ce84fac618bfb2b18cd6985f Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 20 Jun 2017 02:52:02 -0700 Subject: [PATCH 30/39] [aubio] CMake buildsystem replacement --- ports/aubio/CMakeLists.txt | 54 ++++++++++++++++++++++ ports/aubio/portfile.cmake | 91 +++----------------------------------- 2 files changed, 61 insertions(+), 84 deletions(-) create mode 100644 ports/aubio/CMakeLists.txt diff --git a/ports/aubio/CMakeLists.txt b/ports/aubio/CMakeLists.txt new file mode 100644 index 0000000000..df2c598f9e --- /dev/null +++ b/ports/aubio/CMakeLists.txt @@ -0,0 +1,54 @@ +cmake_minimum_required(VERSION 3.8) +project(aubio C) + +add_definitions( + -DHAVE_STDLIB_H=1 + -DHAVE_STDIO_H=1 + -DHAVE_MATH_H=1 + -DHAVE_STRING_H=1 + -DHAVE_LIMITS_H=1 + -DHAVE_STDARG_H=1 + -DHAVE_C99_VARARGS_MACROS=1 + + -DHAVE_SNDFILE=1 + -DHAVE_WAVWRITE=1 + -DHAVE_WAVREAD=1 + -DHAVE_LIBAV=1 + -DHAVE_SWRESAMPLE=1 +) + +find_path(LIBSNDFILE_H sndfile.h) +find_library(LIBSNDFILE_LIB libsndfile-1) +find_library(AVCODEC_LIB avcodec) +find_library(AVUTIL_LIB avutil) +find_library(AVDEVICE_LIB avdevice) +find_library(AVFILTER_LIB avfilter) +find_library(AVFORMAT_LIB avformat) +find_library(SWRESAMPLE_LIB swresample) + +include_directories(src ${LIBSNDFILE_H}) +link_libraries(${LIBSNDFILE_LIB} ${AVCODEC_LIB} ${AVUTIL_LIB} ${AVDEVICE_LIB} ${AVFILTER_LIB} ${AVFORMAT_LIB} ${SWRESAMPLE_LIB} ws2_32.lib) + +file(GLOB_RECURSE SOURCES src/*.c aubio-5.def) +set_source_files_properties(src/io/sink_wavwrite.c PROPERTIES COMPILE_FLAGS /FIWinsock2.h) +add_library(aubio ${SOURCES}) + +set(CMAKE_DEBUG_POSTFIX d) + +install( + TARGETS aubio + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install( + DIRECTORY src/ + DESTINATION include/aubio + FILES_MATCHING + PATTERN "*.h" + PATTERN "*_priv.h" EXCLUDE + PATTERN "config.h" EXCLUDE + ) +endif() diff --git a/ports/aubio/portfile.cmake b/ports/aubio/portfile.cmake index 714ec3ae8c..e8a7d45515 100644 --- a/ports/aubio/portfile.cmake +++ b/ports/aubio/portfile.cmake @@ -1,14 +1,3 @@ -# NOTES -# - if you get a codepage/unicode related error (non-critical) during configuration, -# ignore it or, try switching the console codepage to windows english (`chcp 1252`) -# - the build breaks with "missing pthreads" if --enable-fftw3(f) is added (if fftw3 -# is not added, the embedded ooura fft lib is used) -# - the port uses ffmpeg and libsndfile as dependencies and also depends on possibilty to acquire waf and pkg-config(-lite) in vcpkg. -# - crt-linkage is handled here, not in the generic waf-configure function because it is controlled via a patch to the aubio wscript -# Waf seems to have no generic way to switch crt-linkage. -# - The static build works, but: vcpkg's static ffmpegs build is fake ;), therefore it is still required to make the ffmpeg dlls -# available in order to run exectables with statically linked aubio. - include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/aubio-3c230fae309e9ea3298783368dd71bae6172359a) vcpkg_download_distfile(ARCHIVE @@ -18,78 +7,14 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) -# Pkg-config is equired by aubio to detect ffmpeg and libsndfile -vcpkg_find_acquire_program(PKG-CONFIG) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/aubio-5.def ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -# Waf depends on python, so this also installs python3 -vcpkg_acquire_waf() - -# Configure pkg-config dir -get_filename_component(PKG_CONFIG_DIR ${PKG-CONFIG} DIRECTORY) -# Add pkg-config and vcpkg-bin-dir to environment search path -set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/bin;${CURRENT_INSTALLED_DIR}/debug/bin;${PKG_CONFIG_DIR};$ENV{PATH}") -# Set pkg-config search-path -set(ENV{PKG_CONFIG_PATH} "${CURRENT_INSTALLED_DIR}/lib/pkgconfig") - -# Add waf executable if missing -if(NOT EXISTS "${SOURCE_PATH}/waf") - file(COPY "${WAF_DIR}/waf" DESTINATION "${SOURCE_PATH}") -endif() - -# Add arguments for crt linkage and library linkage -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/crt_lib_linkage.patch" +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=1 ) - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/aubio-5.def DESTINATION ${SOURCE_PATH}) - -vcpkg_configure_waf( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - --library-linkage=${VCPKG_LIBRARY_LINKAGE} - --crt-linkage=${VCPKG_CRT_LINKAGE} - --enable-sndfile - --enable-avcodec - --disable-docs - --verbose - # OPTIONS_DEBUG - # OPTIONS_RELEASE - OPTIONS_BUILD - --library-linkage=${VCPKG_LIBRARY_LINKAGE} - --verbose - --notests - # OPTIONS_BUILD_RELEASE - # OPTIONS_BUILD_DEBUG - # TARGETS -) - -# Postinstall cleanup debug -message(STATUS "Cleaning up build") -# Remove unused files -# Debug executable and include folder -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -file(GLOB DEBUG_EXECS ${CURRENT_PACKAGES_DIR}/debug/bin/*) -file(REMOVE ${DEBUG_EXECS}) -# In release branch move execs to tools -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/aubio) -file(GLOB RELEASE_EXECS ${CURRENT_PACKAGES_DIR}/bin/*.exe) -file(GLOB RELEASE_EXE_SYMBOLS ${CURRENT_PACKAGES_DIR}/bin/*.pdb) -FILE(COPY ${RELEASE_EXECS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/aubio) -FILE(REMOVE ${RELEASE_EXECS} ${RELEASE_EXE_SYMBOLS}) - -# Prepare (re-)moving dynamic libs -file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll ${CURRENT_PACKAGES_DIR}/debug/lib/*.pdb) -file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/lib/*.dll ${CURRENT_PACKAGES_DIR}/lib/*.pdb) - -if(${VCPKG_LIBRARY_LINKAGE} MATCHES "dynamic") - # Move dlls - file(COPY ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - file(COPY ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE ${DEBUG_DLLS} ${RELEASE_DLLS}) -elseif(${VCPKG_LIBRARY_LINKAGE} MATCHES "static") - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) -endif() +vcpkg_install_cmake() # Handle copyright and credentials file(COPY @@ -100,7 +25,5 @@ file(COPY DESTINATION ${CURRENT_PACKAGES_DIR}/share/aubio) +vcpkg_copy_pdbs() file(RENAME ${CURRENT_PACKAGES_DIR}/share/aubio/COPYING ${CURRENT_PACKAGES_DIR}/share/aubio/copyright) - -# TODO -# Add python script for dynamic symbols export in dynamic linking From ced194257dd35c5ccd38f3ed19a3cafdaadb5393 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 20 Jun 2017 03:06:29 -0700 Subject: [PATCH 31/39] [aubio] Fix static build --- ports/aubio/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/aubio/CMakeLists.txt b/ports/aubio/CMakeLists.txt index df2c598f9e..d1124b46ca 100644 --- a/ports/aubio/CMakeLists.txt +++ b/ports/aubio/CMakeLists.txt @@ -18,7 +18,7 @@ add_definitions( ) find_path(LIBSNDFILE_H sndfile.h) -find_library(LIBSNDFILE_LIB libsndfile-1) +find_library(LIBSNDFILE_LIB NAMES libsndfile-1 libsndfile) find_library(AVCODEC_LIB avcodec) find_library(AVUTIL_LIB avutil) find_library(AVDEVICE_LIB avdevice) From b7efd0e07d1a397e701f038569204d6a2879ed67 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 20 Jun 2017 03:16:23 -0700 Subject: [PATCH 32/39] [aubio] Use CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS --- ports/aubio/CMakeLists.txt | 4 +- ports/aubio/aubio-5.def | 442 ------------------------------ ports/aubio/crt_lib_linkage.patch | 68 ----- ports/aubio/portfile.cmake | 14 +- 4 files changed, 10 insertions(+), 518 deletions(-) delete mode 100644 ports/aubio/aubio-5.def delete mode 100644 ports/aubio/crt_lib_linkage.patch diff --git a/ports/aubio/CMakeLists.txt b/ports/aubio/CMakeLists.txt index d1124b46ca..6577e075ce 100644 --- a/ports/aubio/CMakeLists.txt +++ b/ports/aubio/CMakeLists.txt @@ -17,6 +17,8 @@ add_definitions( -DHAVE_SWRESAMPLE=1 ) +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) + find_path(LIBSNDFILE_H sndfile.h) find_library(LIBSNDFILE_LIB NAMES libsndfile-1 libsndfile) find_library(AVCODEC_LIB avcodec) @@ -29,7 +31,7 @@ find_library(SWRESAMPLE_LIB swresample) include_directories(src ${LIBSNDFILE_H}) link_libraries(${LIBSNDFILE_LIB} ${AVCODEC_LIB} ${AVUTIL_LIB} ${AVDEVICE_LIB} ${AVFILTER_LIB} ${AVFORMAT_LIB} ${SWRESAMPLE_LIB} ws2_32.lib) -file(GLOB_RECURSE SOURCES src/*.c aubio-5.def) +file(GLOB_RECURSE SOURCES src/*.c) set_source_files_properties(src/io/sink_wavwrite.c PROPERTIES COMPILE_FLAGS /FIWinsock2.h) add_library(aubio ${SOURCES}) diff --git a/ports/aubio/aubio-5.def b/ports/aubio/aubio-5.def deleted file mode 100644 index 8b3fb9b7de..0000000000 --- a/ports/aubio/aubio-5.def +++ /dev/null @@ -1,442 +0,0 @@ -EXPORTS -aubio_autocorr -aubio_beattracking_checkstate -aubio_beattracking_do -aubio_beattracking_get_bpm -aubio_beattracking_get_confidence -aubio_beattracking_get_period -aubio_beattracking_get_period_s -aubio_bintofreq -aubio_bintomidi -aubio_cleanup -aubio_db_spl -aubio_default_log -aubio_fft_do -aubio_fft_do_complex -aubio_fft_get_imag -aubio_fft_get_norm -aubio_fft_get_phas -aubio_fft_get_real -aubio_fft_get_realimag -aubio_fft_get_spectrum -aubio_fft_rdo -aubio_fft_rdo_complex -aubio_filter_do -aubio_filter_do_filtfilt -aubio_filter_do_outplace -aubio_filter_do_reset -aubio_filter_get_feedback -aubio_filter_get_feedforward -aubio_filter_get_order -aubio_filter_get_samplerate -aubio_filter_set_a_weighting -aubio_filter_set_biquad -aubio_filter_set_c_weighting -aubio_filter_set_samplerate -aubio_filterbank_do -aubio_filterbank_get_coeffs -aubio_filterbank_set_coeffs -aubio_filterbank_set_mel_coeffs_slaney -aubio_filterbank_set_triangle_bands -aubio_freqtobin -aubio_freqtomidi -aubio_hist_do -aubio_hist_do_notnull -aubio_hist_dyn_notnull -aubio_hist_mean -aubio_hist_weight -aubio_io_validate_channels -aubio_io_validate_samplerate -aubio_is_power_of_two -aubio_level_detection -aubio_level_lin -aubio_log -aubio_log_reset -aubio_log_set_function -aubio_log_set_level_function -aubio_mfcc_do -aubio_miditobin -aubio_miditofreq -aubio_next_power_of_two -aubio_notes_do -aubio_notes_get_minioi_ms -aubio_notes_get_silence -aubio_notes_set_minioi_ms -aubio_notes_set_silence -aubio_onset_do -aubio_onset_get_awhitening -aubio_onset_get_compression -aubio_onset_get_delay -aubio_onset_get_delay_ms -aubio_onset_get_delay_s -aubio_onset_get_descriptor -aubio_onset_get_last -aubio_onset_get_last_ms -aubio_onset_get_last_s -aubio_onset_get_minioi -aubio_onset_get_minioi_ms -aubio_onset_get_minioi_s -aubio_onset_get_silence -aubio_onset_get_threshold -aubio_onset_get_thresholded_descriptor -aubio_onset_reset -aubio_onset_set_awhitening -aubio_onset_set_compression -aubio_onset_set_default_parameters -aubio_onset_set_delay -aubio_onset_set_delay_ms -aubio_onset_set_delay_s -aubio_onset_set_minioi -aubio_onset_set_minioi_ms -aubio_onset_set_minioi_s -aubio_onset_set_silence -aubio_onset_set_threshold -aubio_ooura_cdft -aubio_ooura_ddct -aubio_ooura_ddst -aubio_ooura_dfct -aubio_ooura_dfst -aubio_ooura_rdft -aubio_parameter_get_current_value -aubio_parameter_get_max_value -aubio_parameter_get_min_value -aubio_parameter_get_next_value -aubio_parameter_get_steps -aubio_parameter_set_current_value -aubio_parameter_set_max_value -aubio_parameter_set_min_value -aubio_parameter_set_steps -aubio_parameter_set_target_value -aubio_peakpicker_do -aubio_peakpicker_get_threshold -aubio_peakpicker_get_thresholded_input -aubio_peakpicker_get_thresholdfn -aubio_peakpicker_set_threshold -aubio_peakpicker_set_thresholdfn -aubio_pitch_cands -aubio_pitch_do -aubio_pitch_get_confidence -aubio_pitch_get_silence -aubio_pitch_get_tolerance -aubio_pitch_set_silence -aubio_pitch_set_tolerance -aubio_pitch_set_unit -aubio_pitch_slideblock -aubio_pitchfcomb_do -aubio_pitchmcomb_combdet -aubio_pitchmcomb_do -aubio_pitchmcomb_get_root_peak -aubio_pitchmcomb_quadpick -aubio_pitchmcomb_sort_cand_ene -aubio_pitchmcomb_sort_cand_freq -aubio_pitchmcomb_sort_peak -aubio_pitchmcomb_spectral_pp -aubio_pitchschmitt_do -aubio_pitchspecacf_do -aubio_pitchspecacf_get_confidence -aubio_pitchspecacf_get_tolerance -aubio_pitchspecacf_set_tolerance -aubio_pitchyin_diff -aubio_pitchyin_do -aubio_pitchyin_get_confidence -aubio_pitchyin_get_tolerance -aubio_pitchyin_getcum -aubio_pitchyin_getpitch -aubio_pitchyin_set_tolerance -aubio_pitchyinfft_do -aubio_pitchyinfft_get_confidence -aubio_pitchyinfft_get_tolerance -aubio_pitchyinfft_set_tolerance -aubio_pvoc_do -aubio_pvoc_rdo -aubio_quadfrac -aubio_resampler_do -aubio_sampler_do -aubio_sampler_do_multi -aubio_sampler_get_playing -aubio_sampler_load -aubio_sampler_play -aubio_sampler_set_playing -aubio_sampler_stop -aubio_scale_do -aubio_scale_set_limits -aubio_schmittS16LE -aubio_silence_detection -aubio_sink_close -aubio_sink_do -aubio_sink_do_multi -aubio_sink_get_channels -aubio_sink_get_samplerate -aubio_sink_preset_channels -aubio_sink_preset_samplerate -aubio_sink_sndfile_close -aubio_sink_sndfile_do -aubio_sink_sndfile_do_multi -aubio_sink_sndfile_get_channels -aubio_sink_sndfile_get_samplerate -aubio_sink_sndfile_open -aubio_sink_sndfile_preset_channels -aubio_sink_sndfile_preset_samplerate -aubio_sink_wavwrite_close -aubio_sink_wavwrite_do -aubio_sink_wavwrite_do_multi -aubio_sink_wavwrite_get_channels -aubio_sink_wavwrite_get_samplerate -aubio_sink_wavwrite_open -aubio_sink_wavwrite_preset_channels -aubio_sink_wavwrite_preset_samplerate -aubio_source_avcodec_close -aubio_source_avcodec_do -aubio_source_avcodec_do_multi -aubio_source_avcodec_get_channels -aubio_source_avcodec_get_duration -aubio_source_avcodec_get_samplerate -aubio_source_avcodec_has_network_url -aubio_source_avcodec_readframe -aubio_source_avcodec_reset_resampler -aubio_source_avcodec_seek -aubio_source_close -aubio_source_do -aubio_source_do_multi -aubio_source_get_channels -aubio_source_get_duration -aubio_source_get_samplerate -aubio_source_seek -aubio_source_sndfile_close -aubio_source_sndfile_do -aubio_source_sndfile_do_multi -aubio_source_sndfile_get_channels -aubio_source_sndfile_get_duration -aubio_source_sndfile_get_samplerate -aubio_source_sndfile_seek -aubio_source_wavread_close -aubio_source_wavread_do -aubio_source_wavread_do_multi -aubio_source_wavread_get_channels -aubio_source_wavread_get_duration -aubio_source_wavread_get_samplerate -aubio_source_wavread_readframe -aubio_source_wavread_seek -aubio_specdesc_centroid -aubio_specdesc_complex -aubio_specdesc_decrease -aubio_specdesc_do -aubio_specdesc_energy -aubio_specdesc_hfc -aubio_specdesc_kl -aubio_specdesc_kurtosis -aubio_specdesc_mkl -aubio_specdesc_phase -aubio_specdesc_rolloff -aubio_specdesc_skewness -aubio_specdesc_slope -aubio_specdesc_specdiff -aubio_specdesc_specflux -aubio_specdesc_spread -aubio_specdesc_wphase -aubio_spectral_whitening_do -aubio_spectral_whitening_get_floor -aubio_spectral_whitening_get_relax_time -aubio_spectral_whitening_reset -aubio_spectral_whitening_set_floor -aubio_spectral_whitening_set_relax_time -aubio_tempo_do -aubio_tempo_get_bpm -aubio_tempo_get_confidence -aubio_tempo_get_delay -aubio_tempo_get_delay_ms -aubio_tempo_get_delay_s -aubio_tempo_get_last -aubio_tempo_get_last_ms -aubio_tempo_get_last_s -aubio_tempo_get_last_tatum -aubio_tempo_get_period -aubio_tempo_get_period_s -aubio_tempo_get_silence -aubio_tempo_get_threshold -aubio_tempo_set_delay -aubio_tempo_set_delay_ms -aubio_tempo_set_delay_s -aubio_tempo_set_silence -aubio_tempo_set_tatum_signature -aubio_tempo_set_threshold -aubio_tempo_was_tatum -aubio_tss_do -aubio_tss_set_alpha -aubio_tss_set_beta -aubio_tss_set_threshold -aubio_unwrap2pi -aubio_wavetable_do -aubio_wavetable_do_multi -aubio_wavetable_get_amp -aubio_wavetable_get_freq -aubio_wavetable_get_playing -aubio_wavetable_play -aubio_wavetable_set_amp -aubio_wavetable_set_freq -aubio_wavetable_set_playing -aubio_wavetable_stop -aubio_zero_crossing_rate -cvec_centroid -cvec_copy -cvec_logmag -cvec_mean -cvec_moment -cvec_norm_get_data -cvec_norm_get_sample -cvec_norm_ones -cvec_norm_set_all -cvec_norm_set_sample -cvec_norm_zeros -cvec_phas_get_data -cvec_phas_get_sample -cvec_phas_ones -cvec_phas_set_all -cvec_phas_set_sample -cvec_phas_zeros -cvec_print -cvec_sum -cvec_zeros -del_aubio_beattracking -del_aubio_fft -del_aubio_filter -del_aubio_filterbank -del_aubio_hist -del_aubio_mfcc -del_aubio_notes -del_aubio_onset -del_aubio_parameter -del_aubio_peakpicker -del_aubio_pitch -del_aubio_pitchfcomb -del_aubio_pitchmcomb -del_aubio_pitchschmitt -del_aubio_pitchspecacf -del_aubio_pitchyin -del_aubio_pitchyinfft -del_aubio_pvoc -del_aubio_resampler -del_aubio_sampler -del_aubio_scale -del_aubio_sink -del_aubio_sink_sndfile -del_aubio_sink_wavwrite -del_aubio_source -del_aubio_source_avcodec -del_aubio_source_sndfile -del_aubio_source_wavread -del_aubio_specdesc -del_aubio_spectral_whitening -del_aubio_tempo -del_aubio_tss -del_aubio_wavetable -del_cvec -del_fmat -del_fvec -del_lvec -fmat_copy -fmat_get_channel -fmat_get_channel_data -fmat_get_data -fmat_get_sample -fmat_ones -fmat_print -fmat_rev -fmat_set -fmat_set_sample -fmat_vecmul -fmat_weight -fmat_zeros -fvec_abs -fvec_adapt_thres -fvec_add -fvec_alpha_norm -fvec_alpha_normalise -fvec_ceil -fvec_clamp -fvec_copy -fvec_cos -fvec_exp -fvec_floor -fvec_get_data -fvec_get_sample -fvec_gettimesig -fvec_ishift -fvec_local_hfc -fvec_log -fvec_log10 -fvec_max -fvec_max_elem -fvec_mean -fvec_median -fvec_min -fvec_min_elem -fvec_min_removal -fvec_moving_thres -fvec_ones -fvec_peakpick -fvec_pow -fvec_print -fvec_push -fvec_quadratic_peak_mag -fvec_quadratic_peak_pos -fvec_rev -fvec_round -fvec_set_all -fvec_set_sample -fvec_set_window -fvec_shift -fvec_sin -fvec_sqrt -fvec_sum -fvec_weight -fvec_weighted_copy -fvec_zeros -lvec_get_data -lvec_get_sample -lvec_ones -lvec_print -lvec_set_all -lvec_set_sample -lvec_zeros -new_aubio_beattracking -new_aubio_fft -new_aubio_filter -new_aubio_filter_a_weighting -new_aubio_filter_biquad -new_aubio_filter_c_weighting -new_aubio_filterbank -new_aubio_hist -new_aubio_mfcc -new_aubio_notes -new_aubio_onset -new_aubio_parameter -new_aubio_peakpicker -new_aubio_pitch -new_aubio_pitchfcomb -new_aubio_pitchmcomb -new_aubio_pitchschmitt -new_aubio_pitchspecacf -new_aubio_pitchyin -new_aubio_pitchyinfft -new_aubio_pvoc -new_aubio_resampler -new_aubio_sampler -new_aubio_scale -new_aubio_sink -new_aubio_sink_sndfile -new_aubio_sink_wavwrite -new_aubio_source -new_aubio_source_avcodec -new_aubio_source_sndfile -new_aubio_source_wavread -new_aubio_specdesc -new_aubio_spectral_whitening -new_aubio_tempo -new_aubio_tss -new_aubio_wavetable -new_aubio_window -new_cvec -new_fmat -new_fvec -new_lvec diff --git a/ports/aubio/crt_lib_linkage.patch b/ports/aubio/crt_lib_linkage.patch deleted file mode 100644 index 36a8a3640c..0000000000 --- a/ports/aubio/crt_lib_linkage.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff --git a/src/wscript_build b/src/wscript_build -index 0a7d72a..bf84227 100644 ---- a/src/wscript_build -+++ b/src/wscript_build -@@ -24,7 +24,12 @@ ctx(features = 'c', - if ctx.env['DEST_OS'] in ['ios', 'iosimulator']: - build_features = ['cstlib', 'cshlib'] - elif ctx.env['DEST_OS'] in ['win32', 'win64']: -- build_features = ['cstlib', 'cshlib'] -+ if ctx.options.library_linkage == "static": -+ build_features = ['cstlib'] -+ elif ctx.options.library_linkage == "dynamic": -+ build_features = ['cshlib'] -+ else: -+ build_features = ['cstlib', 'cshlib'] - elif ctx.env['DEST_OS'] in ['emscripten']: - build_features = ['cstlib'] - elif '--static' in ctx.env['LDFLAGS'] or '--static' in ctx.env['LINKFLAGS']: -diff --git a/wscript b/wscript -index 6363f1e..e0d57a4 100644 ---- a/wscript -+++ b/wscript -@@ -44,6 +44,16 @@ def options(ctx): - dest = 'build_type', - help = 'whether to compile with (--build-type=release) or without (--build-type=debug) '\ - ' compiler opimizations [default: release]') -+ ctx.add_option('--crt-linkage', action = 'store', -+ default = "dynamic", -+ choices = ('static', 'dynamic'), -+ dest = 'crt_linkage', -+ help = 'whether to compile with static CRT linkage (--crt-linkage=static) or the default dynamic (--crt-linkage=dynamic)') -+ ctx.add_option('--library-linkage', action = 'store', -+ default = "both", -+ choices = ('dynamic', 'static', 'both'), -+ dest = 'library_linkage', -+ help = 'whether to compile a dynamic (shared) (--library-linkage=dynamic) or static library (--library-linkage=static) ("both" is broken for msvc)') - add_option_enable_disable(ctx, 'fftw3f', default = False, - help_str = 'compile with fftw3f instead of ooura (recommended)', - help_disable_str = 'do not compile with fftw3f') -@@ -139,16 +149,25 @@ def configure(ctx): - else: - # enable debug symbols - ctx.env.CFLAGS += ['/Z7', '/FS'] -- ctx.env.LINKFLAGS += ['/DEBUG', '/INCREMENTAL:NO'] -+ if ctx.options.library_linkage == "dynamic": -+ ctx.env.LINKFLAGS += ['/DEBUG', '/INCREMENTAL:NO', '/DEF:..\\aubio-5.def'] -+ else: -+ ctx.env.LINKFLAGS += ['/DEBUG', '/INCREMENTAL:NO'] - # configure warnings - ctx.env.CFLAGS += ['/W4', '/D_CRT_SECURE_NO_WARNINGS'] - # set optimization level and runtime libs - if (ctx.options.build_type == "release"): - ctx.env.CFLAGS += ['/Ox'] -- ctx.env.CFLAGS += ['/MD'] -+ if (ctx.options.crt_linkage == "static"): -+ ctx.env.CFLAGS += ['/MT'] -+ else: -+ ctx.env.CFLAGS += ['/MD'] - else: - assert(ctx.options.build_type == "debug") -- ctx.env.CFLAGS += ['/MDd'] -+ if (ctx.options.crt_linkage == "static"): -+ ctx.env.CFLAGS += ['/MTd'] -+ else: -+ ctx.env.CFLAGS += ['/MDd'] - - ctx.check_cc(lib='m', uselib_store='M', mandatory=False) - diff --git a/ports/aubio/portfile.cmake b/ports/aubio/portfile.cmake index e8a7d45515..1e19933267 100644 --- a/ports/aubio/portfile.cmake +++ b/ports/aubio/portfile.cmake @@ -7,7 +7,7 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/aubio-5.def ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -17,12 +17,12 @@ vcpkg_configure_cmake( vcpkg_install_cmake() # Handle copyright and credentials -file(COPY - ${SOURCE_PATH}/COPYING - ${SOURCE_PATH}/AUTHORS - ${SOURCE_PATH}/ChangeLog - ${SOURCE_PATH}/README.md - DESTINATION +file(COPY + ${SOURCE_PATH}/COPYING + ${SOURCE_PATH}/AUTHORS + ${SOURCE_PATH}/ChangeLog + ${SOURCE_PATH}/README.md + DESTINATION ${CURRENT_PACKAGES_DIR}/share/aubio) vcpkg_copy_pdbs() From 196b48ef5f1344a845e8381676f2798eb1011809 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 28 Jun 2017 13:56:24 -0700 Subject: [PATCH 33/39] [aubio] Add capability to build tools (note: currently fails due to missing config.h) --- ports/aubio/CMakeLists.txt | 146 +++++++++++++++++++++++-------------- ports/aubio/CONTROL | 2 +- ports/aubio/portfile.cmake | 7 +- 3 files changed, 97 insertions(+), 58 deletions(-) diff --git a/ports/aubio/CMakeLists.txt b/ports/aubio/CMakeLists.txt index 6577e075ce..bb24c5b156 100644 --- a/ports/aubio/CMakeLists.txt +++ b/ports/aubio/CMakeLists.txt @@ -1,56 +1,90 @@ -cmake_minimum_required(VERSION 3.8) -project(aubio C) - -add_definitions( - -DHAVE_STDLIB_H=1 - -DHAVE_STDIO_H=1 - -DHAVE_MATH_H=1 - -DHAVE_STRING_H=1 - -DHAVE_LIMITS_H=1 - -DHAVE_STDARG_H=1 - -DHAVE_C99_VARARGS_MACROS=1 - - -DHAVE_SNDFILE=1 - -DHAVE_WAVWRITE=1 - -DHAVE_WAVREAD=1 - -DHAVE_LIBAV=1 - -DHAVE_SWRESAMPLE=1 -) - -set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) - -find_path(LIBSNDFILE_H sndfile.h) -find_library(LIBSNDFILE_LIB NAMES libsndfile-1 libsndfile) -find_library(AVCODEC_LIB avcodec) -find_library(AVUTIL_LIB avutil) -find_library(AVDEVICE_LIB avdevice) -find_library(AVFILTER_LIB avfilter) -find_library(AVFORMAT_LIB avformat) -find_library(SWRESAMPLE_LIB swresample) - -include_directories(src ${LIBSNDFILE_H}) -link_libraries(${LIBSNDFILE_LIB} ${AVCODEC_LIB} ${AVUTIL_LIB} ${AVDEVICE_LIB} ${AVFILTER_LIB} ${AVFORMAT_LIB} ${SWRESAMPLE_LIB} ws2_32.lib) - -file(GLOB_RECURSE SOURCES src/*.c) -set_source_files_properties(src/io/sink_wavwrite.c PROPERTIES COMPILE_FLAGS /FIWinsock2.h) -add_library(aubio ${SOURCES}) - -set(CMAKE_DEBUG_POSTFIX d) - -install( - TARGETS aubio - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib -) - -if(NOT DISABLE_INSTALL_HEADERS) - install( - DIRECTORY src/ - DESTINATION include/aubio - FILES_MATCHING - PATTERN "*.h" - PATTERN "*_priv.h" EXCLUDE - PATTERN "config.h" EXCLUDE - ) -endif() +cmake_minimum_required(VERSION 3.8) +project(aubio C) + +add_definitions( + -DHAVE_STDLIB_H=1 + -DHAVE_STDIO_H=1 + -DHAVE_MATH_H=1 + -DHAVE_STRING_H=1 + -DHAVE_LIMITS_H=1 + -DHAVE_STDARG_H=1 + -DHAVE_C99_VARARGS_MACROS=1 + + -DHAVE_SNDFILE=1 + -DHAVE_WAVWRITE=1 + -DHAVE_WAVREAD=1 + -DHAVE_LIBAV=1 + -DHAVE_SWRESAMPLE=1 +) + +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +set(CMAKE_DEBUG_POSTFIX d) + +option(BUILD_TOOLS "Build and install tools" ON) +set(TOOLS_INSTALLDIR "bin" CACHE STRING "Target directory for installed tools") + +find_path(LIBSNDFILE_H sndfile.h) +find_library(LIBSNDFILE_LIB NAMES libsndfile-1 libsndfile) +find_library(AVCODEC_LIB avcodec) +find_library(AVUTIL_LIB avutil) +find_library(AVDEVICE_LIB avdevice) +find_library(AVFILTER_LIB avfilter) +find_library(AVFORMAT_LIB avformat) +find_library(SWRESAMPLE_LIB swresample) +find_library(OGG_LIB ogg) +find_library(FLAC_LIB flac) +find_library(VORBIS_LIB vorbis) +find_library(VORBISENC_LIB vorbisenc) + +include_directories(src ${LIBSNDFILE_H}) + +file(GLOB_RECURSE SOURCES src/*.c) + +set_source_files_properties(src/io/sink_wavwrite.c PROPERTIES COMPILE_FLAGS /FIWinsock2.h) +add_library(aubio ${SOURCES}) +target_link_libraries(aubio PUBLIC + ${LIBSNDFILE_LIB} + ${OGG_LIB} + ${FLAC_LIB} + ${VORBIS_LIB} + ${VORBISENC_LIB} + ${AVCODEC_LIB} + ${AVUTIL_LIB} + ${AVDEVICE_LIB} + ${AVFILTER_LIB} + ${AVFORMAT_LIB} + ${SWRESAMPLE_LIB} + ws2_32.lib +) + +if(BUILD_TOOLS) + set(EXAMPLE_EXECS aubiomfcc aubionotes aubioonset aubiopitch aubioquiet aubiotrack) + foreach(EXAMPLE_EXEC ${EXAMPLE_EXECS}) + add_executable(${EXAMPLE_EXEC} examples/${EXAMPLE_EXEC}.c examples/utils.c examples/jackio.c) + target_link_libraries(${EXAMPLE_EXEC} PRIVATE aubio) + target_compile_definitions(${EXAMPLE_EXEC} PRIVATE -DHAVE_WIN_HACKS=1) + endforeach() + + install( + TARGETS ${EXAMPLE_EXECS} + RUNTIME DESTINATION ${TOOLS_INSTALLDIR} + ) +endif() + +install( + TARGETS aubio + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install( + DIRECTORY src/ + DESTINATION include/aubio + FILES_MATCHING + PATTERN "*.h" + PATTERN "*_priv.h" EXCLUDE + PATTERN "config.h" EXCLUDE + ) +endif() diff --git a/ports/aubio/CONTROL b/ports/aubio/CONTROL index f7aee6191a..3edc3db74a 100644 --- a/ports/aubio/CONTROL +++ b/ports/aubio/CONTROL @@ -1,4 +1,4 @@ Source: aubio Version: 0.46~alpha Description: Aubio is a tool designed for the extraction of annotations from audio signals. Its features include segmenting a sound file before each of its attacks, performing pitch detection, tapping the beat and producing midi streams from live audio. -Build-Depends: ffmpeg, libsndfile +Build-Depends: ffmpeg, libsndfile, libogg, libflac, libvorbis diff --git a/ports/aubio/portfile.cmake b/ports/aubio/portfile.cmake index 1e19933267..6f7b5fbc88 100644 --- a/ports/aubio/portfile.cmake +++ b/ports/aubio/portfile.cmake @@ -12,7 +12,12 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=1 + OPTIONS_RELEASE + #-DTOOLS_INSTALLDIR=tools/aubio + -DBUILD_TOOLS=OFF + OPTIONS_DEBUG + -DDISABLE_INSTALL_HEADERS=1 + -DBUILD_TOOLS=OFF ) vcpkg_install_cmake() From a88a904849e03cc807942f78edf06ba7b464b6cd Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 28 Jun 2017 14:16:48 -0700 Subject: [PATCH 34/39] [kinectsdk1] Move includes to match how the SDK expects them to be included --- ports/kinectsdk1/CONTROL | 2 +- ports/kinectsdk1/portfile.cmake | 16 +++------------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/ports/kinectsdk1/CONTROL b/ports/kinectsdk1/CONTROL index 21f5314257..3d4c83fd28 100644 --- a/ports/kinectsdk1/CONTROL +++ b/ports/kinectsdk1/CONTROL @@ -1,3 +1,3 @@ Source: kinectsdk1 -Version: 1.8 +Version: 1.8-1 Description: Kinect for Windows SDK for Kinect v1 sensor. diff --git a/ports/kinectsdk1/portfile.cmake b/ports/kinectsdk1/portfile.cmake index 61f006492f..3df29b3bf6 100644 --- a/ports/kinectsdk1/portfile.cmake +++ b/ports/kinectsdk1/portfile.cmake @@ -1,15 +1,3 @@ -# Common Ambient Variables: -# 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 = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# - include(vcpkg_common_functions) get_filename_component(KINECTSDK10_DIR "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Kinect;SDKInstallPath]" ABSOLUTE CACHE) @@ -24,13 +12,15 @@ file( "${KINECTSDK10_DIR}/inc/NuiSensor.h" "${KINECTSDK10_DIR}/inc/NuiSkeleton.h" DESTINATION - ${CURRENT_PACKAGES_DIR}/include/kinectsdk1 + ${CURRENT_PACKAGES_DIR}/include ) if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") set(ARCHITECTURE x86) elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") set(ARCHITECTURE amd64) +else() + message(FATAL_ERROR "This port does not currently support architecture: ${VCPKG_TARGET_ARCHITECTURE}") endif() file( From 59441adf76db180ff9ba9b0d92443d607d7c4741 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 28 Jun 2017 14:19:40 -0700 Subject: [PATCH 35/39] [kinectsdk1] Improve not-found error message --- ports/kinectsdk1/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/kinectsdk1/portfile.cmake b/ports/kinectsdk1/portfile.cmake index 3df29b3bf6..aef4cd1c2f 100644 --- a/ports/kinectsdk1/portfile.cmake +++ b/ports/kinectsdk1/portfile.cmake @@ -2,7 +2,7 @@ include(vcpkg_common_functions) get_filename_component(KINECTSDK10_DIR "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Kinect;SDKInstallPath]" ABSOLUTE CACHE) if(NOT EXISTS "${KINECTSDK10_DIR}") - message(FATAL_ERROR "Error: Could not find Kinect for Windows SDK v1.x.") + message(FATAL_ERROR "Error: Could not find Kinect for Windows SDK v1.x. It can be downloaded from https://www.microsoft.com/en-us/download/details.aspx?id=40278.") endif() file( From 2c248dd4a6f473e57ade0c529b81e3b8f3b4dd4e Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 28 Jun 2017 14:26:44 -0700 Subject: [PATCH 36/39] [rtmidi] Slightly simplify cmake replacement --- ports/rtmidi/CMakeLists.txt | 25 ++----------------------- ports/rtmidi/CONTROL | 2 +- 2 files changed, 3 insertions(+), 24 deletions(-) diff --git a/ports/rtmidi/CMakeLists.txt b/ports/rtmidi/CMakeLists.txt index 0603fdcb85..91782fd181 100644 --- a/ports/rtmidi/CMakeLists.txt +++ b/ports/rtmidi/CMakeLists.txt @@ -1,32 +1,11 @@ cmake_minimum_required(VERSION 3.8) project(rtmidi CXX) -set(RTMIDI_SOURCES - ${PROJECT_SOURCE_DIR}/RtMidi.cpp - ${PROJECT_SOURCE_DIR}/rtmidi_c.cpp -) - -set(RTMIDI_HEADERS - ${PROJECT_SOURCE_DIR}/RtMidi.h - ${PROJECT_SOURCE_DIR}/rtmidi_c.h -) - -include_directories(${RTMIDI_HEADERS}) - -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(BUILD_SHARED_LIBS ON) -else() - set(BUILD_SHARED_LIBS OFF) -endif() - +add_library(rtmidi RtMidi.cpp rtmidi_c.cpp) if(BUILD_SHARED_LIBS) - add_library(rtmidi SHARED ${RTMIDI_SOURCES}) target_compile_definitions(rtmidi PRIVATE -DRTMIDI_EXPORT) -else() - add_library(rtmidi STATIC ${RTMIDI_SOURCES}) endif() - file(READ "${PROJECT_SOURCE_DIR}/rtmidi_c.h" RTMIDI_EXPORT) if (BUILD_SHARED_LIBS) string(REPLACE "if defined(RTMIDI_EXPORT)" "if 1" RTMIDI_EXPORT "${RTMIDI_EXPORT}") @@ -43,6 +22,6 @@ install( ) if(NOT DISABLE_INSTALL_HEADERS) - install(FILES "${PROJECT_SOURCE_DIR}/RtMidi.h" DESTINATION include) + install(FILES "RtMidi.h" DESTINATION include) install(FILES "${PROJECT_BINARY_DIR}/rtmidi_c.h" DESTINATION include) endif() diff --git a/ports/rtmidi/CONTROL b/ports/rtmidi/CONTROL index 9cf64df9ed..9057812a05 100644 --- a/ports/rtmidi/CONTROL +++ b/ports/rtmidi/CONTROL @@ -1,3 +1,3 @@ Source: rtmidi -Version: 2.1.1 +Version: 2.1.1-1 Description: A set of C++ classes that provide a common API for realtime MIDI input/output across Linux (ALSA & JACK), Macintosh OS X (CoreMidi & JACK) and Windows (Multimedia) From 821039eeb702b0f65156fb5510d53b0b9210c506 Mon Sep 17 00:00:00 2001 From: Brad Anderson Date: Wed, 28 Jun 2017 15:09:00 -0600 Subject: [PATCH 37/39] [tinyxml2] Update tinyxml2 to fix static linkage Also specify BUILD_STATIC_LIBS when building static --- ports/tinyxml2/CONTROL | 4 ++-- ports/tinyxml2/portfile.cmake | 12 ++++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ports/tinyxml2/CONTROL b/ports/tinyxml2/CONTROL index ee5e20f342..aaa9a7c4fd 100644 --- a/ports/tinyxml2/CONTROL +++ b/ports/tinyxml2/CONTROL @@ -1,3 +1,3 @@ Source: tinyxml2 -Version: 5.0.0 -Description: A simple, small, efficient, C++ XML parser \ No newline at end of file +Version: 5.0.1 +Description: A simple, small, efficient, C++ XML parser diff --git a/ports/tinyxml2/portfile.cmake b/ports/tinyxml2/portfile.cmake index 59184178db..0c8b0b84b2 100644 --- a/ports/tinyxml2/portfile.cmake +++ b/ports/tinyxml2/portfile.cmake @@ -3,13 +3,21 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO leethomason/tinyxml2 - REF 5.0.0 - SHA512 ef310a466d0aec9dd0d25063c68f5312cd063366ee57499d8e462e25a556ea510617b66cdec1a368e8867dc082e0297e27fe09f16eb915392235be34206881e4 + REF 5.0.1 + SHA512 a51ec5843774df0482620c549fb6c61d30a6db5025be26ff6d25b3c53533a27a57f00b026bd9fbca78e9e30084b3f5f6fbff9dba315d078419da084b57f518ba HEAD_REF master ) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(BUILD_STATIC_LIBS 1) +else() + set(BUILD_STATIC_LIBS 0) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS} ) vcpkg_install_cmake() From 43ac9177ecde47a33b18e4e1c6617e15b3d3abd9 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 28 Jun 2017 15:12:28 -0700 Subject: [PATCH 38/39] [ctemplate] CMakeLists.txt simplification --- ports/ctemplate/CMakeLists.txt | 11 +++++------ ports/ctemplate/portfile.cmake | 9 +-------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/ports/ctemplate/CMakeLists.txt b/ports/ctemplate/CMakeLists.txt index 22869f7c5d..c7cc211f41 100644 --- a/ports/ctemplate/CMakeLists.txt +++ b/ports/ctemplate/CMakeLists.txt @@ -2,6 +2,9 @@ cmake_minimum_required(VERSION 3.5.1) project(libctemplate C CXX) # find_package(PythonInterp) +if(NOT PYTHON_EXECUTABLE) + message(FATAL_ERROR "PYTHON_EXECUTABLE must be set") +endif() if(MSVC) add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) @@ -73,14 +76,10 @@ execute_process( file(WRITE "${COMMON_INCLUDES}/htmlparser/htmlparser_fsm.h" "${HTMLPARSER_CONFIG_H}") file(WRITE "${COMMON_INCLUDES}/htmlparser/jsparser_fsm.h" "${JSPASPER_CONFIG_H}") -option(BUILD_SHARED_LIBRARY "Building shared library" ON) - include_directories(${COMMON_INCLUDES}) -if(BUILD_SHARED_LIBRARY) - add_library(libctemplate SHARED ${SRC_FILES}) -else() - add_library(libctemplate STATIC ${SRC_FILES} ) +add_library(libctemplate ${SRC_FILES}) +if(NOT BUILD_SHARED_LIBS) # Note: CTEMPLATE_DLL_DECL should be empty to build static file target_compile_definitions(libctemplate PRIVATE -DCTEMPLATE_DLL_DECL=) endif() diff --git a/ports/ctemplate/portfile.cmake b/ports/ctemplate/portfile.cmake index cb1e07b742..af1f0532cd 100644 --- a/ports/ctemplate/portfile.cmake +++ b/ports/ctemplate/portfile.cmake @@ -19,16 +19,9 @@ vcpkg_apply_patches( ${CMAKE_CURRENT_LIST_DIR}/fix-msvc.patch ) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set (BUILD_SHARED_LIBRARY ON) -else() - set(BUILD_SHARED_LIBRARY OFF) -endif() - - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DPYTHON_EXECUTABLE=${PYTHON2} -DBUILD_SHARED_LIBRARY=${BUILD_SHARED_LIBRARY} + OPTIONS -DPYTHON_EXECUTABLE=${PYTHON2} OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON ) From 6aae6ca3c0384d23c901e80cfbd46ed32a29321d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 28 Jun 2017 19:21:55 -0700 Subject: [PATCH 39/39] [eigen3] Fix installed cmake-config files to be relative --- ports/eigen3/CONTROL | 2 +- ports/eigen3/portfile.cmake | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ports/eigen3/CONTROL b/ports/eigen3/CONTROL index d6e01c6ccf..4dd1cd983c 100644 --- a/ports/eigen3/CONTROL +++ b/ports/eigen3/CONTROL @@ -1,3 +1,3 @@ Source: eigen3 -Version: 3.3.3-2 +Version: 3.3.3-3 Description: C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms. diff --git a/ports/eigen3/portfile.cmake b/ports/eigen3/portfile.cmake index 229da45e7c..ba968950a6 100644 --- a/ports/eigen3/portfile.cmake +++ b/ports/eigen3/portfile.cmake @@ -21,6 +21,10 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(READ "${CURRENT_PACKAGES_DIR}/share/eigen3/Eigen3Targets.cmake" EIGEN_TARGETS) +string(REPLACE "set(_IMPORT_PREFIX " "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_DIR}/../..\" ABSOLUTE) #" EIGEN_TARGETS "${EIGEN_TARGETS}") +file(WRITE "${CURRENT_PACKAGES_DIR}/share/eigen3/Eigen3Targets.cmake" "${EIGEN_TARGETS}") + # Put the licence file where vcpkg expects it file(COPY ${SOURCE_PATH}/COPYING.README DESTINATION ${CURRENT_PACKAGES_DIR}/share/eigen3) file(RENAME ${CURRENT_PACKAGES_DIR}/share/eigen3/COPYING.README ${CURRENT_PACKAGES_DIR}/share/eigen3/copyright)